Author: coheigea
Date: Tue Jun 12 11:42:49 2012
New Revision: 1349271
URL: http://svn.apache.org/viewvc?rev=1349271&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
........
Modified:
cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java
Modified:
cxf/branches/2.6.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.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java?rev=1349271&r1=1349270&r2=1349271&view=diff
==============================================================================
---
cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java
(original)
+++
cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java
Tue Jun 12 11:42:49 2012
@@ -141,10 +141,16 @@ 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);
+ }
}
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);
+ }
if (created != null) {
this.created = new Date(created.getTime());
}
@@ -158,6 +164,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);
if (created != null) {
this.created = new Date(created.getTime());
@@ -171,6 +180,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);
@@ -259,6 +271,9 @@ public class SecurityToken implements Se
*/
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);
+ }
}
/**