Author: mmoyses
Date: 2010-10-21 09:39:28 -0400 (Thu, 21 Oct 2010)
New Revision: 496
Modified:
trust/trunk/jbossws-native/src/main/java/org/picketlink/trust/jbossws/handler/SAML2Handler.java
Log:
fixing principal name setting
Modified:
trust/trunk/jbossws-native/src/main/java/org/picketlink/trust/jbossws/handler/SAML2Handler.java
===================================================================
---
trust/trunk/jbossws-native/src/main/java/org/picketlink/trust/jbossws/handler/SAML2Handler.java 2010-10-19
15:27:47 UTC (rev 495)
+++
trust/trunk/jbossws-native/src/main/java/org/picketlink/trust/jbossws/handler/SAML2Handler.java 2010-10-21
13:39:28 UTC (rev 496)
@@ -84,9 +84,14 @@
if (assertion != null)
{
SamlCredential credential = new SamlCredential(assertion);
+ if (log.isTraceEnabled())
+ {
+ log.trace("Assertion included in SOAP payload:");
+ log.trace(credential.getAssertionAsString());
+ }
Element subject = Util.findElement(assertion, new
QName(SAML2Constants.SAML2_ASSERTION_URI, "Subject"));
Element nameID = Util.findElement(subject, new
QName(SAML2Constants.SAML2_ASSERTION_URI, "NameID"));
- String username = nameID.getNodeValue();
+ String username = nameID.getTextContent();
// set SecurityContext
Subject s = new Subject();
SecurityContext sc = SecurityActions.createSecurityContext(new
PicketLinkPrincipal(username), credential, s);
Show replies by date