You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2013/04/02 12:55:22 UTC
svn commit: r1463478 - in /cxf/branches/wss4j2.0-port:
rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/
rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/
rt/ws/security/src/test/java/org/apache/cxf/ws/security/...
Author: coheigea
Date: Tue Apr 2 10:55:22 2013
New Revision: 1463478
URL: http://svn.apache.org/r1463478
Log:
Updating to work with latest principal refactoring code in WSS4J trunk
Modified:
cxf/branches/wss4j2.0-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
cxf/branches/wss4j2.0-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JTokenConverter.java
cxf/branches/wss4j2.0-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
cxf/branches/wss4j2.0-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java
cxf/branches/wss4j2.0-port/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultAttributeStatementProvider.java
cxf/branches/wss4j2.0-port/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java
cxf/branches/wss4j2.0-port/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/UsernameTokenValidator.java
cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomAttributeProvider.java
cxf/branches/wss4j2.0-port/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/server/CustomUTValidator.java
Modified: cxf/branches/wss4j2.0-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java?rev=1463478&r1=1463477&r2=1463478&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java (original)
+++ cxf/branches/wss4j2.0-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java Tue Apr 2 10:55:22 2013
@@ -44,7 +44,8 @@ import org.apache.cxf.ws.policy.Assertio
import org.apache.cxf.ws.security.SecurityConstants;
import org.apache.wss4j.common.ext.WSPasswordCallback;
import org.apache.wss4j.common.ext.WSSecurityException;
-import org.apache.wss4j.common.principal.WSUsernameTokenPrincipal;
+import org.apache.wss4j.common.principal.UsernameTokenPrincipal;
+import org.apache.wss4j.common.principal.WSUsernameTokenPrincipalImpl;
import org.apache.wss4j.dom.WSConstants;
import org.apache.wss4j.dom.WSDocInfo;
import org.apache.wss4j.dom.WSSConfig;
@@ -62,6 +63,8 @@ import org.apache.wss4j.policy.SPConstan
import org.apache.wss4j.policy.model.AbstractSecurityAssertion;
import org.apache.wss4j.policy.model.SupportingTokens;
import org.apache.wss4j.policy.model.UsernameToken;
+import org.apache.xml.security.exceptions.Base64DecodingException;
+import org.apache.xml.security.utils.Base64;
/**
*
@@ -83,7 +86,7 @@ public class UsernameTokenInterceptor ex
if (SPConstants.USERNAME_TOKEN.equals(child.getLocalName())
&& WSConstants.WSSE_NS.equals(child.getNamespaceURI())) {
try {
- final WSUsernameTokenPrincipal princ = getPrincipal(child, message);
+ final UsernameTokenPrincipal princ = getPrincipal(child, message);
if (princ != null) {
List<WSSecurityEngineResult>v = new ArrayList<WSSecurityEngineResult>();
int action = WSConstants.UT;
@@ -105,8 +108,12 @@ public class UsernameTokenInterceptor ex
SecurityContext sc = message.get(SecurityContext.class);
if (sc == null || sc.getUserPrincipal() == null) {
+ String nonce = null;
+ if (princ.getNonce() != null) {
+ nonce = Base64.encode(princ.getNonce());
+ }
Subject subject = createSubject(princ.getName(), princ.getPassword(),
- princ.isPasswordDigest(), princ.getNonce(), princ.getCreatedTime());
+ princ.isPasswordDigest(), nonce, princ.getCreatedTime());
message.put(SecurityContext.class,
createSecurityContext(princ, subject));
}
@@ -114,14 +121,16 @@ public class UsernameTokenInterceptor ex
}
} catch (WSSecurityException ex) {
throw new Fault(ex);
+ } catch (Base64DecodingException ex) {
+ throw new Fault(ex);
}
}
child = DOMUtils.getNextElement(child);
}
}
- protected WSUsernameTokenPrincipal getPrincipal(Element tokenElement, final SoapMessage message)
- throws WSSecurityException {
+ protected UsernameTokenPrincipal getPrincipal(Element tokenElement, final SoapMessage message)
+ throws WSSecurityException, Base64DecodingException {
boolean bspCompliant = isWsiBSPCompliant(message);
boolean utWithCallbacks =
@@ -159,22 +168,24 @@ public class UsernameTokenInterceptor ex
}
List<WSSecurityEngineResult> results =
p.handleToken(tokenElement, data, wsDocInfo);
- return (WSUsernameTokenPrincipal)results.get(0).get(WSSecurityEngineResult.TAG_PRINCIPAL);
+ return (UsernameTokenPrincipal)results.get(0).get(WSSecurityEngineResult.TAG_PRINCIPAL);
} else {
- WSUsernameTokenPrincipal principal = parseTokenAndCreatePrincipal(tokenElement, bspCompliant);
+ UsernameTokenPrincipal principal = parseTokenAndCreatePrincipal(tokenElement, bspCompliant);
WSS4JTokenConverter.convertToken(message, principal);
return principal;
}
}
- protected WSUsernameTokenPrincipal parseTokenAndCreatePrincipal(Element tokenElement, boolean bspCompliant)
- throws WSSecurityException {
+ protected UsernameTokenPrincipal parseTokenAndCreatePrincipal(Element tokenElement, boolean bspCompliant)
+ throws WSSecurityException, Base64DecodingException {
BSPEnforcer bspEnforcer = new BSPEnforcer(!bspCompliant);
org.apache.wss4j.dom.message.token.UsernameToken ut =
new org.apache.wss4j.dom.message.token.UsernameToken(tokenElement, false, bspEnforcer);
- WSUsernameTokenPrincipal principal = new WSUsernameTokenPrincipal(ut.getName(), ut.isHashed());
- principal.setNonce(ut.getNonce());
+ WSUsernameTokenPrincipalImpl principal = new WSUsernameTokenPrincipalImpl(ut.getName(), ut.isHashed());
+ if (ut.getNonce() != null) {
+ principal.setNonce(Base64.decode(ut.getNonce()));
+ }
principal.setPassword(ut.getPassword());
principal.setCreatedTime(ut.getCreated());
principal.setPasswordType(ut.getPasswordType());
@@ -241,7 +252,7 @@ public class UsernameTokenInterceptor ex
private UsernameToken assertTokens(
SoapMessage message,
- WSUsernameTokenPrincipal princ,
+ UsernameTokenPrincipal princ,
boolean signed
) {
AssertionInfoMap aim = message.get(AssertionInfoMap.class);
Modified: cxf/branches/wss4j2.0-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JTokenConverter.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JTokenConverter.java?rev=1463478&r1=1463477&r2=1463478&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JTokenConverter.java (original)
+++ cxf/branches/wss4j2.0-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JTokenConverter.java Tue Apr 2 10:55:22 2013
@@ -21,8 +21,9 @@ package org.apache.cxf.ws.security.wss4j
import java.security.Principal;
import org.apache.cxf.common.security.UsernameToken;
+import org.apache.cxf.common.util.Base64Utility;
import org.apache.cxf.message.Message;
-import org.apache.wss4j.common.principal.WSUsernameTokenPrincipal;
+import org.apache.wss4j.common.principal.UsernameTokenPrincipal;
public final class WSS4JTokenConverter {
@@ -31,14 +32,18 @@ public final class WSS4JTokenConverter {
}
public static void convertToken(Message msg, Principal p) {
- if (p instanceof WSUsernameTokenPrincipal) {
- WSUsernameTokenPrincipal utp = (WSUsernameTokenPrincipal)p;
+ if (p instanceof UsernameTokenPrincipal) {
+ UsernameTokenPrincipal utp = (UsernameTokenPrincipal)p;
+ String nonce = null;
+ if (utp.getNonce() != null) {
+ nonce = Base64Utility.encode(utp.getNonce());
+ }
msg.put(org.apache.cxf.common.security.SecurityToken.class,
new UsernameToken(utp.getName(),
utp.getPassword(),
utp.getPasswordType(),
utp.isPasswordDigest(),
- utp.getNonce(),
+ nonce,
utp.getCreatedTime()));
}
Modified: cxf/branches/wss4j2.0-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java?rev=1463478&r1=1463477&r2=1463478&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java (original)
+++ cxf/branches/wss4j2.0-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java Tue Apr 2 10:55:22 2013
@@ -86,7 +86,7 @@ import org.apache.wss4j.common.derivedKe
import org.apache.wss4j.common.derivedKey.ConversationException;
import org.apache.wss4j.common.ext.WSPasswordCallback;
import org.apache.wss4j.common.ext.WSSecurityException;
-import org.apache.wss4j.common.principal.WSUsernameTokenPrincipal;
+import org.apache.wss4j.common.principal.UsernameTokenPrincipal;
import org.apache.wss4j.common.saml.SAMLCallback;
import org.apache.wss4j.common.saml.SAMLUtil;
import org.apache.wss4j.common.saml.SamlAssertionWrapper;
@@ -1718,8 +1718,8 @@ public abstract class AbstractBindingBui
for (WSSecurityEngineResult wser : wsSecEngineResults) {
Integer actInt = (Integer)wser.get(WSSecurityEngineResult.TAG_ACTION);
if (actInt.intValue() == WSConstants.UT) {
- WSUsernameTokenPrincipal principal
- = (WSUsernameTokenPrincipal)wser.get(WSSecurityEngineResult.TAG_PRINCIPAL);
+ UsernameTokenPrincipal principal
+ = (UsernameTokenPrincipal)wser.get(WSSecurityEngineResult.TAG_PRINCIPAL);
return principal.getName();
}
}
Modified: cxf/branches/wss4j2.0-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java?rev=1463478&r1=1463477&r2=1463478&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java (original)
+++ cxf/branches/wss4j2.0-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java Tue Apr 2 10:55:22 2013
@@ -56,7 +56,7 @@ import org.apache.cxf.phase.Phase;
import org.apache.cxf.phase.PhaseInterceptor;
import org.apache.cxf.phase.PhaseInterceptorChain;
import org.apache.cxf.staxutils.StaxUtils;
-import org.apache.wss4j.common.principal.WSUsernameTokenPrincipal;
+import org.apache.wss4j.common.principal.UsernameTokenPrincipal;
import org.apache.wss4j.dom.WSConstants;
import org.apache.wss4j.dom.WSDataRef;
import org.apache.wss4j.dom.WSSecurityEngineResult;
@@ -243,9 +243,9 @@ public class WSS4JInOutTest extends Abst
final Principal p1 = (Principal)protectionResults.get(0).get(WSSecurityEngineResult.TAG_PRINCIPAL);
final Principal p2 = (Principal)protectionResults.get(1).get(WSSecurityEngineResult.TAG_PRINCIPAL);
- assertTrue(p1 instanceof WSUsernameTokenPrincipal || p2 instanceof WSUsernameTokenPrincipal);
+ assertTrue(p1 instanceof UsernameTokenPrincipal || p2 instanceof UsernameTokenPrincipal);
- Principal utPrincipal = p1 instanceof WSUsernameTokenPrincipal ? p1 : p2;
+ Principal utPrincipal = p1 instanceof UsernameTokenPrincipal ? p1 : p2;
Principal secContextPrincipal = (Principal)inmsg.get(WSS4JInInterceptor.PRINCIPAL_RESULT);
assertSame(secContextPrincipal, utPrincipal);
Modified: cxf/branches/wss4j2.0-port/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultAttributeStatementProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultAttributeStatementProvider.java?rev=1463478&r1=1463477&r2=1463478&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultAttributeStatementProvider.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultAttributeStatementProvider.java Tue Apr 2 10:55:22 2013
@@ -30,6 +30,7 @@ import org.apache.cxf.ws.security.sts.pr
import org.apache.cxf.ws.security.sts.provider.model.secext.UsernameTokenType;
import org.apache.wss4j.common.ext.WSSecurityException;
import org.apache.wss4j.common.principal.SAMLTokenPrincipal;
+import org.apache.wss4j.common.principal.SAMLTokenPrincipalImpl;
import org.apache.wss4j.common.saml.SamlAssertionWrapper;
import org.apache.wss4j.common.saml.bean.AttributeBean;
import org.apache.wss4j.common.saml.bean.AttributeStatementBean;
@@ -124,7 +125,7 @@ public class DefaultAttributeStatementPr
);
} else if (parameter instanceof Element) {
SamlAssertionWrapper wrapper = new SamlAssertionWrapper((Element)parameter);
- SAMLTokenPrincipal principal = new SAMLTokenPrincipal(wrapper);
+ SAMLTokenPrincipal principal = new SAMLTokenPrincipalImpl(wrapper);
parameterBean.setAttributeValues(Collections.singletonList(principal.getName()));
}
Modified: cxf/branches/wss4j2.0-port/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java?rev=1463478&r1=1463477&r2=1463478&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java Tue Apr 2 10:55:22 2013
@@ -44,6 +44,7 @@ import org.apache.cxf.ws.security.tokens
import org.apache.wss4j.common.crypto.Crypto;
import org.apache.wss4j.common.ext.WSSecurityException;
import org.apache.wss4j.common.principal.SAMLTokenPrincipal;
+import org.apache.wss4j.common.principal.SAMLTokenPrincipalImpl;
import org.apache.wss4j.common.saml.SAMLKeyInfo;
import org.apache.wss4j.common.saml.SAMLUtil;
import org.apache.wss4j.common.saml.SamlAssertionWrapper;
@@ -145,7 +146,7 @@ public class SAMLTokenValidator implemen
Element validateTargetElement = (Element)validateTarget.getToken();
SamlAssertionWrapper assertion = new SamlAssertionWrapper(validateTargetElement);
- SAMLTokenPrincipal samlPrincipal = new SAMLTokenPrincipal(assertion);
+ SAMLTokenPrincipal samlPrincipal = new SAMLTokenPrincipalImpl(assertion);
response.setPrincipal(samlPrincipal);
SecurityToken secToken = null;
Modified: cxf/branches/wss4j2.0-port/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/UsernameTokenValidator.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/UsernameTokenValidator.java?rev=1463478&r1=1463477&r2=1463478&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/UsernameTokenValidator.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/UsernameTokenValidator.java Tue Apr 2 10:55:22 2013
@@ -50,7 +50,7 @@ import org.apache.cxf.ws.security.tokens
import org.apache.wss4j.common.crypto.Crypto;
import org.apache.wss4j.common.ext.WSSecurityException;
import org.apache.wss4j.common.principal.CustomTokenPrincipal;
-import org.apache.wss4j.common.principal.WSUsernameTokenPrincipal;
+import org.apache.wss4j.common.principal.WSUsernameTokenPrincipalImpl;
import org.apache.wss4j.dom.WSConstants;
import org.apache.wss4j.dom.WSSConfig;
import org.apache.wss4j.dom.bsp.BSPEnforcer;
@@ -58,6 +58,8 @@ import org.apache.wss4j.dom.handler.Requ
import org.apache.wss4j.dom.message.token.UsernameToken;
import org.apache.wss4j.dom.validate.Credential;
import org.apache.wss4j.dom.validate.Validator;
+import org.apache.xml.security.exceptions.Base64DecodingException;
+import org.apache.xml.security.utils.Base64;
/**
* This class validates a wsse UsernameToken.
@@ -227,6 +229,8 @@ public class UsernameTokenValidator impl
validateTarget.setState(STATE.VALID);
} catch (WSSecurityException ex) {
LOG.log(Level.WARNING, "", ex);
+ } catch (Base64DecodingException ex) {
+ LOG.log(Level.WARNING, "", ex);
}
return response;
@@ -234,6 +238,7 @@ public class UsernameTokenValidator impl
/**
* Create a principal based on the authenticated UsernameToken.
+ * @throws Base64DecodingException
*/
private Principal createPrincipal(
String username,
@@ -241,13 +246,13 @@ public class UsernameTokenValidator impl
String passwordType,
String nonce,
String createdTime
- ) {
+ ) throws Base64DecodingException {
boolean hashed = false;
if (WSConstants.PASSWORD_DIGEST.equals(passwordType)) {
hashed = true;
}
- WSUsernameTokenPrincipal principal = new WSUsernameTokenPrincipal(username, hashed);
- principal.setNonce(nonce);
+ WSUsernameTokenPrincipalImpl principal = new WSUsernameTokenPrincipalImpl(username, hashed);
+ principal.setNonce(Base64.decode(nonce));
principal.setPassword(passwordValue);
principal.setCreatedTime(createdTime);
principal.setPasswordType(passwordType);
Modified: cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomAttributeProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomAttributeProvider.java?rev=1463478&r1=1463477&r2=1463478&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomAttributeProvider.java (original)
+++ cxf/branches/wss4j2.0-port/services/sts/sts-core/src/test/java/org/apache/cxf/sts/common/CustomAttributeProvider.java Tue Apr 2 10:55:22 2013
@@ -37,6 +37,7 @@ import org.apache.cxf.ws.security.sts.pr
import org.apache.cxf.ws.security.sts.provider.model.secext.UsernameTokenType;
import org.apache.wss4j.common.ext.WSSecurityException;
import org.apache.wss4j.common.principal.SAMLTokenPrincipal;
+import org.apache.wss4j.common.principal.SAMLTokenPrincipalImpl;
import org.apache.wss4j.common.saml.SamlAssertionWrapper;
import org.apache.wss4j.common.saml.bean.AttributeBean;
import org.apache.wss4j.common.saml.bean.AttributeStatementBean;
@@ -163,7 +164,7 @@ public class CustomAttributeProvider imp
);
} else if (parameter instanceof Element) {
SamlAssertionWrapper wrapper = new SamlAssertionWrapper((Element)parameter);
- SAMLTokenPrincipal principal = new SAMLTokenPrincipal(wrapper);
+ SAMLTokenPrincipal principal = new SAMLTokenPrincipalImpl(wrapper);
parameterBean.setAttributeValues(Collections.singletonList(principal.getName()));
}
Modified: cxf/branches/wss4j2.0-port/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/server/CustomUTValidator.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/server/CustomUTValidator.java?rev=1463478&r1=1463477&r2=1463478&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/server/CustomUTValidator.java (original)
+++ cxf/branches/wss4j2.0-port/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/server/CustomUTValidator.java Tue Apr 2 10:55:22 2013
@@ -23,7 +23,7 @@ import javax.security.auth.Subject;
import org.apache.cxf.common.security.SimpleGroup;
import org.apache.wss4j.common.ext.WSSecurityException;
-import org.apache.wss4j.common.principal.WSUsernameTokenPrincipal;
+import org.apache.wss4j.common.principal.WSUsernameTokenPrincipalImpl;
import org.apache.wss4j.dom.handler.RequestData;
import org.apache.wss4j.dom.message.token.UsernameToken;
import org.apache.wss4j.dom.validate.Credential;
@@ -40,8 +40,8 @@ public class CustomUTValidator extends U
Credential cred = super.validate(credential, data);
UsernameToken ut = credential.getUsernametoken();
- WSUsernameTokenPrincipal principal =
- new WSUsernameTokenPrincipal(ut.getName(), ut.isHashed());
+ WSUsernameTokenPrincipalImpl principal =
+ new WSUsernameTokenPrincipalImpl(ut.getName(), ut.isHashed());
principal.setCreatedTime(ut.getCreated());
principal.setNonce(principal.getNonce());
principal.setPassword(ut.getPassword());