cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From owu...@apache.org
Subject svn commit: r1435182 - in /cxf/fediz/trunk/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty: FederationAuthenticator.java FederationUserIdentity.java
Date Fri, 18 Jan 2013 15:14:06 GMT
Author: owulff
Date: Fri Jan 18 15:14:06 2013
New Revision: 1435182

URL: http://svn.apache.org/viewvc?rev=1435182&view=rev
Log:
Add security token to the http session

Modified:
    cxf/fediz/trunk/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationAuthenticator.java
    cxf/fediz/trunk/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationUserIdentity.java

Modified: cxf/fediz/trunk/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationAuthenticator.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationAuthenticator.java?rev=1435182&r1=1435181&r2=1435182&view=diff
==============================================================================
--- cxf/fediz/trunk/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationAuthenticator.java
(original)
+++ cxf/fediz/trunk/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationAuthenticator.java
Fri Jan 18 15:14:06 2013
@@ -75,6 +75,8 @@ public class FederationAuthenticator ext
     public static final String J_POST = "org.eclipse.jetty.security.form_POST";
 
     private static final Logger LOG = Log.getLogger(FederationAuthenticator.class);
+    
+    private static final String SECURITY_TOKEN_ATTR = "org.apache.fediz.SECURITY_TOKEN";
        
     private String configFile;
     private FederationConfigurator configurator;
@@ -176,6 +178,9 @@ public class FederationAuthenticator ext
                         if (user != null)
                         {
                             session=renewSession(request,response);
+                            
+                            FederationUserIdentity  fui = (FederationUserIdentity)user;
+                            session.setAttribute(SECURITY_TOKEN_ATTR, fui.getToken());
 
                             // Redirect to original request
                             String nuri;

Modified: cxf/fediz/trunk/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationUserIdentity.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationUserIdentity.java?rev=1435182&r1=1435181&r2=1435182&view=diff
==============================================================================
--- cxf/fediz/trunk/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationUserIdentity.java
(original)
+++ cxf/fediz/trunk/plugins/jetty/src/main/java/org/apache/cxf/fediz/jetty/FederationUserIdentity.java
Fri Jan 18 15:14:06 2013
@@ -25,6 +25,8 @@ import java.util.Date;
 
 import javax.security.auth.Subject;
 
+import org.w3c.dom.Element;
+
 import org.apache.cxf.fediz.core.FederationResponse;
 import org.eclipse.jetty.server.UserIdentity;
 
@@ -80,5 +82,9 @@ public class FederationUserIdentity impl
     public String getId() {
         return fedResponse.getUniqueTokenId();
     }
+    
+    public Element getToken() {
+        return fedResponse.getToken();
+    }
 
 }



Mime
View raw message