Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 59DEF9CCD for ; Thu, 29 Sep 2011 14:00:57 +0000 (UTC) Received: (qmail 43362 invoked by uid 500); 29 Sep 2011 14:00:56 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 43316 invoked by uid 500); 29 Sep 2011 14:00:56 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 43309 invoked by uid 99); 29 Sep 2011 14:00:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2011 14:00:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2011 14:00:55 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id AF2FF2388A64 for ; Thu, 29 Sep 2011 14:00:35 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1177308 - /cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java Date: Thu, 29 Sep 2011 14:00:35 -0000 To: commits@cxf.apache.org From: coheigea@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20110929140035.AF2FF2388A64@eris.apache.org> Author: coheigea Date: Thu Sep 29 14:00:35 2011 New Revision: 1177308 URL: http://svn.apache.org/viewvc?rev=1177308&view=rev Log: Allow a Principal object to be stored in the SecurityToken Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java Modified: cxf/branches/2.4.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.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java?rev=1177308&r1=1177307&r2=1177308&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java (original) +++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/SecurityToken.java Thu Sep 29 14:00:35 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() {