+ ( mapper.getUserFilter() != null ? mapper.getUserFilter() : "" ) + "(" + mapper.getUserIdAttribute() + "="
+ source.getPrincipal() + "))";
- log.info( "Searching for users with filter: \'{}\'" + " from base dn: {}", filter, mapper.getUserBaseDn() );
+ log.info( "Searching for users with filter: '{}'" + " from base dn: {}", filter, mapper.getUserBaseDn() );
LdapConnection ldapConnection = getLdapConnection();
LdapConnection authLdapConnection = null;
}
}
- log.info( "Attempting Authenication: + {}", userDn );
+ log.info( "Attempting Authenication: {}", userDn );
authLdapConnection = connectionFactory.getConnection( userDn, source.getPassword() );
* under the License.
*/
-import org.apache.archiva.redback.authentication.Authenticator;
-import org.apache.archiva.redback.policy.AccountLockedException;
-import org.apache.archiva.redback.policy.PasswordEncoder;
-import org.apache.archiva.redback.policy.UserSecurityPolicy;
-import org.apache.archiva.redback.users.UserManager;
-import org.apache.archiva.redback.users.UserNotFoundException;
import org.apache.archiva.redback.authentication.AuthenticationConstants;
import org.apache.archiva.redback.authentication.AuthenticationDataSource;
import org.apache.archiva.redback.authentication.AuthenticationException;
import org.apache.archiva.redback.authentication.AuthenticationResult;
+import org.apache.archiva.redback.authentication.Authenticator;
import org.apache.archiva.redback.authentication.PasswordBasedAuthenticationDataSource;
+import org.apache.archiva.redback.policy.AccountLockedException;
import org.apache.archiva.redback.policy.MustChangePasswordException;
+import org.apache.archiva.redback.policy.PasswordEncoder;
import org.apache.archiva.redback.policy.PolicyViolationException;
+import org.apache.archiva.redback.policy.UserSecurityPolicy;
import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserManager;
+import org.apache.archiva.redback.users.UserNotFoundException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
* {@link Authenticator} implementation that uses a wrapped {@link UserManager} to authenticate.
*
* @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
- *
*/
-@Service( "authenticator#user-manager" )
+@Service ("authenticator#user-manager")
public class UserManagerAuthenticator
implements Authenticator
{
- private Logger log = LoggerFactory.getLogger( UserManagerAuthenticator.class );
+ private Logger log = LoggerFactory.getLogger( getClass() );
@Inject
- @Named( value = "userManager#jdo" )
+ @Named (value = "userManager#configurable")
private UserManager userManager;
@Inject
}
catch ( UserNotFoundException e )
{
- log.warn( "Login for user " + source.getPrincipal() + " failed. user not found." );
+ log.warn( "Login for user {} failed. user not found.", source.getPrincipal() );
resultException = e;
authnResultExceptionsMap.put( AuthenticationConstants.AUTHN_NO_SUCH_USER,
"Login for user \" + source.getPrincipal() + \" failed. user not found." );