diff --git a/ldap/src/main/java/org/springframework/security/ldap/authentication/ad/ActiveDirectoryLdapAuthenticationProvider.java b/ldap/src/main/java/org/springframework/security/ldap/authentication/ad/ActiveDirectoryLdapAuthenticationProvider.java index 286a5c263e1..440a6799af8 100644 --- a/ldap/src/main/java/org/springframework/security/ldap/authentication/ad/ActiveDirectoryLdapAuthenticationProvider.java +++ b/ldap/src/main/java/org/springframework/security/ldap/authentication/ad/ActiveDirectoryLdapAuthenticationProvider.java @@ -202,10 +202,6 @@ protected DirContextOperations doAuthentication(UsernamePasswordAuthenticationTo } } - /** - * Creates the user authority list from the values of the {@code memberOf} attribute - * obtained from the user's Active Directory entry. - */ @Override protected Collection loadUserAuthorities(DirContextOperations userData, String username, String password) { diff --git a/ldap/src/main/java/org/springframework/security/ldap/authentication/ad/DefaultActiveDirectoryAuthoritiesPopulator.java b/ldap/src/main/java/org/springframework/security/ldap/authentication/ad/DefaultActiveDirectoryAuthoritiesPopulator.java index e682693e07e..f769d3234d6 100644 --- a/ldap/src/main/java/org/springframework/security/ldap/authentication/ad/DefaultActiveDirectoryAuthoritiesPopulator.java +++ b/ldap/src/main/java/org/springframework/security/ldap/authentication/ad/DefaultActiveDirectoryAuthoritiesPopulator.java @@ -1,3 +1,19 @@ +/* + * Copyright 2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.springframework.security.ldap.authentication.ad; import org.apache.commons.logging.Log; @@ -13,6 +29,14 @@ import java.util.Collection; import java.util.stream.Collectors; +/** + * The default strategy for obtaining user role information from the active directory. + * Creates the user authority list from the values of the {@code memberOf} attribute + * obtained from the user's Active Directory entry. + * + * @author Luke Taylor + * @author Roman Zabaluev + */ public class DefaultActiveDirectoryAuthoritiesPopulator implements LdapAuthoritiesPopulator { protected final Log logger = LogFactory.getLog(getClass());