summaryrefslogtreecommitdiffstats
path: root/redback-keys
diff options
context:
space:
mode:
Diffstat (limited to 'redback-keys')
-rw-r--r--redback-keys/redback-authentication-keys/src/main/java/org/apache/archiva/redback/authentication/keystore/KeyStoreAuthenticator.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/redback-keys/redback-authentication-keys/src/main/java/org/apache/archiva/redback/authentication/keystore/KeyStoreAuthenticator.java b/redback-keys/redback-authentication-keys/src/main/java/org/apache/archiva/redback/authentication/keystore/KeyStoreAuthenticator.java
index 66cb55838..f3d549f31 100644
--- a/redback-keys/redback-authentication-keys/src/main/java/org/apache/archiva/redback/authentication/keystore/KeyStoreAuthenticator.java
+++ b/redback-keys/redback-authentication-keys/src/main/java/org/apache/archiva/redback/authentication/keystore/KeyStoreAuthenticator.java
@@ -32,6 +32,7 @@ import org.apache.archiva.redback.policy.AccountLockedException;
import org.apache.archiva.redback.policy.MustChangePasswordException;
import org.apache.archiva.redback.users.User;
import org.apache.archiva.redback.users.UserManager;
+import org.apache.archiva.redback.users.UserManagerException;
import org.apache.archiva.redback.users.UserNotFoundException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -44,16 +45,16 @@ import javax.annotation.Resource;
*
* @author: Jesse McConnell <jesse@codehaus.org>
*/
-@Service ("authenticator#keystore")
+@Service("authenticator#keystore")
public class KeyStoreAuthenticator
implements Authenticator
{
private Logger log = LoggerFactory.getLogger( getClass() );
- @Resource (name = "keyManager#cached")
+ @Resource(name = "keyManager#cached")
private KeyManager keystore;
- @Resource (name = "userManager#configurable")
+ @Resource(name = "userManager#configurable")
private UserManager userManager;
public String getId()
@@ -107,6 +108,11 @@ public class KeyStoreAuthenticator
log.warn( "Login for user {} failed. user not found.", source.getPrincipal() );
return new AuthenticationResult( false, null, e );
}
+ catch ( UserManagerException e )
+ {
+ log.warn( "Login fail for user {} failed. message: {}", source.getPrincipal(), e.getMessage() );
+ return new AuthenticationResult( false, null, e );
+ }
}
public boolean supportsDataSource( AuthenticationDataSource source )