reduce logs
git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1412693 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1747f702c9
commit
d852fe3356
|
@ -98,7 +98,7 @@ public class LdapBindAuthenticator
|
|||
+ ( mapper.getUserFilter() != null ? mapper.getUserFilter() : "" ) + "(" + mapper.getUserIdAttribute() + "="
|
||||
+ source.getPrincipal() + "))";
|
||||
|
||||
log.info( "Searching for users with filter: '{}' from base dn: {}", filter, mapper.getUserBaseDn() );
|
||||
log.debug( "Searching for users with filter: '{}' from base dn: {}", filter, mapper.getUserBaseDn() );
|
||||
|
||||
LdapConnection ldapConnection = getLdapConnection();
|
||||
LdapConnection authLdapConnection = null;
|
||||
|
@ -116,7 +116,7 @@ public class LdapBindAuthenticator
|
|||
|
||||
results = context.search( mapper.getUserBaseDn(), filter, ctls );
|
||||
|
||||
log.info( "Found user?: {}", results.hasMoreElements() );
|
||||
log.debug( "Found user '{}': {}", source.getPrincipal(), results.hasMoreElements() );
|
||||
|
||||
if ( results.hasMoreElements() )
|
||||
{
|
||||
|
@ -135,10 +135,12 @@ public class LdapBindAuthenticator
|
|||
}
|
||||
}
|
||||
|
||||
log.info( "Attempting Authenication: {}", userDn );
|
||||
log.debug( "Attempting Authenication: {}", userDn );
|
||||
|
||||
authLdapConnection = connectionFactory.getConnection( userDn, source.getPassword() );
|
||||
|
||||
log.info( "user '{}' authenticated", source.getPrincipal() );
|
||||
|
||||
return new AuthenticationResult( true, source.getPrincipal(), null );
|
||||
}
|
||||
catch ( LdapException e )
|
||||
|
|
|
@ -144,7 +144,7 @@ public class DefaultLdapController
|
|||
String finalFilter = "(&(objectClass=" + mapper.getUserObjectClass() + ")" +
|
||||
( mapper.getUserFilter() != null ? mapper.getUserFilter() : "" ) + query.getLdapFilter(mapper) + ")";
|
||||
|
||||
log.info( "Searching for users with filter: \'{}\'" + " from base dn: {}",finalFilter, mapper.getUserBaseDn() );
|
||||
log.debug( "Searching for users with filter: '{}'" + " from base dn: {}",finalFilter, mapper.getUserBaseDn() );
|
||||
|
||||
return context.search( mapper.getUserBaseDn(), finalFilter, ctls );
|
||||
}
|
||||
|
@ -257,7 +257,8 @@ public class DefaultLdapController
|
|||
{
|
||||
String username = key.toString();
|
||||
|
||||
log.info( "Searching for user: {}", username );
|
||||
log.debug( "Searching for user: {}", username );
|
||||
|
||||
LdapUserQuery query = new LdapUserQuery();
|
||||
query.setUsername( username );
|
||||
|
||||
|
@ -270,6 +271,8 @@ public class DefaultLdapController
|
|||
{
|
||||
SearchResult next = result.nextElement();
|
||||
|
||||
log.info( "Found user: {}", username );
|
||||
|
||||
return mapper.getUser( next.getAttributes() );
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue