git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1175855 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2011-09-26 13:14:45 +00:00
parent 8976a6b973
commit 2a0b4893c6
3 changed files with 3 additions and 3 deletions

View File

@ -80,7 +80,7 @@ public class JaasAuthenticationBroker extends BrokerFilter {
context.setSecurityContext(s);
securityContexts.add(s);
} catch (Exception e) {
throw (SecurityException)new SecurityException("User name or password is invalid.")
throw (SecurityException)new SecurityException("User name [" + info.getUserName() + "] or password is invalid.")
.initCause(e);
}
} finally {

View File

@ -99,7 +99,7 @@ public class JaasCertificateAuthenticationBroker extends BrokerFilter {
SecurityContext s = new JaasCertificateSecurityContext(dnName, subject, (X509Certificate[])info.getTransportContext());
context.setSecurityContext(s);
} catch (Exception e) {
throw new SecurityException("User name or password is invalid: " + e.getMessage(), e);
throw new SecurityException("User name [" + info.getUserName() + "] or password is invalid. " + e.getMessage(), e);
}
} finally {
Thread.currentThread().setContextClassLoader(original);

View File

@ -78,7 +78,7 @@ public class SimpleAuthenticationBroker extends BrokerFilter {
String pw = (String) userPasswords.get(info.getUserName());
if (pw == null || !pw.equals(info.getPassword())) {
throw new SecurityException(
"User name or password is invalid.");
"User name [" + info.getUserName() + "] or password is invalid.");
}
final Set groups = (Set) userGroups.get(info.getUserName());