Interface PrePostAuthenticationHandler

  • All Superinterfaces:
    AuthenticationHandler, org.springframework.core.Ordered
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface PrePostAuthenticationHandler
    extends AuthenticationHandler
    Since:
    5.1.0
    • Method Detail

      • preAuthenticate

        default boolean preAuthenticate​(Credential credential)
        Template method to perform arbitrary pre-authentication actions.
        Parameters:
        credential - the Credential supplied
        Returns:
        true if authentication should continue, false otherwise.
      • postAuthenticate

        default AuthenticationHandlerExecutionResult postAuthenticate​(Credential credential,
                                                                      AuthenticationHandlerExecutionResult result)
        Template method to perform arbitrary post-authentication actions.
        Parameters:
        credential - the supplied credential
        result - the result of the authentication attempt.
        Returns:
        An authentication handler result that MAY be different or modified from that provided.