You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2017/03/07 16:53:01 UTC

[1/2] cxf git commit: Minor update to the abstract oauth2 provider

Repository: cxf
Updated Branches:
  refs/heads/master f17784b09 -> a776fbd6c


Minor update to the abstract oauth2 provider


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

Branch: refs/heads/master
Commit: c63096efa7eaab67b81ab6f6ca7d075642c95fb5
Parents: 41262ee
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Tue Mar 7 16:52:24 2017 +0000
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Tue Mar 7 16:52:24 2017 +0000

----------------------------------------------------------------------
 .../oauth2/provider/AbstractOAuthDataProvider.java        | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/c63096ef/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
index 61d9361..339e07d 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
@@ -245,9 +245,7 @@ public abstract class AbstractOAuthDataProvider implements OAuthDataProvider, Cl
 
     @Override
     public List<OAuthPermission> convertScopeToPermissions(Client client, List<String> requestedScopes) {
-        if (requiredScopes != null && !requestedScopes.containsAll(requiredScopes)) {
-            throw new OAuthServiceException("Required scopes are missing");
-        }
+        checkRequestedScopes(client, requestedScopes);
         if (requestedScopes.isEmpty()) {
             return Collections.emptyList();
         } else {
@@ -262,6 +260,12 @@ public abstract class AbstractOAuthDataProvider implements OAuthDataProvider, Cl
         throw new OAuthServiceException("Requested scopes can not be mapped");
 
     }
+    
+    protected void checkRequestedScopes(Client client, List<String> requestedScopes) {
+        if (requiredScopes != null && !requestedScopes.containsAll(requiredScopes)) {
+            throw new OAuthServiceException("Required scopes are missing");
+        }
+    }
 
     protected void convertSingleScopeToPermission(Client client,
                                                   String scope,


[2/2] cxf git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf

Posted by se...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf


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

Branch: refs/heads/master
Commit: a776fbd6c5905d93aaacd8e02f34dfafa5e774d3
Parents: c63096e f17784b
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Tue Mar 7 16:52:48 2017 +0000
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Tue Mar 7 16:52:48 2017 +0000

----------------------------------------------------------------------
 .../org/apache/cxf/https/ssl3/sslv3-server.xml      | 16 ++++++++++++++++
 .../ciphersuites/ciphersuites-explicit-client.xml   |  2 +-
 .../https/ciphersuites/ciphersuites-server.xml      |  5 +++--
 3 files changed, 20 insertions(+), 3 deletions(-)
----------------------------------------------------------------------