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

    Fields
    Modifier and Type
    Field
    Description
    private final org.springframework.security.config.annotation.web.builders.HttpSecurity
    Security builder of the chain, whose shared strategy is read.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • http

      private final org.springframework.security.config.annotation.web.builders.HttpSecurity http
      Security 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:
      postProcess in interface org.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.