Interface ContextualAuthenticationPolicy<T>


  • public interface ContextualAuthenticationPolicy<T>
    A stateful authentication policy that is applied using arbitrary contextual information.
    Since:
    4.0.0
    • Method Detail

      • getContext

        T getContext()
        Gets the context used to evaluate the authentication policy.
        Returns:
        Context information.
      • getCode

        default java.util.Optional<java.lang.String> getCode()
        Return an optional message code to use when this is unsatisfied.
        Returns:
        Optional message code
      • isSatisfiedBy

        boolean isSatisfiedBy​(Authentication authentication)
                       throws java.lang.Exception
        Determines whether an authentication event is satisfied by arbitrary security policy.
        Parameters:
        authentication - Authentication event to examine for compliance with security policy.
        Returns:
        True if authentication isSatisfiedBy security policy, false otherwise.
        Throws:
        java.lang.Exception - the exception