Package org.apereo.cas.authentication
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
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Method Summary
Modifier and TypeMethodDescriptionstatic AuthenticationPolicyAlways satisfied authentication policy.default intgetOrder()isSatisfiedBy(Authentication authentication, Set<AuthenticationHandler> authenticationHandlers, org.springframework.context.ConfigurableApplicationContext applicationContext) Is satisfied by authentication policy.isSatisfiedBy(Authentication authentication, Set<AuthenticationHandler> authenticationHandlers, org.springframework.context.ConfigurableApplicationContext applicationContext, Map<String, ? extends Serializable> context) Determines whether an authentication event is satisfied by arbitrary security policy.isSatisfiedBy(Authentication authentication, org.springframework.context.ConfigurableApplicationContext applicationContext) Is satisfied by authentication policy.isSatisfiedBy(Authentication authentication, org.springframework.context.ConfigurableApplicationContext applicationContext, Map<String, ? extends Serializable> context) Is satisfied by authentication policy.static AuthenticationPolicyNever satisfied authentication policy.default booleanshouldResumeOnFailure(Throwable failure) Should authentication chain resume on failure?Methods inherited from interface org.apereo.cas.util.NamedObject
getName
-
Method Details
-
alwaysSatisfied
Always satisfied authentication policy.- Returns:
- the authentication policy
-
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 ThrowableDetermines 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 contextcontext- 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 authenticationauthenticationHandlers- the authentication handlersapplicationContext- 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 ThrowableIs satisfied by authentication policy.- Parameters:
authentication- the authenticationapplicationContext- the application contextcontext- 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 authenticationapplicationContext- the application context- Returns:
- the authentication policy execution result
- Throws:
Throwable- the throwable
-
getOrder
default int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
shouldResumeOnFailure
Should authentication chain resume on failure?- Parameters:
failure- the failure- Returns:
- resume, or block
-