@ -47,9 +47,7 @@ public class DefaultLdapUsernameToDnMapper implements LdapUsernameToDnMapper {
@@ -47,9 +47,7 @@ public class DefaultLdapUsernameToDnMapper implements LdapUsernameToDnMapper {
@ -51,8 +51,6 @@ public class DefaultSpringSecurityContextSource extends LdapContextSource {
@@ -51,8 +51,6 @@ public class DefaultSpringSecurityContextSource extends LdapContextSource {
@ -62,44 +60,36 @@ public class DefaultSpringSecurityContextSource extends LdapContextSource {
@@ -62,44 +60,36 @@ public class DefaultSpringSecurityContextSource extends LdapContextSource {
DefaultSpringSecurityContextSource.this.logger.debug("Removing pooling flag for user "+dn);
env.remove(SUN_LDAP_POOLING_FLAG);
}
}
});
}
@ -146,16 +136,13 @@ public class DefaultSpringSecurityContextSource extends LdapContextSource {
@@ -146,16 +136,13 @@ public class DefaultSpringSecurityContextSource extends LdapContextSource {
Assert.notNull(baseDn,"The Base DN for the LDAP server must not be null.");
Assert.notEmpty(urls,"At least one LDAP server URL must be provided.");
StringtrimmedBaseDn=baseDn.trim();
StringBuilderproviderUrl=newStringBuilder();
for(StringserverUrl:urls){
StringtrimmedUrl=serverUrl.trim();
if("".equals(trimmedUrl)){
continue;
}
providerUrl.append(trimmedUrl);
if(!trimmedUrl.endsWith("/")){
providerUrl.append("/");
@ -163,7 +150,6 @@ public class DefaultSpringSecurityContextSource extends LdapContextSource {
@@ -163,7 +150,6 @@ public class DefaultSpringSecurityContextSource extends LdapContextSource {
@ -76,7 +78,6 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@@ -76,7 +78,6 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@ -88,31 +89,18 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@@ -88,31 +89,18 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@ -123,12 +111,8 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@@ -123,12 +111,8 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@ -174,27 +158,23 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@@ -174,27 +158,23 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@ -208,17 +188,14 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@@ -208,17 +188,14 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@ -246,27 +223,23 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@@ -246,27 +223,23 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
logger.debug("Attribute:"+attributeName+" contains a non string value of type["
+o.getClass()+"]");
}
svalues.add(o.toString());
logger.debug(LogMessage.format("Attribute:%s contains a non string value of type[%s]",
attributeName,value.getClass()));
stringValues.add(value.toString());
}
}
}
record.put(attributeName,svalues);
record.put(attributeName,stringValues);
}
/**
@ -283,8 +256,7 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@@ -283,8 +256,7 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@ -298,22 +270,15 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@@ -298,22 +270,15 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@ -321,15 +286,9 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@@ -321,15 +286,9 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@ -64,33 +65,22 @@ public abstract class AbstractLdapAuthenticationProvider implements Authenticati
@@ -64,33 +65,22 @@ public abstract class AbstractLdapAuthenticationProvider implements Authenticati
@ -111,11 +101,9 @@ public abstract class AbstractLdapAuthenticationProvider implements Authenticati
@@ -111,11 +101,9 @@ public abstract class AbstractLdapAuthenticationProvider implements Authenticati
@ -91,16 +91,13 @@ public abstract class AbstractLdapAuthenticator implements LdapAuthenticator, In
@@ -91,16 +91,13 @@ public abstract class AbstractLdapAuthenticator implements LdapAuthenticator, In
@ -134,7 +131,6 @@ public abstract class AbstractLdapAuthenticator implements LdapAuthenticator, In
@@ -134,7 +131,6 @@ public abstract class AbstractLdapAuthenticator implements LdapAuthenticator, In
Assert.notNull(dnPattern,"The array of DN patterns cannot be set to null");
@ -51,7 +52,6 @@ public class BindAuthenticator extends AbstractLdapAuthenticator {
@@ -51,7 +52,6 @@ public class BindAuthenticator extends AbstractLdapAuthenticator {
@ -62,37 +62,30 @@ public class BindAuthenticator extends AbstractLdapAuthenticator {
@@ -62,37 +62,30 @@ public class BindAuthenticator extends AbstractLdapAuthenticator {
@ -105,26 +98,20 @@ public class BindAuthenticator extends AbstractLdapAuthenticator {
@@ -105,26 +98,20 @@ public class BindAuthenticator extends AbstractLdapAuthenticator {
@ -145,7 +132,6 @@ public class BindAuthenticator extends AbstractLdapAuthenticator {
@@ -145,7 +132,6 @@ public class BindAuthenticator extends AbstractLdapAuthenticator {
finally{
LdapUtils.closeContext(ctx);
}
returnnull;
}
@ -155,9 +141,7 @@ public class BindAuthenticator extends AbstractLdapAuthenticator {
@@ -155,9 +141,7 @@ public class BindAuthenticator extends AbstractLdapAuthenticator {
@ -173,23 +173,21 @@ public class LdapAuthenticationProvider extends AbstractLdapAuthenticationProvid
@@ -173,23 +173,21 @@ public class LdapAuthenticationProvider extends AbstractLdapAuthenticationProvid
@ -66,13 +67,10 @@ public final class PasswordComparisonAuthenticator extends AbstractLdapAuthentic
@@ -66,13 +67,10 @@ public final class PasswordComparisonAuthenticator extends AbstractLdapAuthentic
@ -83,24 +81,20 @@ public final class PasswordComparisonAuthenticator extends AbstractLdapAuthentic
@@ -83,24 +81,20 @@ public final class PasswordComparisonAuthenticator extends AbstractLdapAuthentic
break;
}
}
if(user==null&&getUserSearch()!=null){
user=getUserSearch().searchForUser(username);
}
if(user==null){
thrownewUsernameNotFoundException("User not found: "+username);
}
if(logger.isDebugEnabled()){
logger.debug("Performing LDAP compare of password attribute '"+this.passwordAttributeName+"' for user '"
+user.getDn()+"'");
logger.debug(LogMessage.format("Performing LDAP compare of password attribute '%s' for user '%s'",
@ -47,28 +47,21 @@ public class SpringSecurityAuthenticationSource implements AuthenticationSource
@@ -47,28 +47,21 @@ public class SpringSecurityAuthenticationSource implements AuthenticationSource
log.debug("Anonymous Authentication, returning empty String as Principal");
return"";
}
else{
thrownewIllegalArgumentException(
"The principal property of the authentication object"+"needs to be an LdapUserDetails.");
}
thrownewIllegalArgumentException(
"The principal property of the authentication object"+"needs to be an LdapUserDetails.");
}
/**
@ -77,12 +70,10 @@ public class SpringSecurityAuthenticationSource implements AuthenticationSource
@@ -77,12 +70,10 @@ public class SpringSecurityAuthenticationSource implements AuthenticationSource
@ -161,7 +163,6 @@ public final class ActiveDirectoryLdapAuthenticationProvider extends AbstractLda
@@ -161,7 +163,6 @@ public final class ActiveDirectoryLdapAuthenticationProvider extends AbstractLda
Stringusername=auth.getName();
Stringpassword=(String)auth.getCredentials();
DirContextctx=null;
try{
ctx=bindAsUser(username,password);
returnsearchForUser(ctx,username);
@ -186,30 +187,23 @@ public final class ActiveDirectoryLdapAuthenticationProvider extends AbstractLda
@@ -186,30 +187,23 @@ public final class ActiveDirectoryLdapAuthenticationProvider extends AbstractLda
@ -219,7 +213,6 @@ public final class ActiveDirectoryLdapAuthenticationProvider extends AbstractLda
@@ -219,7 +213,6 @@ public final class ActiveDirectoryLdapAuthenticationProvider extends AbstractLda
@ -228,28 +221,20 @@ public final class ActiveDirectoryLdapAuthenticationProvider extends AbstractLda
@@ -228,28 +221,20 @@ public final class ActiveDirectoryLdapAuthenticationProvider extends AbstractLda
@ -264,12 +249,10 @@ public final class ActiveDirectoryLdapAuthenticationProvider extends AbstractLda
@@ -264,12 +249,10 @@ public final class ActiveDirectoryLdapAuthenticationProvider extends AbstractLda
}
privateintparseSubErrorCode(Stringmessage){
Matcherm=SUB_ERROR_CODE.matcher(message);
if(m.matches()){
returnInteger.parseInt(m.group(1),16);
Matchermatcher=SUB_ERROR_CODE.matcher(message);
if(matcher.matches()){
returnInteger.parseInt(matcher.group(1),16);
}
return-1;
}
@ -313,7 +296,6 @@ public final class ActiveDirectoryLdapAuthenticationProvider extends AbstractLda
@@ -313,7 +296,6 @@ public final class ActiveDirectoryLdapAuthenticationProvider extends AbstractLda
@ -334,7 +316,6 @@ public final class ActiveDirectoryLdapAuthenticationProvider extends AbstractLda
@@ -334,7 +316,6 @@ public final class ActiveDirectoryLdapAuthenticationProvider extends AbstractLda
@ -342,45 +323,40 @@ public final class ActiveDirectoryLdapAuthenticationProvider extends AbstractLda
@@ -342,45 +323,40 @@ public final class ActiveDirectoryLdapAuthenticationProvider extends AbstractLda
@ -388,7 +364,6 @@ public final class ActiveDirectoryLdapAuthenticationProvider extends AbstractLda
@@ -388,7 +364,6 @@ public final class ActiveDirectoryLdapAuthenticationProvider extends AbstractLda
@ -49,45 +50,30 @@ public class PasswordPolicyAwareContextSource extends DefaultSpringSecurityConte
@@ -49,45 +50,30 @@ public class PasswordPolicyAwareContextSource extends DefaultSpringSecurityConte
if(principal.equals(this.userDn)){
returnsuper.getContext(principal,credentials);
}
finalbooleandebug=this.logger.isDebugEnabled();
if(debug){
this.logger.debug("Binding as '"+this.userDn+"', prior to reconnect as user '"+principal+"'");
}
this.logger
.debug(LogMessage.format("Binding as '%s', prior to reconnect as user '%s'",this.userDn,principal));
// First bind as manager user before rebinding as the specific principal.
this.logger.debug("PPolicy control returned: "+PasswordPolicyControlExtractor.extractControl(ctx));
throwLdapUtils.convertLdapException(ex);
}
this.logger.debug(
LogMessage.of(()->"PPolicy control returned: "+PasswordPolicyControlExtractor.extractControl(ctx)));
returnctx;
}
@ -95,9 +81,7 @@ public class PasswordPolicyAwareContextSource extends DefaultSpringSecurityConte
@@ -95,9 +81,7 @@ public class PasswordPolicyAwareContextSource extends DefaultSpringSecurityConte
@ -39,7 +39,6 @@ public class PasswordPolicyControlFactory extends ControlFactory {
@@ -39,7 +39,6 @@ public class PasswordPolicyControlFactory extends ControlFactory {
@ -77,10 +77,7 @@ public class PasswordPolicyResponseControl extends PasswordPolicyControl {
@@ -77,10 +77,7 @@ public class PasswordPolicyResponseControl extends PasswordPolicyControl {
@ -162,23 +159,18 @@ public class PasswordPolicyResponseControl extends PasswordPolicyControl {
@@ -162,23 +159,18 @@ public class PasswordPolicyResponseControl extends PasswordPolicyControl {
sb.append(", warning: time before expiration is ").append(this.timeBeforeExpiration);
}
if(!hasError()&&!hasWarning()){
sb.append(" (no error, no warning)");
}
returnsb.toString();
}
@ -198,24 +190,17 @@ public class PasswordPolicyResponseControl extends PasswordPolicyControl {
@@ -198,24 +190,17 @@ public class PasswordPolicyResponseControl extends PasswordPolicyControl {
@ -241,19 +226,15 @@ public class PasswordPolicyResponseControl extends PasswordPolicyControl {
@@ -241,19 +226,15 @@ public class PasswordPolicyResponseControl extends PasswordPolicyControl {
boolean[]implicit)throwsIOException{
tag&=0x1F;
implicit[0]=false;
if(tag==0){
// Either the choice or the time before expiry within it
if(this.inChoice==null){
setInChoice(true);
// Read the choice length from the stream (ignored)
@ -267,7 +248,6 @@ public class PasswordPolicyResponseControl extends PasswordPolicyControl {
@@ -267,7 +248,6 @@ public class PasswordPolicyResponseControl extends PasswordPolicyControl {
if(this.inChoice==null){
// The enumeration
setInChoice(false);
returnnewBEREnumerated(stream,bytesRead);
}
else{
@ -277,7 +257,6 @@ public class PasswordPolicyResponseControl extends PasswordPolicyControl {
@@ -277,7 +257,6 @@ public class PasswordPolicyResponseControl extends PasswordPolicyControl {
}
}
}
thrownewDataRetrievalFailureException("Unexpected tag "+tag);
}
@ -289,67 +268,4 @@ public class PasswordPolicyResponseControl extends PasswordPolicyControl {
@@ -289,67 +268,4 @@ public class PasswordPolicyResponseControl extends PasswordPolicyControl {
}
/** Decoder based on the OpenLDAP/Novell JLDAP library */
// private class JLdapDecoder implements PPolicyDecoder {
@ -73,13 +74,10 @@ public class FilterBasedLdapUserSearch implements LdapUserSearch {
@@ -73,13 +74,10 @@ public class FilterBasedLdapUserSearch implements LdapUserSearch {
Assert.notNull(contextSource,"contextSource must not be null");
Assert.notNull(searchFilter,"searchFilter must not be null.");
Assert.notNull(searchBase,"searchBase must not be null (an empty string is acceptable).");
this.searchFilter=searchFilter;
this.contextSource=contextSource;
this.searchBase=searchBase;
setSearchSubtree(true);
if(searchBase.length()==0){
logger.info(
"SearchBase not set. Searches will be performed from the root: "+contextSource.getBaseLdapPath());
@ -95,26 +93,18 @@ public class FilterBasedLdapUserSearch implements LdapUserSearch {
@@ -95,26 +93,18 @@ public class FilterBasedLdapUserSearch implements LdapUserSearch {
thrownewUsernameNotFoundException("User "+username+" not found in directory.");
}
// Search should never return multiple results if properly configured, so just
// rethrow
thrownotFound;
// Search should never return multiple results if properly configured
throwex;
}
}
@ -161,7 +151,6 @@ public class FilterBasedLdapUserSearch implements LdapUserSearch {
@@ -161,7 +151,6 @@ public class FilterBasedLdapUserSearch implements LdapUserSearch {
@ -113,22 +113,12 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
@@ -113,22 +113,12 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
this.ldifResources=ldifs;
this.service=newDefaultDirectoryService();
List<Interceptor>list=newArrayList<>();
list.add(newNormalizationInterceptor());
list.add(newAuthenticationInterceptor());
list.add(newReferralInterceptor());
// list.add( new AciAuthorizationInterceptor() );
// list.add( new DefaultAuthorizationInterceptor() );
list.add(newExceptionInterceptor());
// list.add( new ChangeLogInterceptor() );
list.add(newOperationalAttributeInterceptor());
// list.add( new SchemaInterceptor() );
list.add(newSubentryInterceptor());
// list.add( new CollectiveAttributeInterceptor() );
// list.add( new EventInterceptor() );
// list.add( new TriggerInterceptor() );
// list.add( new JournalInterceptor() );
this.service.setInterceptors(list);
this.partition=newJdbmPartition();
this.partition.setId("rootPartition");
@ -145,21 +135,16 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
@@ -145,21 +135,16 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
"When LdapOverSsl is enabled, the keyStoreFile property must be set.");
this.server=newLdapServer();
this.server.setDirectoryService(this.service);
// AbstractLdapIntegrationTests assume IPv4, so we specify the same here
this.transport=newTcpTransport(this.port);
if(this.ldapOverSslEnabled){
this.transport.setEnableSSL(true);
@ -182,18 +167,13 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
@@ -182,18 +167,13 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
publicvoidsetWorkingDirectory(FileworkingDir){
Assert.notNull(workingDir,"workingDir cannot be null");
this.logger.info("Setting working directory for LDAP_PROVIDER: "+workingDir.getAbsolutePath());
if(workingDir.exists()){
thrownewIllegalArgumentException("The specified working directory '"+workingDir.getAbsolutePath()
+"' already exists. Another directory service instance may be using it or it may be from a "
+" previous unclean shutdown. Please confirm and delete it or configure a different "
+"working directory");
}
Assert.isTrue(!workingDir.exists(),
"The specified working directory '"+workingDir.getAbsolutePath()
+"' already exists. Another directory service instance may be using it or it may be from a "
+" previous unclean shutdown. Please confirm and delete it or configure a different "
+"working directory");
this.workingDir=workingDir;
this.service.setWorkingDirectory(workingDir);
}
@ -250,11 +230,7 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
@@ -250,11 +230,7 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
if(isRunning()){
return;
}
if(this.service.isStarted()){
thrownewIllegalStateException("DirectoryService is already running.");
}
Assert.state(!this.service.isStarted(),"DirectoryService is already running.");
this.logger.info("Starting directory server...");
try{
this.service.startup();
@ -263,7 +239,6 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
@@ -263,7 +239,6 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
@ -273,13 +248,10 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
@@ -273,13 +248,10 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
@ -308,7 +280,6 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
@@ -308,7 +280,6 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
if(!isRunning()){
return;
}
this.logger.info("Shutting down directory server ...");
try{
this.server.stop();
@ -318,9 +289,7 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
@@ -318,9 +289,7 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
this.logger.error("Shutdown failed",ex);
return;
}
this.running=false;
if(this.workingDir.exists()){
this.logger.info("Deleting working directory "+this.workingDir.getAbsolutePath());
deleteDir(this.workingDir);
@ -329,43 +298,31 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
@@ -329,43 +298,31 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
@ -373,7 +330,6 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
@@ -373,7 +330,6 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
@ -381,7 +337,6 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
@@ -381,7 +337,6 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
}
fileName=fileNamePrefix+"~"+i;
}
thrownewIOException(
"Failed to create a temporary directory for file at "+newFile(parentTempDir,fileNamePrefix));
}
@ -396,7 +351,6 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
@@ -396,7 +351,6 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
@ -161,21 +162,17 @@ public class DefaultLdapAuthoritiesPopulator implements LdapAuthoritiesPopulator
@@ -161,21 +162,17 @@ public class DefaultLdapAuthoritiesPopulator implements LdapAuthoritiesPopulator
@ -202,26 +199,17 @@ public class DefaultLdapAuthoritiesPopulator implements LdapAuthoritiesPopulator
@@ -202,26 +199,17 @@ public class DefaultLdapAuthoritiesPopulator implements LdapAuthoritiesPopulator
@ -229,26 +217,16 @@ public class DefaultLdapAuthoritiesPopulator implements LdapAuthoritiesPopulator
@@ -229,26 +217,16 @@ public class DefaultLdapAuthoritiesPopulator implements LdapAuthoritiesPopulator
if(getGroupSearchBase()==null){
returnnewHashSet<>();
}
Set<GrantedAuthority>authorities=newHashSet<>();
if(logger.isDebugEnabled()){
logger.debug("Searching for roles for user '"+username+"', DN = "+"'"+userDn+"', with filter "
+this.groupSearchFilter+" in search base '"+getGroupSearchBase()+"'");
}
logger.debug(LogMessage.of(()->"Searching for roles for user '"+username+"', DN = "+"'"+userDn
+"', with filter "+this.groupSearchFilter+" in search base '"+getGroupSearchBase()+"'"));
@ -33,10 +33,8 @@ public class InetOrgPersonContextMapper implements UserDetailsContextMapper {
@@ -33,10 +33,8 @@ public class InetOrgPersonContextMapper implements UserDetailsContextMapper {
@ -44,7 +42,6 @@ public class InetOrgPersonContextMapper implements UserDetailsContextMapper {
@@ -44,7 +42,6 @@ public class InetOrgPersonContextMapper implements UserDetailsContextMapper {
@ -100,17 +96,9 @@ public class LdapAuthority implements GrantedAuthority {
@@ -100,17 +96,9 @@ public class LdapAuthority implements GrantedAuthority {
*/
publicStringgetFirstAttributeValue(Stringname){
List<String>result=getAttributeValues(name);
if(result.isEmpty()){
returnnull;
}
else{
returnresult.get(0);
}
return(!result.isEmpty())?result.get(0):null;
}
/**
*{@inheritDoc}
*/
@Override
publicStringgetAuthority(){
returnthis.role;
@ -118,23 +106,21 @@ public class LdapAuthority implements GrantedAuthority {
@@ -118,23 +106,21 @@ public class LdapAuthority implements GrantedAuthority {
@ -154,11 +154,9 @@ public class LdapUserDetailsImpl implements LdapUserDetails, PasswordPolicyData
@@ -154,11 +154,9 @@ public class LdapUserDetailsImpl implements LdapUserDetails, PasswordPolicyData
@ -166,14 +164,12 @@ public class LdapUserDetailsImpl implements LdapUserDetails, PasswordPolicyData
@@ -166,14 +164,12 @@ public class LdapUserDetailsImpl implements LdapUserDetails, PasswordPolicyData
else{
sb.append(", ");
}
sb.append(authority.toString());
}
}
else{
sb.append("Not granted any authorities");
}
returnsb.toString();
}
@ -231,13 +227,9 @@ public class LdapUserDetailsImpl implements LdapUserDetails, PasswordPolicyData
@@ -231,13 +227,9 @@ public class LdapUserDetailsImpl implements LdapUserDetails, PasswordPolicyData
Assert.notNull(this.instance,"Essence can only be used to create a single instance");
Assert.notNull(this.instance.username,"username must not be null");
Assert.notNull(this.instance.getDn(),"Distinguished name must not be null");
@ -116,12 +117,9 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@@ -116,12 +117,9 @@ public class LdapUserDetailsManager implements UserDetailsManager {
/** Default context mapper used to create a set of roles from a list of attributes */
@ -137,11 +135,8 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@@ -137,11 +135,8 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@ -151,8 +146,8 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@@ -151,8 +146,8 @@ public class LdapUserDetailsManager implements UserDetailsManager {
thrownewUsernameNotFoundException("User "+username+" not found",notFound);
catch(NameNotFoundExceptionex){
thrownewUsernameNotFoundException("User "+username+" not found",ex);
}
});
}
@ -187,13 +182,9 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@@ -187,13 +182,9 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@ -214,13 +205,10 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@@ -214,13 +205,10 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@ -230,38 +218,28 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@@ -230,38 +218,28 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@ -269,9 +247,7 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@@ -269,9 +247,7 @@ public class LdapUserDetailsManager implements UserDetailsManager {
// Remove the old authorities and replace them with the new one
removeAuthorities(dn,authorities);
@ -288,7 +264,6 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@@ -288,7 +264,6 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@ -309,7 +284,6 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@@ -309,7 +284,6 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@ -333,7 +307,6 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@@ -333,7 +307,6 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@ -342,11 +315,9 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@@ -342,11 +315,9 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@ -419,15 +390,12 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@@ -419,15 +390,12 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@ -440,23 +408,17 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@@ -440,23 +408,17 @@ public class LdapUserDetailsManager implements UserDetailsManager {
catch(javax.naming.AuthenticationExceptionex){
thrownewBadCredentialsException("Authentication for password change failed.");
@ -493,19 +455,15 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@@ -493,19 +455,15 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@ -532,9 +490,7 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@@ -532,9 +490,7 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@ -560,7 +516,6 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@@ -560,7 +516,6 @@ public class LdapUserDetailsManager implements UserDetailsManager {
@ -53,56 +54,41 @@ public class LdapUserDetailsMapper implements UserDetailsContextMapper {
@@ -53,56 +54,41 @@ public class LdapUserDetailsMapper implements UserDetailsContextMapper {
@ -118,12 +104,10 @@ public class LdapUserDetailsMapper implements UserDetailsContextMapper {
@@ -118,12 +104,10 @@ public class LdapUserDetailsMapper implements UserDetailsContextMapper {
@ -57,7 +57,6 @@ public class LdapUserDetailsService implements UserDetailsService {
@@ -57,7 +57,6 @@ public class LdapUserDetailsService implements UserDetailsService {
@ -144,19 +145,13 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
@@ -144,19 +145,13 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
@ -171,34 +166,23 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
@@ -171,34 +166,23 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
@ -220,7 +204,6 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
@@ -220,7 +204,6 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
@ -33,18 +33,14 @@ public class PersonContextMapper implements UserDetailsContextMapper {
@@ -33,18 +33,14 @@ public class PersonContextMapper implements UserDetailsContextMapper {