Package org.apereo.cas.authentication
Class CoreAuthenticationUtils
java.lang.Object
org.apereo.cas.authentication.CoreAuthenticationUtils
This is
CoreAuthenticationUtils.- Since:
- 5.2.0
-
Method Summary
Modifier and TypeMethodDescriptionconvertAttributeValuesToObjects(Map<String, ?> attributes) Convert attribute values to objects.static org.apereo.cas.authentication.principal.merger.AttributeMergergetAttributeMerger(org.apereo.cas.configuration.model.core.authentication.PrincipalAttributesCoreProperties.MergingStrategyTypes mergingPolicy) Gets attribute merger.static BooleanisRememberMeAuthentication(org.apereo.cas.authentication.Authentication authentication) Is remember me recorded in authentication.static booleanisRememberMeAuthentication(org.apereo.cas.authentication.Authentication model, org.apereo.cas.validation.Assertion assertion) Is remember me authentication? looks at the authentication object to findRememberMeCredential.AUTHENTICATION_ATTRIBUTE_REMEMBER_MEand expects the assertion to also note a new login session.mergeAttributes(Map<String, List<Object>> currentAttributes, Map<String, List<Object>> attributesToMerge) Merge attributes map.mergeAttributes(Map<String, List<Object>> currentAttributes, Map<String, List<Object>> attributesToMerge, org.apereo.cas.authentication.principal.merger.AttributeMerger merger) Merge attributes map.static Collection<org.apereo.cas.authentication.AuthenticationPolicy> newAuthenticationPolicy(org.apereo.cas.configuration.model.core.authentication.AuthenticationPolicyProperties policyProps) New authentication policy collection.static Predicate<org.apereo.cas.authentication.Credential> newCredentialSelectionPredicate(String selectionCriteria) Gets credential selection predicate.static org.apereo.cas.authentication.adaptive.intel.IPAddressIntelligenceServicenewIpAddressIntelligenceService(org.apereo.cas.configuration.model.core.authentication.AdaptiveAuthenticationProperties adaptive) New ip address intelligence service.static org.apereo.cas.authentication.AuthenticationPasswordPolicyHandlingStrategynewPasswordPolicyHandlingStrategy(org.apereo.cas.configuration.model.core.authentication.PasswordPolicyProperties properties, org.springframework.context.ApplicationContext applicationContext) New password policy handling strategy.static org.apereo.cas.authentication.PrincipalElectionStrategyConflictResolvernewPrincipalElectionStrategyConflictResolver(org.apereo.cas.configuration.model.core.authentication.PersonDirectoryPrincipalResolverProperties properties) New principal election strategy conflict resolver.Transform principal attributes list into map map.Transform principal attributes into map.
-
Method Details
-
convertAttributeValuesToObjects
Convert attribute values to objects.- Parameters:
attributes- the attributes- Returns:
- the map
-
getAttributeMerger
public static org.apereo.cas.authentication.principal.merger.AttributeMerger getAttributeMerger(org.apereo.cas.configuration.model.core.authentication.PrincipalAttributesCoreProperties.MergingStrategyTypes mergingPolicy) Gets attribute merger.- Parameters:
mergingPolicy- the merging policy- Returns:
- the attribute merger
-
isRememberMeAuthentication
public static boolean isRememberMeAuthentication(org.apereo.cas.authentication.Authentication model, org.apereo.cas.validation.Assertion assertion) Is remember me authentication? looks at the authentication object to findRememberMeCredential.AUTHENTICATION_ATTRIBUTE_REMEMBER_MEand expects the assertion to also note a new login session.- Parameters:
model- the modelassertion- the assertion- Returns:
- true if remember-me, false if otherwise.
-
isRememberMeAuthentication
public static Boolean isRememberMeAuthentication(org.apereo.cas.authentication.Authentication authentication) Is remember me recorded in authentication.- Parameters:
authentication- the authentication- Returns:
- true/false
-
mergeAttributes
public static Map<String,List<Object>> mergeAttributes(Map<String, List<Object>> currentAttributes, Map<String, List<Object>> attributesToMerge, org.apereo.cas.authentication.principal.merger.AttributeMerger merger) Merge attributes map.- Parameters:
currentAttributes- the current attributesattributesToMerge- the attributes to mergemerger- the merger- Returns:
- the map
-
mergeAttributes
public static Map<String,List<Object>> mergeAttributes(Map<String, List<Object>> currentAttributes, Map<String, List<Object>> attributesToMerge) Merge attributes map.- Parameters:
currentAttributes- the current attributesattributesToMerge- the attributes to merge- Returns:
- the map
-
transformPrincipalAttributesListIntoMap
Transform principal attributes list into map map.- Parameters:
list- the list- Returns:
- the map
-
transformPrincipalAttributesListIntoMultiMap
public static com.google.common.collect.Multimap<String,Object> transformPrincipalAttributesListIntoMultiMap(List<String> list) Transform principal attributes into map. Items in the list are defined in the syntax of "cn", or "cn:commonName" for virtual renaming and maps.- Parameters:
list- the list- Returns:
- the map
-
newCredentialSelectionPredicate
public static Predicate<org.apereo.cas.authentication.Credential> newCredentialSelectionPredicate(String selectionCriteria) Gets credential selection predicate.- Parameters:
selectionCriteria- the selection criteria- Returns:
- the credential selection predicate
-
newPasswordPolicyHandlingStrategy
public static org.apereo.cas.authentication.AuthenticationPasswordPolicyHandlingStrategy newPasswordPolicyHandlingStrategy(org.apereo.cas.configuration.model.core.authentication.PasswordPolicyProperties properties, org.springframework.context.ApplicationContext applicationContext) New password policy handling strategy.- Parameters:
properties- the propertiesapplicationContext- the application context- Returns:
- the authentication password policy handling strategy
-
newAuthenticationPolicy
public static Collection<org.apereo.cas.authentication.AuthenticationPolicy> newAuthenticationPolicy(org.apereo.cas.configuration.model.core.authentication.AuthenticationPolicyProperties policyProps) New authentication policy collection.- Parameters:
policyProps- the policy props- Returns:
- the collection
-
newIpAddressIntelligenceService
public static org.apereo.cas.authentication.adaptive.intel.IPAddressIntelligenceService newIpAddressIntelligenceService(org.apereo.cas.configuration.model.core.authentication.AdaptiveAuthenticationProperties adaptive) New ip address intelligence service.- Parameters:
adaptive- the adaptive- Returns:
- the ip address intelligence service
-
newPrincipalElectionStrategyConflictResolver
public static org.apereo.cas.authentication.PrincipalElectionStrategyConflictResolver newPrincipalElectionStrategyConflictResolver(org.apereo.cas.configuration.model.core.authentication.PersonDirectoryPrincipalResolverProperties properties) New principal election strategy conflict resolver.- Parameters:
properties- the properties- Returns:
- the principal election strategy conflict resolver
-