Interface AuthenticationPolicy

All Superinterfaces:
org.apereo.cas.util.NamedObject, org.springframework.core.Ordered, Serializable
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 AuthenticationPolicy extends org.springframework.core.Ordered, Serializable, org.apereo.cas.util.NamedObject
Strategy interface for pluggable authentication security policies.
Since:
4.0.0
  • Method Details

    • alwaysSatisfied

      static AuthenticationPolicy alwaysSatisfied()
      Always satisfied authentication policy.
      Returns:
      the authentication policy
    • neverSatisfied

      static AuthenticationPolicy neverSatisfied()
      Never satisfied authentication policy.
      Returns:
      the authentication policy
    • isSatisfiedBy

      AuthenticationPolicyExecutionResult isSatisfiedBy(Authentication authentication, Set<AuthenticationHandler> authenticationHandlers, org.springframework.context.ConfigurableApplicationContext applicationContext, Map<String,? extends Serializable> context) throws Throwable
      Determines whether an authentication event is satisfied by arbitrary security policy.
      Parameters:
      authentication - Authentication event to examine for compliance with security policy.
      authenticationHandlers - the authentication handlers selected for this transaction.
      applicationContext - the application context
      context - the context
      Returns:
      Authentication policy execution result
      Throws:
      Throwable - the throwable
    • isSatisfiedBy

      default AuthenticationPolicyExecutionResult isSatisfiedBy(Authentication authentication, Set<AuthenticationHandler> authenticationHandlers, org.springframework.context.ConfigurableApplicationContext applicationContext) throws Throwable
      Is satisfied by authentication policy.
      Parameters:
      authentication - the authentication
      authenticationHandlers - the authentication handlers
      applicationContext - the application context
      Returns:
      the authentication policy execution result
      Throws:
      Throwable - the throwable
    • isSatisfiedBy

      default AuthenticationPolicyExecutionResult isSatisfiedBy(Authentication authentication, org.springframework.context.ConfigurableApplicationContext applicationContext, Map<String,? extends Serializable> context) throws Throwable
      Is satisfied by authentication policy.
      Parameters:
      authentication - the authentication
      applicationContext - the application context
      context - the context
      Returns:
      the authentication policy execution result
      Throws:
      Throwable - the throwable
    • isSatisfiedBy

      default AuthenticationPolicyExecutionResult isSatisfiedBy(Authentication authentication, org.springframework.context.ConfigurableApplicationContext applicationContext) throws Throwable
      Is satisfied by authentication policy.
      Parameters:
      authentication - the authentication
      applicationContext - the application context
      Returns:
      the authentication policy execution result
      Throws:
      Throwable - the throwable
    • getOrder

      default int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered
    • shouldResumeOnFailure

      default boolean shouldResumeOnFailure(Throwable failure)
      Should authentication chain resume on failure?
      Parameters:
      failure - the failure
      Returns:
      resume, or block