cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Support token api which expect client id/secret in the form payload and not in Authorization header, patch from Aliona Baltramiayuk applied, This closes #203
Date Mon, 21 Nov 2016 10:34:31 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 94135fcc4 -> 0f1b0079f


Support token api which expect client id/secret in the form payload and not in Authorization
header, patch from Aliona Baltramiayuk applied, This closes #203


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

Branch: refs/heads/3.1.x-fixes
Commit: 0f1b0079fb0b21e2555c1c3d91a20275c9318fcd
Parents: 94135fc
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Mon Nov 21 10:29:31 2016 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Mon Nov 21 10:34:14 2016 +0000

----------------------------------------------------------------------
 .../rs/security/oauth2/client/ClientCodeRequestFilter.java    | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/0f1b0079/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
index 8d675c9..f40a139 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
@@ -77,6 +77,7 @@ public class ClientCodeRequestFilter implements ContainerRequestFilter {
     private boolean applicationCanHandleAccessDenied;
     private CodeVerifierTransformer codeVerifierTransformer;
     private OAuthJoseJwtProducer codeRequestJoseProducer;
+    private boolean useAuthorizationHeader;
         
     @Override
     public void filter(ContainerRequestContext rc) throws IOException {
@@ -236,7 +237,7 @@ public class ClientCodeRequestFilter implements ContainerRequestFilter
{
         if (codeParam != null) {
             AuthorizationCodeGrant grant = prepareCodeGrant(codeParam, getAbsoluteRedirectUri(ui));
             grant.setCodeVerifier(state.getFirst(OAuthConstants.AUTHORIZATION_CODE_VERIFIER));
-            at = OAuthClientUtils.getAccessToken(accessTokenServiceClient, consumer, grant);
+            at = OAuthClientUtils.getAccessToken(accessTokenServiceClient, consumer, grant,
useAuthorizationHeader);
         }
         ClientTokenContext tokenContext = initializeClientTokenContext(rc, at, requestParams,
state);
         if (at != null && clientTokenContextManager != null) {
@@ -416,4 +417,8 @@ public class ClientCodeRequestFilter implements ContainerRequestFilter
{
     public void setCodeRequestJoseProducer(OAuthJoseJwtProducer codeRequestJoseProducer)
{
         this.codeRequestJoseProducer = codeRequestJoseProducer;
     }
+    
+    public void setUseAuthorizationHeader(boolean useAuthorizationHeader) {
+        this.useAuthorizationHeader = useAuthorizationHeader;
+    }
 }


Mime
View raw message