Class SessionStrategyPostProcessor
java.lang.Object
com.irurueta.authserver.authorization.api.web.passkeys.SessionStrategyPostProcessor
- All Implemented Interfaces:
org.springframework.security.config.ObjectPostProcessor<org.springframework.security.web.webauthn.authentication.WebAuthnAuthenticationFilter>
public class SessionStrategyPostProcessor
extends Object
implements org.springframework.security.config.ObjectPostProcessor<org.springframework.security.web.webauthn.authentication.WebAuthnAuthenticationFilter>
Hands the session authentication strategy of the chain to the WebAuthn filter.
WebAuthnConfigurer leaves
its filter with the do-nothing strategy, so a passkey sign-in would keep the session id of the visitor (session
fixation) and the CSRF token it was rendered with. The chain's strategy changes the id and renews the token, as the
one of the form login does. The strategy is a shared object that only exists once every configurer has been
initialised, and the configurer post-processes its filter while it is configured, so it is read then.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.springframework.security.config.annotation.web.builders.HttpSecuritySecurity builder of the chain, whose shared strategy is read. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<O extends org.springframework.security.web.webauthn.authentication.WebAuthnAuthenticationFilter>
OpostProcess(O filter) Sets the shared strategy, when the chain has one, on the filter.
-
Field Details
-
http
private final org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity builder of the chain, whose shared strategy is read.
-
-
Constructor Details
-
SessionStrategyPostProcessor
public SessionStrategyPostProcessor()
-
-
Method Details
-
postProcess
public <O extends org.springframework.security.web.webauthn.authentication.WebAuthnAuthenticationFilter> O postProcess(O filter) Sets the shared strategy, when the chain has one, on the filter.- Specified by:
postProcessin interfaceorg.springframework.security.config.ObjectPostProcessor<org.springframework.security.web.webauthn.authentication.WebAuthnAuthenticationFilter>- Type Parameters:
O- type of the filter.- Parameters:
filter- the filter the configurer built.- Returns:
- the same filter.
-