cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1303726 - in /cxf/trunk/services/sts: sts-core/src/main/java/org/apache/cxf/sts/operation/ sts-core/src/main/java/org/apache/cxf/sts/request/ sts-core/src/main/java/org/apache/cxf/sts/token/canceller/ sts-core/src/main/java/org/apache/cxf/...
Date Thu, 22 Mar 2012 10:54:30 GMT
Author: coheigea
Date: Thu Mar 22 10:54:29 2012
New Revision: 1303726

URL: http://svn.apache.org/viewvc?rev=1303726&view=rev
Log:
Added a CANCELLED state to ReceivedToken

Modified:
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenCancelOperation.java
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenIssueOperation.java
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenValidateOperation.java
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/ReceivedToken.java
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/SCTCanceller.java
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/TokenCancellerParameters.java
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/TokenCancellerResponse.java
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultSubjectProvider.java
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SCTValidator.java
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/UsernameTokenValidator.java
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/X509TokenValidator.java
    cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/DummyTokenValidator.java
    cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/canceller/SCTCancellerTest.java
    cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderOnBehalfOfTest.java
    cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorCachedRealmTest.java
    cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorRealmTest.java
    cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorTest.java
    cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SCTValidatorTest.java
    cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/UsernameTokenValidatorTest.java
    cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/X509TokenValidatorTest.java
    cxf/trunk/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenValidator.java
    cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameTokenValidator.java

Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java
Thu Mar 22 10:54:29 2012
@@ -525,7 +525,7 @@ public abstract class AbstractOperation 
     protected TokenValidatorResponse validateReceivedToken(
             WebServiceContext context, String realm,
             TokenRequirements tokenRequirements, ReceivedToken token) {
-        token.setValidationState(STATE.NONE);
+        token.setState(STATE.NONE);
         
         TokenRequirements validateRequirements = new TokenRequirements();
         validateRequirements.setValidateTarget(token);
@@ -556,7 +556,7 @@ public abstract class AbstractOperation 
                     token.setPrincipal(tokenResponse.getPrincipal());
                 } catch (RuntimeException ex) {
                     LOG.log(Level.WARNING, "Failed to validate the token", ex);
-                    token.setValidationState(STATE.INVALID);
+                    token.setState(STATE.INVALID);
                 }
                 break;
             }

Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenCancelOperation.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenCancelOperation.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenCancelOperation.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenCancelOperation.java
Thu Mar 22 10:54:29 2012
@@ -32,6 +32,7 @@ import org.apache.cxf.sts.QNameConstants
 import org.apache.cxf.sts.STSConstants;
 import org.apache.cxf.sts.request.KeyRequirements;
 import org.apache.cxf.sts.request.ReceivedToken;
+import org.apache.cxf.sts.request.ReceivedToken.STATE;
 import org.apache.cxf.sts.request.RequestParser;
 import org.apache.cxf.sts.request.TokenRequirements;
 import org.apache.cxf.sts.token.canceller.TokenCanceller;
@@ -102,6 +103,7 @@ public class TokenCancelOperation extend
         
         cancellerParameters.setKeyRequirements(keyRequirements);
         cancellerParameters.setTokenRequirements(tokenRequirements);   
+        cancellerParameters.setToken(cancelTarget);
         
         //
         // Cancel token
@@ -120,7 +122,7 @@ public class TokenCancelOperation extend
                 break;
             }
         }
-        if (tokenResponse == null) {
+        if (tokenResponse == null || tokenResponse.getToken() == null) {
             LOG.fine("No Token Canceller has been found that can handle this token");
             throw new STSException(
                 "No token canceller found for requested token type: " 
@@ -129,7 +131,7 @@ public class TokenCancelOperation extend
             );
         }
         
-        if (!tokenResponse.isTokenCancelled()) {
+        if (tokenResponse.getToken().getState() != STATE.CANCELLED) {
             LOG.log(Level.WARNING, "Token cancellation failed.");
             throw new STSException("Token cancellation failed.");
         }

Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenIssueOperation.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenIssueOperation.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenIssueOperation.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenIssueOperation.java
Thu Mar 22 10:54:29 2012
@@ -115,7 +115,7 @@ public class TokenIssueOperation extends
             if (tokenResponse == null) {
                 LOG.fine("No Token Validator has been found that can handle this token");
 
-            } else if (validateTarget.getValidationState().equals(STATE.VALID)) {
+            } else if (validateTarget.getState().equals(STATE.VALID)) {
                 processValidToken(providerParameters, validateTarget, tokenResponse); 
             } else {
                 //[TODO] Add plugin for validation out-of-band

Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenValidateOperation.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenValidateOperation.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenValidateOperation.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenValidateOperation.java
Thu Mar 22 10:54:29 2012
@@ -105,7 +105,7 @@ public class TokenValidateOperation exte
         if (tokenResponse == null) {
             LOG.fine("No Token Validator has been found that can handle this token");
             tokenResponse = new TokenValidatorResponse();
-            validateTarget.setValidationState(STATE.INVALID);
+            validateTarget.setState(STATE.INVALID);
             tokenResponse.setToken(validateTarget);
         }
         
@@ -114,7 +114,7 @@ public class TokenValidateOperation exte
         //
         TokenProviderResponse tokenProviderResponse = null;
         String tokenType = tokenRequirements.getTokenType();
-        if (tokenResponse.getToken().getValidationState() == STATE.VALID 
+        if (tokenResponse.getToken().getState() == STATE.VALID 
             && !STSConstants.STATUS.equals(tokenType)) {
             TokenProviderParameters providerParameters = 
                  createTokenProviderParameters(requestParser, context);
@@ -185,7 +185,7 @@ public class TokenValidateOperation exte
         }
         
         // TokenType
-        boolean valid = tokenResponse.getToken().getValidationState() == STATE.VALID;
+        boolean valid = tokenResponse.getToken().getState() == STATE.VALID;
         String tokenType = tokenRequirements.getTokenType();
         if (valid || STSConstants.STATUS.equals(tokenType)) {
             JAXBElement<String> jaxbTokenType = 

Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/ReceivedToken.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/ReceivedToken.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/ReceivedToken.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/ReceivedToken.java
Thu Mar 22 10:54:29 2012
@@ -43,10 +43,10 @@ public class ReceivedToken {
     private boolean isUsernameToken;
     private boolean isDOMElement;
     private String tokenContext; // WS-Security, OnBehalfOf, ActAs
-    private STATE validationState;
+    private STATE state = STATE.NONE;
     private Principal principal;
     
-    public enum STATE { VALID, INVALID, NONE };
+    public enum STATE { VALID, INVALID, CANCELLED, NONE };
     
     public ReceivedToken(Object receivedToken) throws STSException {
         if (receivedToken instanceof JAXBElement<?>) {
@@ -118,12 +118,12 @@ public class ReceivedToken {
         this.tokenContext = tokenContext;
     }
 
-    public STATE getValidationState() {
-        return validationState;
+    public STATE getState() {
+        return state;
     }
 
-    public void setValidationState(STATE validationState) {
-        this.validationState = validationState;
+    public void setState(STATE state) {
+        this.state = state;
     }
 
     public Principal getPrincipal() {

Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/SCTCanceller.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/SCTCanceller.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/SCTCanceller.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/SCTCanceller.java
Thu Mar 22 10:54:29 2012
@@ -31,7 +31,7 @@ import org.w3c.dom.Element;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.sts.request.ReceivedToken;
-import org.apache.cxf.sts.request.TokenRequirements;
+import org.apache.cxf.sts.request.ReceivedToken.STATE;
 import org.apache.cxf.ws.security.sts.provider.STSException;
 import org.apache.cxf.ws.security.tokenstore.SecurityToken;
 import org.apache.cxf.ws.security.trust.STSUtils;
@@ -76,11 +76,10 @@ public class SCTCanceller implements Tok
      */
     public TokenCancellerResponse cancelToken(TokenCancellerParameters tokenParameters) {
         LOG.fine("Trying to cancel a SecurityContextToken");
-        TokenRequirements tokenRequirements = tokenParameters.getTokenRequirements();
-        ReceivedToken cancelTarget = tokenRequirements.getCancelTarget();
-
         TokenCancellerResponse response = new TokenCancellerResponse();
-        response.setTokenCancelled(false);
+        ReceivedToken cancelTarget = tokenParameters.getToken();
+        cancelTarget.setState(STATE.NONE);
+        response.setToken(cancelTarget);
         
         if (tokenParameters.getTokenStore() == null) {
             LOG.log(Level.FINE, "A cache must be configured to use the SCTCanceller");
@@ -105,7 +104,7 @@ public class SCTCanceller implements Tok
                     );
                 }
                 tokenParameters.getTokenStore().remove(token);
-                response.setTokenCancelled(true);
+                cancelTarget.setState(STATE.CANCELLED);
             } catch (WSSecurityException ex) {
                 LOG.log(Level.WARNING, "", ex);
             }

Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/TokenCancellerParameters.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/TokenCancellerParameters.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/TokenCancellerParameters.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/TokenCancellerParameters.java
Thu Mar 22 10:54:29 2012
@@ -25,6 +25,7 @@ import javax.xml.ws.WebServiceContext;
 
 import org.apache.cxf.sts.STSPropertiesMBean;
 import org.apache.cxf.sts.request.KeyRequirements;
+import org.apache.cxf.sts.request.ReceivedToken;
 import org.apache.cxf.sts.request.TokenRequirements;
 import org.apache.cxf.ws.security.tokenstore.TokenStore;
 
@@ -41,6 +42,15 @@ public class TokenCancellerParameters {
     private KeyRequirements keyRequirements;
     private TokenRequirements tokenRequirements;
     private TokenStore tokenStore;
+    private ReceivedToken token;
+    
+    public ReceivedToken getToken() {
+        return token;
+    }
+
+    public void setToken(ReceivedToken token) {
+        this.token = token;
+    }
     
     public TokenStore getTokenStore() {
         return tokenStore;

Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/TokenCancellerResponse.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/TokenCancellerResponse.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/TokenCancellerResponse.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/canceller/TokenCancellerResponse.java
Thu Mar 22 10:54:29 2012
@@ -18,20 +18,21 @@
  */
 package org.apache.cxf.sts.token.canceller;
 
+import org.apache.cxf.sts.request.ReceivedToken;
+
 
 /**
  * This class encapsulates the response from a TokenCanceller instance after cancelling a
token.
  */
 public class TokenCancellerResponse {
-
-    private boolean tokenCancelled;
+    private ReceivedToken token;
     
-    public void setTokenCancelled(boolean tokenCancelled) {
-        this.tokenCancelled = tokenCancelled;
+    public ReceivedToken getToken() {
+        return token;
     }
-    
-    public boolean isTokenCancelled() {
-        return tokenCancelled;
+
+    public void setToken(ReceivedToken token) {
+        this.token = token;
     }
     
 }

Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultSubjectProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultSubjectProvider.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultSubjectProvider.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultSubjectProvider.java
Thu Mar 22 10:54:29 2012
@@ -98,12 +98,12 @@ public class DefaultSubjectProvider impl
         //if validation was successful, the principal was set in ReceivedToken 
         if (providerParameters.getTokenRequirements().getOnBehalfOf() != null) {
             receivedToken = providerParameters.getTokenRequirements().getOnBehalfOf();  
 
-            if (receivedToken.getValidationState().equals(STATE.VALID)) {
+            if (receivedToken.getState().equals(STATE.VALID)) {
                 principal = receivedToken.getPrincipal();
             }
         } else if (providerParameters.getTokenRequirements().getValidateTarget() != null)
{
             receivedToken = providerParameters.getTokenRequirements().getValidateTarget();
-            if (receivedToken.getValidationState().equals(STATE.VALID)) {
+            if (receivedToken.getState().equals(STATE.VALID)) {
                 principal = receivedToken.getPrincipal();
             }
         } else {

Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java
Thu Mar 22 10:54:29 2012
@@ -130,7 +130,7 @@ public class SAMLTokenValidator implemen
         
         TokenValidatorResponse response = new TokenValidatorResponse();
         ReceivedToken validateTarget = tokenParameters.getToken();
-        validateTarget.setValidationState(STATE.INVALID);
+        validateTarget.setState(STATE.INVALID);
         response.setToken(validateTarget);
         
         if (!validateTarget.isDOMElement()) {
@@ -236,7 +236,7 @@ public class SAMLTokenValidator implemen
             response.setAdditionalProperties(addProps);
             
             response.setTokenRealm(tokenRealm);
-            validateTarget.setValidationState(STATE.VALID);
+            validateTarget.setState(STATE.VALID);
         } catch (WSSecurityException ex) {
             LOG.log(Level.WARNING, "", ex);
         }

Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SCTValidator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SCTValidator.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SCTValidator.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SCTValidator.java
Thu Mar 22 10:54:29 2012
@@ -86,7 +86,7 @@ public class SCTValidator implements Tok
         
         TokenValidatorResponse response = new TokenValidatorResponse();
         ReceivedToken validateTarget = tokenParameters.getToken();
-        validateTarget.setValidationState(STATE.INVALID);
+        validateTarget.setState(STATE.INVALID);
         response.setToken(validateTarget);
         
         if (tokenParameters.getTokenStore() == null) {
@@ -119,7 +119,7 @@ public class SCTValidator implements Tok
                     String realm = props.getProperty(STSConstants.TOKEN_REALM);
                     response.setTokenRealm(realm);
                 }
-                validateTarget.setValidationState(STATE.VALID);
+                validateTarget.setState(STATE.VALID);
             } catch (WSSecurityException ex) {
                 LOG.log(Level.WARNING, "", ex);
             }

Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/UsernameTokenValidator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/UsernameTokenValidator.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/UsernameTokenValidator.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/UsernameTokenValidator.java
Thu Mar 22 10:54:29 2012
@@ -119,7 +119,7 @@ public class UsernameTokenValidator impl
         
         TokenValidatorResponse response = new TokenValidatorResponse();
         ReceivedToken validateTarget = tokenParameters.getToken();
-        validateTarget.setValidationState(STATE.INVALID);
+        validateTarget.setState(STATE.INVALID);
         response.setToken(validateTarget);
 
         if (!validateTarget.isUsernameToken()) {
@@ -197,7 +197,7 @@ public class UsernameTokenValidator impl
             
             response.setPrincipal(principal);
             response.setTokenRealm(tokenRealm);
-            validateTarget.setValidationState(STATE.VALID);
+            validateTarget.setState(STATE.VALID);
         } catch (WSSecurityException ex) {
             LOG.log(Level.WARNING, "", ex);
         }

Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/X509TokenValidator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/X509TokenValidator.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/X509TokenValidator.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/X509TokenValidator.java
Thu Mar 22 10:54:29 2012
@@ -105,7 +105,7 @@ public class X509TokenValidator implemen
 
         TokenValidatorResponse response = new TokenValidatorResponse();
         ReceivedToken validateTarget = tokenParameters.getToken();
-        validateTarget.setValidationState(STATE.INVALID);
+        validateTarget.setState(STATE.INVALID);
         response.setToken(validateTarget);
         
         if (!validateTarget.isBinarySecurityToken()) {
@@ -144,7 +144,7 @@ public class X509TokenValidator implemen
 
             Credential returnedCredential = validator.validate(credential, requestData);
             response.setPrincipal(returnedCredential.getCertificates()[0].getSubjectX500Principal());
-            validateTarget.setValidationState(STATE.VALID);
+            validateTarget.setState(STATE.VALID);
         } catch (WSSecurityException ex) {
             LOG.log(Level.WARNING, "", ex);
         }

Modified: cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/DummyTokenValidator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/DummyTokenValidator.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/DummyTokenValidator.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/DummyTokenValidator.java
Thu Mar 22 10:54:29 2012
@@ -51,14 +51,14 @@ public class DummyTokenValidator impleme
     public TokenValidatorResponse validateToken(TokenValidatorParameters tokenParameters)
{
         TokenValidatorResponse response = new TokenValidatorResponse();
         ReceivedToken validateTarget = tokenParameters.getToken();
-        validateTarget.setValidationState(STATE.INVALID);
+        validateTarget.setState(STATE.INVALID);
         response.setToken(validateTarget);
         
         if (validateTarget != null && validateTarget.isBinarySecurityToken()) {
             BinarySecurityTokenType binarySecurity = 
                 (BinarySecurityTokenType)validateTarget.getToken();
             if ("12345678".equals(binarySecurity.getValue())) {
-                validateTarget.setValidationState(STATE.VALID);
+                validateTarget.setState(STATE.VALID);
             }
         }
         

Modified: cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/canceller/SCTCancellerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/canceller/SCTCancellerTest.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/canceller/SCTCancellerTest.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/canceller/SCTCancellerTest.java
Thu Mar 22 10:54:29 2012
@@ -32,6 +32,7 @@ import org.apache.cxf.sts.cache.DefaultI
 import org.apache.cxf.sts.common.PasswordCallbackHandler;
 import org.apache.cxf.sts.request.KeyRequirements;
 import org.apache.cxf.sts.request.ReceivedToken;
+import org.apache.cxf.sts.request.ReceivedToken.STATE;
 import org.apache.cxf.sts.request.TokenRequirements;
 import org.apache.cxf.sts.service.EncryptionProperties;
 import org.apache.cxf.sts.token.provider.SCTProvider;
@@ -67,17 +68,18 @@ public class SCTCancellerTest extends or
         TokenProviderResponse providerResponse = getSecurityContextToken();
         ReceivedToken cancelTarget = new ReceivedToken(providerResponse.getToken());
         tokenRequirements.setCancelTarget(cancelTarget);
+        cancellerParameters.setToken(cancelTarget);
         
         assertTrue(sctCanceller.canHandleToken(cancelTarget));
         
         TokenCancellerResponse cancellerResponse = sctCanceller.cancelToken(cancellerParameters);
         assertTrue(cancellerResponse != null);
-        assertTrue(cancellerResponse.isTokenCancelled());
+        assertTrue(cancellerResponse.getToken().getState() == STATE.CANCELLED);
         
         // Try to cancel the token again - this should fail
         cancellerResponse = sctCanceller.cancelToken(cancellerParameters);
         assertTrue(cancellerResponse != null);
-        assertFalse(cancellerResponse.isTokenCancelled());
+        assertFalse(cancellerResponse.getToken().getState() == STATE.CANCELLED);
     }
     
     /**
@@ -95,12 +97,13 @@ public class SCTCancellerTest extends or
         SecurityContextToken sct = new SecurityContextToken(doc);
         ReceivedToken cancelTarget = new ReceivedToken(sct.getElement());
         tokenRequirements.setCancelTarget(cancelTarget);
+        cancellerParameters.setToken(cancelTarget);
         
         assertTrue(sctCanceller.canHandleToken(cancelTarget));
         
         TokenCancellerResponse cancellerResponse = sctCanceller.cancelToken(cancellerParameters);
         assertTrue(cancellerResponse != null);
-        assertFalse(cancellerResponse.isTokenCancelled());
+        assertFalse(cancellerResponse.getToken().getState() == STATE.CANCELLED);
     }
     
     private TokenProviderResponse getSecurityContextToken() throws Exception {

Modified: cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderOnBehalfOfTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderOnBehalfOfTest.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderOnBehalfOfTest.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderOnBehalfOfTest.java
Thu Mar 22 10:54:29 2012
@@ -202,7 +202,7 @@ public class SAMLProviderOnBehalfOfTest 
         
         if (onBehalfOf != null) {
             ReceivedToken onBehalfOfToken = new ReceivedToken(onBehalfOf);
-            onBehalfOfToken.setValidationState(STATE.VALID);
+            onBehalfOfToken.setState(STATE.VALID);
             tokenRequirements.setOnBehalfOf(onBehalfOfToken);
             
         }

Modified: cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorCachedRealmTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorCachedRealmTest.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorCachedRealmTest.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorCachedRealmTest.java
Thu Mar 22 10:54:29 2012
@@ -95,7 +95,7 @@ public class SAMLTokenValidatorCachedRea
         TokenValidatorResponse validatorResponse = samlTokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.VALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.VALID);
         assertTrue(validatorResponse.getTokenRealm().equals("A"));
         
     }
@@ -128,7 +128,7 @@ public class SAMLTokenValidatorCachedRea
         TokenValidatorResponse validatorResponse = samlTokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.INVALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.INVALID);
         assertNull(validatorResponse.getTokenRealm());
         
     }

Modified: cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorRealmTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorRealmTest.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorRealmTest.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorRealmTest.java
Thu Mar 22 10:54:29 2012
@@ -82,7 +82,7 @@ public class SAMLTokenValidatorRealmTest
             samlTokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.VALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.VALID);
         assertNull(validatorResponse.getTokenRealm());
 
         // Now set the SAMLRealmCodec implementation on the Validator
@@ -92,7 +92,7 @@ public class SAMLTokenValidatorRealmTest
         validatorResponse = samlTokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.VALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.VALID);
         assertTrue(validatorResponse.getTokenRealm().equals("A"));
             
         Principal principal = validatorResponse.getPrincipal();
@@ -125,7 +125,7 @@ public class SAMLTokenValidatorRealmTest
             samlTokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.VALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.VALID);
         assertNull(validatorResponse.getTokenRealm());
 
         // Now set the SAMLRealmCodec implementation on the Validator
@@ -135,7 +135,7 @@ public class SAMLTokenValidatorRealmTest
         validatorResponse = samlTokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.VALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.VALID);
         assertTrue(validatorResponse.getTokenRealm().equals("B"));
             
         Principal principal = validatorResponse.getPrincipal();

Modified: cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorTest.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorTest.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SAMLTokenValidatorTest.java
Thu Mar 22 10:54:29 2012
@@ -100,7 +100,7 @@ public class SAMLTokenValidatorTest exte
             samlTokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.VALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.VALID);
         
         Principal principal = validatorResponse.getPrincipal();
         assertTrue(principal != null && principal.getName() != null);
@@ -133,7 +133,7 @@ public class SAMLTokenValidatorTest exte
             samlTokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.VALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.VALID);
         
         Principal principal = validatorResponse.getPrincipal();
         assertTrue(principal != null && principal.getName() != null);
@@ -169,7 +169,7 @@ public class SAMLTokenValidatorTest exte
             samlTokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.INVALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.INVALID);
     }
     
     /**
@@ -202,7 +202,7 @@ public class SAMLTokenValidatorTest exte
             samlTokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.INVALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.INVALID);
     }
 
     
@@ -233,7 +233,7 @@ public class SAMLTokenValidatorTest exte
             samlTokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.INVALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.INVALID);
     }
     
     /**
@@ -263,7 +263,7 @@ public class SAMLTokenValidatorTest exte
             samlTokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.INVALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.INVALID);
     }
     
     
@@ -299,7 +299,7 @@ public class SAMLTokenValidatorTest exte
             samlTokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.VALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.VALID);
         
         certConstraints.clear();
         certConstraints.add("XYZ");
@@ -307,7 +307,7 @@ public class SAMLTokenValidatorTest exte
         validatorResponse = samlTokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.INVALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.INVALID);
     }
     
     private TokenValidatorParameters createValidatorParameters() throws WSSecurityException
{

Modified: cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SCTValidatorTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SCTValidatorTest.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SCTValidatorTest.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/SCTValidatorTest.java
Thu Mar 22 10:54:29 2012
@@ -76,7 +76,7 @@ public class SCTValidatorTest extends or
             sctValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.VALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.VALID);
         assertTrue(
             validatorResponse.getAdditionalProperties().get(SCTValidator.SCT_VALIDATOR_SECRET)
!= null
         );
@@ -88,7 +88,7 @@ public class SCTValidatorTest extends or
         validatorResponse = sctValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.INVALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.INVALID);
     }
     
     /**
@@ -113,7 +113,7 @@ public class SCTValidatorTest extends or
             sctValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.INVALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.INVALID);
     }
     
     private TokenProviderResponse getSecurityContextToken() throws Exception {

Modified: cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/UsernameTokenValidatorTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/UsernameTokenValidatorTest.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/UsernameTokenValidatorTest.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/UsernameTokenValidatorTest.java
Thu Mar 22 10:54:29 2012
@@ -85,7 +85,7 @@ public class UsernameTokenValidatorTest 
                 usernameTokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.INVALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.INVALID);
 
         // Add a password
         PasswordString password = new PasswordString();
@@ -100,7 +100,7 @@ public class UsernameTokenValidatorTest 
         validatorResponse = usernameTokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.VALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.VALID);
         
         Principal principal = validatorResponse.getPrincipal();
         assertTrue(principal != null && principal.getName() != null);
@@ -146,7 +146,7 @@ public class UsernameTokenValidatorTest 
             usernameTokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.INVALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.INVALID);
         
         // This will fail as the password is bad
         username.setValue("alice");
@@ -154,7 +154,7 @@ public class UsernameTokenValidatorTest 
         validatorResponse = usernameTokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.INVALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.INVALID);
     }
     
     /**
@@ -221,7 +221,7 @@ public class UsernameTokenValidatorTest 
                 usernameTokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.VALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.VALID);
         
         Principal principal = validatorResponse.getPrincipal();
         assertTrue(principal != null && principal.getName() != null);
@@ -231,7 +231,7 @@ public class UsernameTokenValidatorTest 
         validatorResponse = usernameTokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.INVALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.INVALID);
     }
     
     private TokenValidatorParameters createValidatorParameters() throws WSSecurityException
{

Modified: cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/X509TokenValidatorTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/X509TokenValidatorTest.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/X509TokenValidatorTest.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/validator/X509TokenValidatorTest.java
Thu Mar 22 10:54:29 2012
@@ -87,13 +87,13 @@ public class X509TokenValidatorTest exte
         validatorResponse = x509TokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.INVALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.INVALID);
         
         binarySecurityToken.setEncodingType(WSConstants.SOAPMESSAGE_NS + "#Base64Binary");
         
         validatorResponse = x509TokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.VALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.VALID);
         
         Principal principal = validatorResponse.getPrincipal();
         assertTrue(principal != null && principal.getName() != null);
@@ -134,7 +134,7 @@ public class X509TokenValidatorTest exte
         TokenValidatorResponse validatorResponse = x509TokenValidator.validateToken(validatorParameters);
         assertTrue(validatorResponse != null);
         assertTrue(validatorResponse.getToken() != null);
-        assertTrue(validatorResponse.getToken().getValidationState() == STATE.INVALID);
+        assertTrue(validatorResponse.getToken().getState() == STATE.INVALID);
     }
     
     private TokenValidatorParameters createValidatorParameters() throws WSSecurityException
{

Modified: cxf/trunk/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenValidator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenValidator.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenValidator.java
(original)
+++ cxf/trunk/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomBSTTokenValidator.java
Thu Mar 22 10:54:29 2012
@@ -53,7 +53,7 @@ public class CustomBSTTokenValidator imp
     public TokenValidatorResponse validateToken(TokenValidatorParameters tokenParameters)
{
         TokenValidatorResponse response = new TokenValidatorResponse();
         ReceivedToken validateTarget = tokenParameters.getToken();
-        validateTarget.setValidationState(STATE.INVALID);
+        validateTarget.setState(STATE.INVALID);
         response.setToken(validateTarget);
         
         if (!validateTarget.isBinarySecurityToken()) {
@@ -65,7 +65,7 @@ public class CustomBSTTokenValidator imp
         // Do some validation of the token here
         //
         if (Base64.encode("12345678".getBytes()).equals(binarySecurityToken.getValue()))
{
-            validateTarget.setValidationState(STATE.VALID);
+            validateTarget.setState(STATE.VALID);
         }
         response.setPrincipal(new CustomTokenPrincipal("alice"));
         

Modified: cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameTokenValidator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameTokenValidator.java?rev=1303726&r1=1303725&r2=1303726&view=diff
==============================================================================
--- cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameTokenValidator.java
(original)
+++ cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameTokenValidator.java
Thu Mar 22 10:54:29 2012
@@ -53,14 +53,14 @@ public class UsernameTokenValidator impl
     public TokenValidatorResponse validateToken(TokenValidatorParameters tokenParameters)
{
         TokenValidatorResponse response = new TokenValidatorResponse();
         ReceivedToken validateTarget = tokenParameters.getToken();
-        validateTarget.setValidationState(STATE.INVALID);
+        validateTarget.setState(STATE.INVALID);
         response.setToken(validateTarget);
         
         UsernameTokenType usernameTokenType = (UsernameTokenType)validateTarget.getToken();
         // Ignore the fact that no password is provided
         // Some other requirements must be met to issue a token onbehalfof a subject
         // whose authentication is not proved
-        validateTarget.setValidationState(STATE.VALID);
+        validateTarget.setState(STATE.VALID);
         response.setPrincipal(new CustomTokenPrincipal(usernameTokenType.getUsername().getValue()));
         
         return response;



Mime
View raw message