cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1567911 - in /cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2: filters/AccessTokenValidatorClient.java services/AccessTokenValidatorService.java utils/OAuthConstants.java
Date Thu, 13 Feb 2014 13:02:15 GMT
Author: sergeyb
Date: Thu Feb 13 13:02:14 2014
New Revision: 1567911

URL: http://svn.apache.org/r1567911
Log:
[CXF-5561] Introducing constants

Modified:
    cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/AccessTokenValidatorClient.java
    cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenValidatorService.java
    cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthConstants.java

Modified: cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/AccessTokenValidatorClient.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/AccessTokenValidatorClient.java?rev=1567911&r1=1567910&r2=1567911&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/AccessTokenValidatorClient.java
(original)
+++ cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/AccessTokenValidatorClient.java
Thu Feb 13 13:02:14 2014
@@ -43,7 +43,8 @@ public class AccessTokenValidatorClient 
                                                      String authSchemeData) 
         throws OAuthServiceException {
         WebClient client = WebClient.fromClient(tokenValidatorClient, true);
-        Form form = new Form().param("authScheme", authScheme).param("authSchemeData", authSchemeData);
+        Form form = new Form().param(OAuthConstants.AUTHORIZATION_SCHEME_TYPE, authScheme)
+                              .param(OAuthConstants.AUTHORIZATION_SCHEME_DATA, authSchemeData);
         return client.post(form, AccessTokenValidation.class);
     }
 

Modified: cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenValidatorService.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenValidatorService.java?rev=1567911&r1=1567910&r2=1567911&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenValidatorService.java
(original)
+++ cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenValidatorService.java
Thu Feb 13 13:02:14 2014
@@ -28,14 +28,16 @@ import javax.ws.rs.core.MediaType;
 
 import org.apache.cxf.rs.security.oauth2.common.AccessTokenValidation;
 import org.apache.cxf.rs.security.oauth2.utils.AuthorizationUtils;
+import org.apache.cxf.rs.security.oauth2.utils.OAuthConstants;
 
 @Path("validate")
 public class AccessTokenValidatorService extends AbstractAccessTokenValidator {
     @POST
     @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
     @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
-    public AccessTokenValidation getTokenValidationInfo(@FormParam("authScheme") String authScheme,

-                                                        @Encoded @FormParam("authScheme")
String authSchemeData) {
+    public AccessTokenValidation getTokenValidationInfo(
+        @FormParam(OAuthConstants.AUTHORIZATION_SCHEME_TYPE) String authScheme, 
+        @Encoded @FormParam(OAuthConstants.AUTHORIZATION_SCHEME_DATA) String authSchemeData)
{
         if (getMessageContext().getSecurityContext().getUserPrincipal() == null) {
             AuthorizationUtils.throwAuthorizationFailure(supportedSchemes, realm);
         }

Modified: cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthConstants.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthConstants.java?rev=1567911&r1=1567910&r2=1567911&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthConstants.java
(original)
+++ cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthConstants.java
Thu Feb 13 13:02:14 2014
@@ -112,6 +112,9 @@ public final class OAuthConstants {
     public static final String REVOKED_TOKEN_TYPE_HINT = "token_type_hint";
     public static final String UNSUPPORTED_TOKEN_TYPE = "unsupported_token_type";
     
+    // Authorization scheme constants, used internally by AccessTokenValidation client and
service
+    public static final String AUTHORIZATION_SCHEME_TYPE = "authScheme";
+    public static final String AUTHORIZATION_SCHEME_DATA = "authSchemeData";
     
     private OAuthConstants() {
     }



Mime
View raw message