import ch.nevis.esauth.auth.engine.AuthResponse

if (inargs['cancel'] && inargs['cancel'] == 'cancel') {
  def s = request.getAuthSession(true)
  s.removeAttribute('agov.recovery.moreThanOneLf')

  response.setResult('doCancel')
  return
}

if (inargs['continue'] && inargs['continue'] == 'yes') {
  response.setSessionAttribute('agov.recovery.moreThanOneLf', 'yes')
  response.setResult('loginFactorYes')
  return
}

if (inargs['continue'] && inargs['continue'] == 'no') {
  response.setSessionAttribute('agov.recovery.moreThanOneLf', 'no')
  response.setResult('loginFactorNo')
  return
}

// if we reach this, display the GUI again
response.setStatus(AuthResponse.AUTH_CONTINUE)
return