Class CoreAuthenticationUtils

java.lang.Object
org.apereo.cas.authentication.CoreAuthenticationUtils

public final class CoreAuthenticationUtils extends Object
Since:
5.2.0
  • Method Details

    • convertAttributeValuesToObjects

      public static Map<String,Object> convertAttributeValuesToObjects(Map<String,?> attributes)
      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 find RememberMeCredential.AUTHENTICATION_ATTRIBUTE_REMEMBER_ME and expects the assertion to also note a new login session.
      Parameters:
      model - the model
      assertion - 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 attributes
      attributesToMerge - the attributes to merge
      merger - 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 attributes
      attributesToMerge - the attributes to merge
      Returns:
      the map
    • transformPrincipalAttributesListIntoMap

      public static Map<String,Object> transformPrincipalAttributesListIntoMap(List<String> list)
      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 properties
      applicationContext - 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