cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1349320 - /cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java
Date Tue, 12 Jun 2012 13:26:00 GMT
Author: coheigea
Date: Tue Jun 12 13:26:00 2012
New Revision: 1349320

URL: http://svn.apache.org/viewvc?rev=1349320&view=rev
Log:
Merged revisions 1349264 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1349264 | coheigea | 2012-06-12 12:28:20 +0100 (Tue, 12 Jun 2012) | 2 lines

  Strip the SecurityToken Identifier of a "#" prefix if it exists

........


Conflicts:

	rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java

Modified:
    cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java

Modified: cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java?rev=1349320&r1=1349319&r2=1349320&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java
Tue Jun 12 13:26:00 2012
@@ -160,11 +160,17 @@ public class SecurityToken implements Se
     
     public SecurityToken(String id) {
         this.id = id;
+        if (this.id != null && this.id.length() > 0 && this.id.charAt(0)
== '#') {
+            this.id = this.id.substring(1);
+        }
         createDefaultExpires();
     }
 
     public SecurityToken(String id, Date created, Date expires) {
         this.id = id;
+        if (this.id != null && this.id.length() > 0 && this.id.charAt(0)
== '#') {
+            this.id = this.id.substring(1);
+        }
         this.created = created;
         this.expires = expires;
         if (expires == null) {
@@ -177,6 +183,9 @@ public class SecurityToken implements Se
                  Date created,
                  Date expires) {
         this.id = id;
+        if (this.id != null && this.id.length() > 0 && this.id.charAt(0)
== '#') {
+            this.id = this.id.substring(1);
+        }
         this.token = cloneElement(tokenElem);
         this.created = created;
         this.expires = expires;
@@ -189,6 +198,9 @@ public class SecurityToken implements Se
                  Element tokenElem,
                  Element lifetimeElem) {
         this.id = id;
+        if (this.id != null && this.id.length() > 0 && this.id.charAt(0)
== '#') {
+            this.id = this.id.substring(1);
+        }
         this.token = cloneElement(tokenElem);
         if (lifetimeElem != null) {
             processLifeTime(lifetimeElem);
@@ -309,7 +321,14 @@ public class SecurityToken implements Se
     public void setPreviousToken(Element previousToken) {
         this.previousToken = cloneElement(previousToken);
     }
-
+    
+    public void setId(String id) {
+        this.id = id;
+        if (this.id != null && this.id.length() > 0 && this.id.charAt(0)
== '#') {
+            this.id = this.id.substring(1);
+        }
+    }
+    
     /**
      * @return Returns the secret.
      */



Mime
View raw message