summaryrefslogtreecommitdiffstats
path: root/redback-keys
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-12-10 16:34:46 +0000
committerOlivier Lamy <olamy@apache.org>2012-12-10 16:34:46 +0000
commit30c1cfa2a4583ac63b02482776880edea0470296 (patch)
tree2ee94e254f46c3069abb5da489bcf29a52043e4d /redback-keys
parente0dc1a19660ebdac272d3ef7a09c2122fee4000e (diff)
downloadarchiva-30c1cfa2a4583ac63b02482776880edea0470296.tar.gz
archiva-30c1cfa2a4583ac63b02482776880edea0470296.zip
UserManagerException is now a checked Exception
git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1419568 13f79535-47bb-0310-9956-ffa450edef68
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 )