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:33:08 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 2e027aee0 -> 39111b5a4


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/39111b5a
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/39111b5a
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/39111b5a

Branch: refs/heads/master
Commit: 39111b5a492bf417325313f18f680ff6a77ed3a2
Parents: 2e027ae
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:32:51 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/39111b5a/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 dfd1826..4a5a331 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) {
@@ -420,4 +421,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