cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf-fediz git commit: FEDIZ-134: avoiding a possible comflict between algo properties
Date Fri, 13 Nov 2015 16:53:02 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master a9ac5873d -> 1c4d2f580


FEDIZ-134: avoiding a possible comflict between algo properties


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

Branch: refs/heads/master
Commit: 1c4d2f580e8dd9ee456510aaac48cd7e6efca015
Parents: a9ac587
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Fri Nov 13 16:52:39 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Fri Nov 13 16:52:39 2015 +0000

----------------------------------------------------------------------
 .../org/apache/cxf/fediz/service/oidc/OAuthDataManager.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/1c4d2f58/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/OAuthDataManager.java
----------------------------------------------------------------------
diff --git a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/OAuthDataManager.java
b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/OAuthDataManager.java
index b1e632e..c498161 100644
--- a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/OAuthDataManager.java
+++ b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/OAuthDataManager.java
@@ -111,9 +111,9 @@ public class OAuthDataManager extends AbstractCodeDataProvider {
     protected JwsSignatureProvider getJwsSignatureProvider(Client client) {
         if (signIdTokenWithClientSecret && client.isConfidential() && client.getClientSecret()
!= null) {
             Properties sigProps = JwsUtils.loadSignatureOutProperties(false);
-            // HS256, HS384, HS512
-            SignatureAlgorithm sigAlgo = JwsUtils.getSignatureAlgorithm(sigProps, 
-                    SignatureAlgorithm.HS256); 
+            SignatureAlgorithm sigAlgo = SignatureAlgorithm.getAlgorithm(
+            sigProps.getProperty(OAuthConstants.CLIENT_SECRET_SIGNATURE_ALGORITHM));
+            sigAlgo = sigAlgo != null ? sigAlgo : SignatureAlgorithm.HS256;
             if (AlgorithmUtils.isHmacSign(sigAlgo)) {
                 return JwsUtils.getHmacSignatureProvider(client.getClientSecret(), sigAlgo);
             }


Mime
View raw message