Class UniquePrincipalAuthenticationPolicy
java.lang.Object
org.apereo.cas.authentication.policy.BaseAuthenticationPolicy
org.apereo.cas.authentication.policy.UniquePrincipalAuthenticationPolicy
- All Implemented Interfaces:
Serializable,org.apereo.cas.authentication.AuthenticationPolicy,org.apereo.cas.util.NamedObject,org.springframework.core.Ordered
This is
UniquePrincipalAuthenticationPolicy
that prevents authentication if the same principal id
is found more than one in the registry. This effectively forces
each user to have a single and unique SSO session, disallowing
multiple logins.- Since:
- 5.2.0
- See Also:
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionUniquePrincipalAuthenticationPolicy(org.apereo.cas.ticket.registry.TicketRegistry ticketRegistry, org.springframework.beans.factory.ObjectProvider<org.apereo.cas.web.flow.SingleSignOnParticipationStrategy> singleSignOnParticipationStrategy, org.apereo.cas.configuration.model.core.authentication.policy.UniquePrincipalAuthenticationPolicyProperties properties) -
Method Summary
Modifier and TypeMethodDescriptionbooleanorg.apereo.cas.configuration.model.core.authentication.policy.UniquePrincipalAuthenticationPolicyPropertiesorg.springframework.beans.factory.ObjectProvider<org.apereo.cas.web.flow.SingleSignOnParticipationStrategy> org.apereo.cas.ticket.registry.TicketRegistryinthashCode()org.apereo.cas.authentication.AuthenticationPolicyExecutionResultisSatisfiedBy(org.apereo.cas.authentication.Authentication authentication, Set<org.apereo.cas.authentication.AuthenticationHandler> authenticationHandlers, org.springframework.context.ConfigurableApplicationContext applicationContext, Map<String, ? extends Serializable> context) Methods inherited from class org.apereo.cas.authentication.policy.BaseAuthenticationPolicy
getName, getOrder, setName, setOrderMethods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apereo.cas.authentication.AuthenticationPolicy
isSatisfiedBy, isSatisfiedBy, isSatisfiedBy, shouldResumeOnFailure
-
Constructor Details
-
UniquePrincipalAuthenticationPolicy
public UniquePrincipalAuthenticationPolicy(org.apereo.cas.ticket.registry.TicketRegistry ticketRegistry, org.springframework.beans.factory.ObjectProvider<org.apereo.cas.web.flow.SingleSignOnParticipationStrategy> singleSignOnParticipationStrategy, org.apereo.cas.configuration.model.core.authentication.policy.UniquePrincipalAuthenticationPolicyProperties properties)
-
-
Method Details
-
isSatisfiedBy
public org.apereo.cas.authentication.AuthenticationPolicyExecutionResult isSatisfiedBy(org.apereo.cas.authentication.Authentication authentication, Set<org.apereo.cas.authentication.AuthenticationHandler> authenticationHandlers, org.springframework.context.ConfigurableApplicationContext applicationContext, Map<String, ? extends Serializable> context) throws Throwable- Throws:
Throwable
-
equals
- Overrides:
equalsin classBaseAuthenticationPolicy
-
hashCode
public int hashCode()- Overrides:
hashCodein classBaseAuthenticationPolicy
-
getTicketRegistry
public org.apereo.cas.ticket.registry.TicketRegistry getTicketRegistry() -
getSingleSignOnParticipationStrategy
public org.springframework.beans.factory.ObjectProvider<org.apereo.cas.web.flow.SingleSignOnParticipationStrategy> getSingleSignOnParticipationStrategy() -
getProperties
public org.apereo.cas.configuration.model.core.authentication.policy.UniquePrincipalAuthenticationPolicyProperties getProperties()
-