cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1415613 - in /cxf/branches/2.6.x-fixes: ./ rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/RedirectionBasedGrantService.java
Date Fri, 30 Nov 2012 13:03:51 GMT
Author: sergeyb
Date: Fri Nov 30 13:03:50 2012
New Revision: 1415613

URL: http://svn.apache.org/viewvc?rev=1415613&view=rev
Log:
Merged revisions 1415609 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1415609 | sergeyb | 2012-11-30 12:59:14 +0000 (Fri, 30 Nov 2012) | 1 line
  
  [CXF-4666] Making it simpler to customize UserSubject creation
........

Modified:
    cxf/branches/2.6.x-fixes/   (props changed)
    cxf/branches/2.6.x-fixes/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/RedirectionBasedGrantService.java

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1415609

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.6.x-fixes/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/RedirectionBasedGrantService.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/RedirectionBasedGrantService.java?rev=1415613&r1=1415612&r2=1415613&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/RedirectionBasedGrantService.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/RedirectionBasedGrantService.java
Fri Nov 30 13:03:50 2012
@@ -241,8 +241,13 @@ public abstract class RedirectionBasedGr
         this.sessionAuthenticityTokenProvider = sessionAuthenticityTokenProvider;
     }
     
-    private UserSubject createUserSubject(SecurityContext securityContext) {
-        return OAuthUtils.createSubject(securityContext);
+    protected UserSubject createUserSubject(SecurityContext securityContext) {
+        UserSubject subject = getMessageContext().getContent(UserSubject.class);
+        if (subject != null) {
+            return subject;
+        } else {
+            return OAuthUtils.createSubject(securityContext);
+        }
     }
     
     protected abstract Response createErrorResponse(MultivaluedMap<String, String>
params,



Mime
View raw message