From 2a0b4893c6b80423b74fbcf6c4173ae8666600c1 Mon Sep 17 00:00:00 2001 From: "Timothy A. Bish" Date: Mon, 26 Sep 2011 13:14:45 +0000 Subject: [PATCH] apply patch for: https://issues.apache.org/jira/browse/AMQ-3509 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1175855 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/activemq/security/JaasAuthenticationBroker.java | 2 +- .../activemq/security/JaasCertificateAuthenticationBroker.java | 2 +- .../apache/activemq/security/SimpleAuthenticationBroker.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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());