Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use the getName() method of Principal rather than relying in toString().

  • Loading branch information...
commit 3c7bc48bedad21b50621953058c1e8e2f15a4cfb 1 parent 12f69c0
@darranl darranl authored kabir committed
View
2  security/src/main/java/org/jboss/as/security/service/SimpleSecurityManager.java
@@ -449,7 +449,7 @@ public void pop() {
private void audit(String level, AuditManager auditManager, Principal userPrincipal) {
AuditEvent auditEvent = new AuditEvent(AuditLevel.SUCCESS);
Map<String, Object> ctxMap = new HashMap<String, Object>();
- ctxMap.put("principal", userPrincipal != null ? userPrincipal : "null");
+ ctxMap.put("principal", userPrincipal != null ? userPrincipal.getName() : "null");
ctxMap.put("Source", getClass().getCanonicalName());
ctxMap.put("Action", "authentication");
auditEvent.setContextMap(ctxMap);
Please sign in to comment.
Something went wrong with that request. Please try again.