diff --git a/activemq-core/src/main/java/org/apache/activemq/security/JaasAuthenticationBroker.java b/activemq-core/src/main/java/org/apache/activemq/security/JaasAuthenticationBroker.java index 2172ded34e..2038c940e5 100644 --- a/activemq-core/src/main/java/org/apache/activemq/security/JaasAuthenticationBroker.java +++ b/activemq-core/src/main/java/org/apache/activemq/security/JaasAuthenticationBroker.java @@ -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 { diff --git a/activemq-core/src/main/java/org/apache/activemq/security/JaasCertificateAuthenticationBroker.java b/activemq-core/src/main/java/org/apache/activemq/security/JaasCertificateAuthenticationBroker.java index 9a4e52c687..37c43f891c 100644 --- a/activemq-core/src/main/java/org/apache/activemq/security/JaasCertificateAuthenticationBroker.java +++ b/activemq-core/src/main/java/org/apache/activemq/security/JaasCertificateAuthenticationBroker.java @@ -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); diff --git a/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationBroker.java b/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationBroker.java index cfb41d1486..f2c2ab7b1e 100644 --- a/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationBroker.java +++ b/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationBroker.java @@ -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());