tfa.entry:
  path: '/tfa/{uid}/{hash}'
  defaults:
    _form: '\Drupal\tfa\Form\EntryForm'
    _title: 'Two-Factor Authentication'
  requirements:
    _user_is_logged_in: 'FALSE'
    _custom_access: '\Drupal\tfa\Controller\TfaLoginController::access'
    uid: \d+
  options:
    _maintenance_access: TRUE
    no_cache: TRUE

tfa.login:
  path: '/tfa/login'
  defaults:
    _form: '\Drupal\tfa\Form\TfaLoginForm'
    _title: 'User Logon'
  requirements:
    _user_is_logged_in: 'FALSE'
  options:
    _maintenance_access: TRUE

tfa.settings:
  path: '/admin/config/people/tfa'
  defaults:
    _form: '\Drupal\tfa\Form\SettingsForm'
    _title: 'TFA Settings'
  options:
    _admin_route: TRUE
  requirements:
    _permission: 'admin tfa settings'

tfa.overview:
  path: '/user/{user}/security/tfa'
  defaults:
    _form: 'Drupal\tfa\Form\TfaOverviewForm'
    _title: 'TFA'
  requirements:
    _custom_access: '\Drupal\tfa\Controller\TfaLoginController::accessSelfOrAdmin'
  options:
    _admin_route: TRUE
    _tfa_permission: 'setup own tfa'

tfa.validation.setup:
  path: '/user/{user}/security/tfa/{method}'
  defaults:
    _form: 'Drupal\tfa\Form\TfaSetupForm'
    _title: 'TFA setup'
  requirements:
    _custom_access: '\Drupal\tfa\Controller\TfaLoginController::accessSelfOrAdmin'
  options:
    _admin_route: TRUE
    _tfa_permission: 'setup own tfa'

tfa.disable:
  path: '/user/{user}/security/tfa/disable'
  defaults:
    _form: 'Drupal\tfa\Form\TfaDisableForm'
    _title: 'TFA disable'
  requirements:
    _custom_access: '\Drupal\tfa\Controller\TfaLoginController::accessSelfOrAdmin'
    user: \d+
  options:
    _admin_route: TRUE
    _tfa_permission: 'disable own tfa'

tfa.plugin.reset:
  path: '/user/{user}/security/tfa/{method}/{reset}'
  defaults:
    _form: 'Drupal\tfa\Form\TfaSetupForm'
    _title: 'TFA setup'
  requirements:
    _custom_access: '\Drupal\tfa\Controller\TfaLoginController::accessSelfOrAdmin'
  options:
    _admin_route: TRUE
    _tfa_permission: 'setup own tfa'
