Class CoreAuthenticationUtils

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map<java.lang.String,java.lang.Object> convertAttributeValuesToMultiValuedObjects​(java.util.Map<java.lang.String,java.lang.Object> attributes)
      Convert attribute values to multi valued objects.
      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.
      static java.util.function.Predicate<org.apereo.cas.authentication.Credential> newCredentialSelectionPredicate​(java.lang.String selectionCriteria)
      Gets credential selection predicate.
      static org.apereo.cas.authentication.AuthenticationPasswordPolicyHandlingStrategy newPasswordPolicyHandlingStrategy​(org.apereo.cas.configuration.model.core.authentication.PasswordPolicyProperties properties)
      New password policy handling strategy.
      static java.util.Map<java.lang.String,java.lang.Object> transformPrincipalAttributesListIntoMap​(java.util.List<java.lang.String> list)
      Transform principal attributes list into map map.
      static com.google.common.collect.Multimap<java.lang.String,java.lang.Object> transformPrincipalAttributesListIntoMultiMap​(java.util.List<java.lang.String> list)
      Transform principal attributes into map.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CoreAuthenticationUtils

        public CoreAuthenticationUtils()
    • Method Detail

      • 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.
      • convertAttributeValuesToMultiValuedObjects

        public static java.util.Map<java.lang.String,java.lang.Object> convertAttributeValuesToMultiValuedObjects​(java.util.Map<java.lang.String,java.lang.Object> attributes)
        Convert attribute values to multi valued objects.
        Parameters:
        attributes - the attributes
        Returns:
        the map of attributes to return
      • transformPrincipalAttributesListIntoMap

        public static java.util.Map<java.lang.String,java.lang.Object> transformPrincipalAttributesListIntoMap​(java.util.List<java.lang.String> list)
        Transform principal attributes list into map map.
        Parameters:
        list - the list
        Returns:
        the map
      • transformPrincipalAttributesListIntoMultiMap

        public static com.google.common.collect.Multimap<java.lang.String,java.lang.Object> transformPrincipalAttributesListIntoMultiMap​(java.util.List<java.lang.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 java.util.function.Predicate<org.apereo.cas.authentication.Credential> newCredentialSelectionPredicate​(java.lang.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)
        New password policy handling strategy.
        Parameters:
        properties - the properties
        Returns:
        the authentication password policy handling strategy