cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Reverting most of the last nonce-related changes, keeping a minor AbstractGrantHandler optimization
Date Mon, 30 Nov 2015 12:39:21 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 294218f53 -> 04771f9b9


Reverting most of the last nonce-related changes, keeping a minor AbstractGrantHandler optimization


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/04771f9b
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/04771f9b
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/04771f9b

Branch: refs/heads/3.1.x-fixes
Commit: 04771f9b93c86197b194791d502fd224dbb1eacc
Parents: 294218f
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Mon Nov 30 12:37:45 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Mon Nov 30 12:39:08 2015 +0000

----------------------------------------------------------------------
 .../rs/security/oauth2/grants/AbstractGrantHandler.java   | 10 +++-------
 .../oauth2/grants/code/AbstractCodeDataProvider.java      |  1 -
 .../oauth2/grants/code/AuthorizationCodeGrantHandler.java |  3 +--
 .../oauth2/grants/code/ServerAuthorizationCodeGrant.java  |  9 ---------
 4 files changed, 4 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/04771f9b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/AbstractGrantHandler.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/AbstractGrantHandler.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/AbstractGrantHandler.java
index 2300b11..38ab690 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/AbstractGrantHandler.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/AbstractGrantHandler.java
@@ -118,25 +118,22 @@ public abstract class AbstractGrantHandler implements AccessTokenGrantHandler
{
                                                     String audience) {
         
         return doCreateAccessToken(client, subject, getSingleGrantType(), requestedScope,

-                                   approvedScope, audience, null, null);
+                                   approvedScope, audience, null);
     }
     
     protected ServerAccessToken doCreateAccessToken(Client client,
                                                     UserSubject subject,
                                                     String requestedGrant,
                                                     List<String> requestedScope) {
-        return doCreateAccessToken(client, subject, requestedGrant, requestedScope, null,
null, null, null);
+        return doCreateAccessToken(client, subject, requestedGrant, requestedScope, null,
null, null);
     }
-    //CHECKSTYLE:OFF
     protected ServerAccessToken doCreateAccessToken(Client client,
                                                     UserSubject subject,
                                                     String requestedGrant,
                                                     List<String> requestedScope,
                                                     List<String> approvedScope,
                                                     String audience,
-                                                    String codeVerifier,
-                                                    String nonce) {
-    //CHECKSTYLE:ON    
+                                                    String codeVerifier) {
         if (!OAuthUtils.validateScopes(requestedScope, client.getRegisteredScopes(), 
                                        partialMatchScopeValidation)) {
             throw new OAuthServiceException(new OAuthError(OAuthConstants.INVALID_SCOPE));
    
@@ -164,7 +161,6 @@ public abstract class AbstractGrantHandler implements AccessTokenGrantHandler
{
         reg.setApprovedScope(approvedScope);
         reg.setAudience(audience);
         reg.setClientCodeVerifier(codeVerifier);
-        reg.setNonce(nonce);
         return dataProvider.createAccessToken(reg);
     }
     

http://git-wip-us.apache.org/repos/asf/cxf/blob/04771f9b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AbstractCodeDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AbstractCodeDataProvider.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AbstractCodeDataProvider.java
index 1b63bb3..6bed976 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AbstractCodeDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AbstractCodeDataProvider.java
@@ -55,7 +55,6 @@ public abstract class AbstractCodeDataProvider extends AbstractOAuthDataProvider
         grant.setApprovedScopes(reg.getApprovedScope());
         grant.setAudience(reg.getAudience());
         grant.setClientCodeChallenge(reg.getClientCodeChallenge());
-        grant.setNonce(reg.getNonce());
         return grant;
     }
     

http://git-wip-us.apache.org/repos/asf/cxf/blob/04771f9b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AuthorizationCodeGrantHandler.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AuthorizationCodeGrantHandler.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AuthorizationCodeGrantHandler.java
index f2cf499..9a6888a 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AuthorizationCodeGrantHandler.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AuthorizationCodeGrantHandler.java
@@ -84,8 +84,7 @@ public class AuthorizationCodeGrantHandler extends AbstractGrantHandler
{
                                    grant.getRequestedScopes(),
                                    grant.getApprovedScopes(),
                                    grant.getAudience(),
-                                   clientCodeVerifier,
-                                   grant.getNonce());
+                                   clientCodeVerifier);
     }
     
     private boolean compareCodeVerifierWithChallenge(Client c, String clientCodeVerifier,


http://git-wip-us.apache.org/repos/asf/cxf/blob/04771f9b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/ServerAuthorizationCodeGrant.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/ServerAuthorizationCodeGrant.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/ServerAuthorizationCodeGrant.java
index f09327a..a1aba9f 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/ServerAuthorizationCodeGrant.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/ServerAuthorizationCodeGrant.java
@@ -39,7 +39,6 @@ public class ServerAuthorizationCodeGrant extends AuthorizationCodeGrant
{
     private List<String> requestedScopes = Collections.emptyList();
     private UserSubject subject;
     private String audience;
-    private String nonce;
     private String clientCodeChallenge;
     
     public ServerAuthorizationCodeGrant() {
@@ -166,12 +165,4 @@ public class ServerAuthorizationCodeGrant extends AuthorizationCodeGrant
{
     public void setRequestedScopes(List<String> requestedScopes) {
         this.requestedScopes = requestedScopes;
     }
-
-    public String getNonce() {
-        return nonce;
-    }
-
-    public void setNonce(String nonce) {
-        this.nonce = nonce;
-    }
 }


Mime
View raw message