mirror of https://github.com/apache/activemq.git
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
This commit is contained in:
parent
8976a6b973
commit
2a0b4893c6
|
@ -80,7 +80,7 @@ public class JaasAuthenticationBroker extends BrokerFilter {
|
||||||
context.setSecurityContext(s);
|
context.setSecurityContext(s);
|
||||||
securityContexts.add(s);
|
securityContexts.add(s);
|
||||||
} catch (Exception e) {
|
} 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);
|
.initCause(e);
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -99,7 +99,7 @@ public class JaasCertificateAuthenticationBroker extends BrokerFilter {
|
||||||
SecurityContext s = new JaasCertificateSecurityContext(dnName, subject, (X509Certificate[])info.getTransportContext());
|
SecurityContext s = new JaasCertificateSecurityContext(dnName, subject, (X509Certificate[])info.getTransportContext());
|
||||||
context.setSecurityContext(s);
|
context.setSecurityContext(s);
|
||||||
} catch (Exception e) {
|
} 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 {
|
} finally {
|
||||||
Thread.currentThread().setContextClassLoader(original);
|
Thread.currentThread().setContextClassLoader(original);
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class SimpleAuthenticationBroker extends BrokerFilter {
|
||||||
String pw = (String) userPasswords.get(info.getUserName());
|
String pw = (String) userPasswords.get(info.getUserName());
|
||||||
if (pw == null || !pw.equals(info.getPassword())) {
|
if (pw == null || !pw.equals(info.getPassword())) {
|
||||||
throw new SecurityException(
|
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());
|
final Set groups = (Set) userGroups.get(info.getUserName());
|
||||||
|
|
Loading…
Reference in New Issue