cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1177310 - /cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java
Date Thu, 29 Sep 2011 14:03:49 GMT
Author: coheigea
Date: Thu Sep 29 14:03:49 2011
New Revision: 1177310

URL: http://svn.apache.org/viewvc?rev=1177310&view=rev
Log:
Allow a Principal object to be stored in the SecurityToken

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

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java?rev=1177310&r1=1177309&r2=1177310&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java
Thu Sep 29 14:03:49 2011
@@ -20,6 +20,7 @@
 package org.apache.cxf.ws.security.tokenstore;
 
 import java.io.Serializable;
+import java.security.Principal;
 import java.security.cert.X509Certificate;
 import java.text.DateFormat;
 import java.text.ParseException;
@@ -148,6 +149,11 @@ public class SecurityToken implements Se
 
     private transient Crypto crypto;
     
+    /**
+     * The principal of this SecurityToken
+     */
+    private Principal principal;
+    
     public SecurityToken() {
         
     }
@@ -473,6 +479,22 @@ public class SecurityToken implements Se
     }
     
     /**
+     * Set the principal associated with this SecurityToken
+     * @param principal the principal associated with this SecurityToken
+     */
+    public void setPrincipal(Principal principal) {
+        this.principal = principal;
+    }
+    
+    /**
+     * Get the principal associated with this SecurityToken
+     * @return the principal associated with this SecurityToken
+     */
+    public Principal getPrincipal() {
+        return principal;
+    }
+    
+    /**
      * Create a default Expires date 5 minutes in the future
      */
     private void createDefaultExpires() {



Mime
View raw message