Class TotpChainCustomizer
java.lang.Object
com.irurueta.authserver.authorization.api.web.totp.TotpChainCustomizer
- All Implemented Interfaces:
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).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final classHands the session authentication strategy of the chain to the TOTP filter. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TotpAuthenticationFilterFilter that processes the post of the forms.private final TrustedDeviceFilterFilter that recognises a trusted device. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcustomize(org.springframework.security.config.annotation.web.builders.HttpSecurity http) Customizes the login/UI chain.
-
Field Details
-
trustedDeviceFilter
Filter that recognises a trusted device. -
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:
customizein interfaceLoginChainCustomizer- Parameters:
http- security builder of the chain.
-