Class TotpChainCustomizer

java.lang.Object
com.irurueta.authserver.authorization.api.web.totp.TotpChainCustomizer
All Implemented Interfaces:
LoginChainCustomizer

public class TotpChainCustomizer extends Object implements LoginChainCustomizer
Adds the TOTP second factor to the login/UI chain: the second-factor page and the post of its forms are open to a user who has signed in with a password (and only to such a user), and the filters that verify the code and recognise a trusted device are installed before the authorization check. CSRF protection stays on: the forms carry the token. Once the chain is configured, the TOTP filter gets the chain's session authentication strategy, the one the form login uses (a new session id and a new CSRF token on success).
  • Field Details

    • trustedDeviceFilter

      private final TrustedDeviceFilter trustedDeviceFilter
      Filter that recognises a trusted device.
    • totpAuthenticationFilter

      private final TotpAuthenticationFilter totpAuthenticationFilter
      Filter that processes the post of the forms.
  • Constructor Details

    • TotpChainCustomizer

      public TotpChainCustomizer()
  • Method Details

    • customize

      public void customize(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
      Customizes the login/UI chain.
      Specified by:
      customize in interface LoginChainCustomizer
      Parameters:
      http - security builder of the chain.