Class DefaultPrincipalElectionStrategy
java.lang.Object
org.apereo.cas.authentication.principal.DefaultPrincipalElectionStrategy
- All Implemented Interfaces:
Serializable,org.apereo.cas.authentication.PrincipalElectionStrategy,org.springframework.core.Ordered
public class DefaultPrincipalElectionStrategy
extends Object
implements org.apereo.cas.authentication.PrincipalElectionStrategy
This is
DefaultPrincipalElectionStrategy that selects the primary principal
to be the first principal in the chain of authentication history.- Since:
- 4.2.0
- See Also:
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCEFields inherited from interface org.apereo.cas.authentication.PrincipalElectionStrategy
BEAN_NAME -
Constructor Summary
ConstructorsConstructorDescriptionDefaultPrincipalElectionStrategy(org.apereo.cas.authentication.principal.PrincipalFactory principalFactory, org.apereo.cas.authentication.PrincipalElectionStrategyConflictResolver principalElectionConflictResolver) DefaultPrincipalElectionStrategy(org.apereo.cas.authentication.PrincipalElectionStrategyConflictResolver principalElectionConflictResolver) -
Method Summary
Modifier and TypeMethodDescriptionorg.apereo.cas.authentication.principal.merger.AttributeMergerintgetOrder()org.apereo.cas.authentication.PrincipalElectionStrategyConflictResolverorg.apereo.cas.authentication.principal.PrincipalFactoryorg.apereo.cas.authentication.principal.Principalnominate(Collection<org.apereo.cas.authentication.Authentication> authentications, Map<String, List<Object>> principalAttributes) org.apereo.cas.authentication.principal.Principalnominate(List<org.apereo.cas.authentication.principal.Principal> principals, Map<String, List<Object>> attributes) voidsetAttributeMerger(org.apereo.cas.authentication.principal.merger.AttributeMerger attributeMerger) voidsetOrder(int order)
-
Constructor Details
-
DefaultPrincipalElectionStrategy
public DefaultPrincipalElectionStrategy() -
DefaultPrincipalElectionStrategy
public DefaultPrincipalElectionStrategy(org.apereo.cas.authentication.PrincipalElectionStrategyConflictResolver principalElectionConflictResolver) -
DefaultPrincipalElectionStrategy
public DefaultPrincipalElectionStrategy(org.apereo.cas.authentication.principal.PrincipalFactory principalFactory, org.apereo.cas.authentication.PrincipalElectionStrategyConflictResolver principalElectionConflictResolver)
-
-
Method Details
-
nominate
public org.apereo.cas.authentication.principal.Principal nominate(Collection<org.apereo.cas.authentication.Authentication> authentications, Map<String, List<Object>> principalAttributes) throws Throwable- Specified by:
nominatein interfaceorg.apereo.cas.authentication.PrincipalElectionStrategy- Throws:
Throwable
-
nominate
public org.apereo.cas.authentication.principal.Principal nominate(List<org.apereo.cas.authentication.principal.Principal> principals, Map<String, List<Object>> attributes) throws Throwable- Specified by:
nominatein interfaceorg.apereo.cas.authentication.PrincipalElectionStrategy- Throws:
Throwable
-
setAttributeMerger
public void setAttributeMerger(org.apereo.cas.authentication.principal.merger.AttributeMerger attributeMerger) -
setOrder
public void setOrder(int order) -
getPrincipalFactory
public org.apereo.cas.authentication.principal.PrincipalFactory getPrincipalFactory() -
getPrincipalElectionConflictResolver
public org.apereo.cas.authentication.PrincipalElectionStrategyConflictResolver getPrincipalElectionConflictResolver() -
getAttributeMerger
public org.apereo.cas.authentication.principal.merger.AttributeMerger getAttributeMerger()- Specified by:
getAttributeMergerin interfaceorg.apereo.cas.authentication.PrincipalElectionStrategy
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered- Specified by:
getOrderin interfaceorg.apereo.cas.authentication.PrincipalElectionStrategy
-