public void initialize ( ) { /* * Use a set to ensure we ignore duplicates. */ val attributes = new HashSet < String > ( ) ; LOGGER . debug ( "Initializing LDAP attribute configuration..." ) ; if ( StringUtils . isNotBlank ( this . principalIdAttribute ) ) { LOGGER . debug ( "Configured to retrieve principal id attribute [{}]" , this . principalIdAttribute ) ; attributes . add ( this . principalIdAttribute ) ; } if ( this . principalAttributeMap != null && ! this . principalAttributeMap . isEmpty ( ) ) { val attrs = this . principalAttributeMap . keySet ( ) ; attributes . addAll ( attrs ) ; LOGGER . debug ( "Configured to retrieve principal attribute collection of [{}]" , attrs ) ; } if ( authenticator . getReturnAttributes ( ) != null ) { val authenticatorAttributes = CollectionUtils . wrapList ( authenticator . getReturnAttributes ( ) ) ; if ( ! authenticatorAttributes . isEmpty ( ) ) { LOGGER . debug ( "Filtering authentication entry attributes [{}] based on authenticator attributes [{}]" , authenticatedEntryAttributes , authenticatorAttributes ) ; attributes . removeIf ( authenticatorAttributes :: contains ) ; } } this . authenticatedEntryAttributes = attributes . toArray ( ArrayUtils . EMPTY_STRING_ARRAY ) ; LOGGER . debug ( "LDAP authentication entry attributes for the authentication request are [{}]" , ( Object [ ] ) this . authenticatedEntryAttributes ) ; }
Initialize the handler setup the authentication entry attributes .