Class LdapPasswordManagementService

  • All Implemented Interfaces:
    org.apereo.cas.pm.PasswordManagementService, org.springframework.beans.factory.DisposableBean

    public class LdapPasswordManagementService
    extends org.apereo.cas.pm.BasePasswordManagementService
    implements org.springframework.beans.factory.DisposableBean
    Since:
    5.0.0
    • Field Summary

      • Fields inherited from class org.apereo.cas.pm.BasePasswordManagementService

        properties
      • Fields inherited from interface org.apereo.cas.pm.PasswordManagementService

        DEFAULT_BEAN_NAME
    • Constructor Summary

      Constructors 
      Constructor Description
      LdapPasswordManagementService​(org.apereo.cas.util.crypto.CipherExecutor<java.io.Serializable,​java.lang.String> cipherExecutor, java.lang.String issuer, org.apereo.cas.configuration.model.support.pm.PasswordManagementProperties passwordManagementProperties, org.apereo.cas.pm.PasswordHistoryService passwordHistoryService, java.util.Map<java.lang.String,​org.ldaptive.ConnectionFactory> connectionFactoryMap)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean changeInternal​(org.apereo.cas.authentication.Credential credential, org.apereo.cas.pm.PasswordChangeRequest bean)  
      void destroy()  
      protected java.lang.String findAttribute​(org.apereo.cas.pm.PasswordManagementQuery context, java.util.List<java.lang.String> attributeNames, java.util.List<java.lang.String> ldapFilterParam)
      Perform LDAP search by username, returning the requested attribute.
      java.lang.String findEmail​(org.apereo.cas.pm.PasswordManagementQuery query)  
      java.lang.String findPhone​(org.apereo.cas.pm.PasswordManagementQuery query)  
      java.lang.String findUsername​(org.apereo.cas.pm.PasswordManagementQuery query)  
      java.util.Map<java.lang.String,​java.lang.String> getSecurityQuestions​(org.apereo.cas.pm.PasswordManagementQuery query)  
      void updateSecurityQuestions​(org.apereo.cas.pm.PasswordManagementQuery query)  
      • Methods inherited from class org.apereo.cas.pm.BasePasswordManagementService

        change, createToken, getCipherExecutor, getIssuer, getPasswordHistoryService, getProperties, parseToken
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apereo.cas.pm.PasswordManagementService

        isValidSecurityQuestionAnswer
    • Constructor Detail

      • LdapPasswordManagementService

        public LdapPasswordManagementService​(org.apereo.cas.util.crypto.CipherExecutor<java.io.Serializable,​java.lang.String> cipherExecutor,
                                             java.lang.String issuer,
                                             org.apereo.cas.configuration.model.support.pm.PasswordManagementProperties passwordManagementProperties,
                                             org.apereo.cas.pm.PasswordHistoryService passwordHistoryService,
                                             java.util.Map<java.lang.String,​org.ldaptive.ConnectionFactory> connectionFactoryMap)
    • Method Detail

      • destroy

        public void destroy()
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
      • findEmail

        public java.lang.String findEmail​(org.apereo.cas.pm.PasswordManagementQuery query)
        Specified by:
        findEmail in interface org.apereo.cas.pm.PasswordManagementService
      • findPhone

        public java.lang.String findPhone​(org.apereo.cas.pm.PasswordManagementQuery query)
        Specified by:
        findPhone in interface org.apereo.cas.pm.PasswordManagementService
      • findUsername

        public java.lang.String findUsername​(org.apereo.cas.pm.PasswordManagementQuery query)
        Specified by:
        findUsername in interface org.apereo.cas.pm.PasswordManagementService
      • updateSecurityQuestions

        public void updateSecurityQuestions​(org.apereo.cas.pm.PasswordManagementQuery query)
        Specified by:
        updateSecurityQuestions in interface org.apereo.cas.pm.PasswordManagementService
      • getSecurityQuestions

        public java.util.Map<java.lang.String,​java.lang.String> getSecurityQuestions​(org.apereo.cas.pm.PasswordManagementQuery query)
        Specified by:
        getSecurityQuestions in interface org.apereo.cas.pm.PasswordManagementService
      • changeInternal

        public boolean changeInternal​(org.apereo.cas.authentication.Credential credential,
                                      org.apereo.cas.pm.PasswordChangeRequest bean)
        Specified by:
        changeInternal in class org.apereo.cas.pm.BasePasswordManagementService
      • findAttribute

        protected java.lang.String findAttribute​(org.apereo.cas.pm.PasswordManagementQuery context,
                                                 java.util.List<java.lang.String> attributeNames,
                                                 java.util.List<java.lang.String> ldapFilterParam)
        Perform LDAP search by username, returning the requested attribute.
        Parameters:
        context - the context
        attributeNames - name of the attribute
        ldapFilterParam - the ldap filter param
        Returns:
        String value of attribute; null if user/attribute not present