cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Some OIDC RP refactoring
Date Wed, 24 Dec 2014 16:34:49 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes c6f1a8f07 -> c7053bc56


Some OIDC RP refactoring


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

Branch: refs/heads/3.0.x-fixes
Commit: c7053bc56654eeec72591e7a80f89b7148b24daf
Parents: c6f1a8f
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Wed Dec 24 16:31:40 2014 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Wed Dec 24 16:34:23 2014 +0000

----------------------------------------------------------------------
 .../cxf/rs/security/oidc/rp/AbstractTokenValidator.java      | 2 +-
 .../org/apache/cxf/rs/security/oidc/rp/IdTokenValidator.java | 2 +-
 .../org/apache/cxf/rs/security/oidc/rp/UserInfoClient.java   | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/c7053bc5/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/rp/AbstractTokenValidator.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/rp/AbstractTokenValidator.java
b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/rp/AbstractTokenValidator.java
index f6e95c6..f468d33 100644
--- a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/rp/AbstractTokenValidator.java
+++ b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/rp/AbstractTokenValidator.java
@@ -76,7 +76,7 @@ public abstract class AbstractTokenValidator {
 
         // validate the provider
         String issuer = claims.getIssuer();
-        if (issuerId == null && validateClaimsAlways || issuerId != null &&
!issuerId.equals(issuer)) {
+        if (issuer == null && validateClaimsAlways || issuer != null && !issuer.equals(issuerId))
{
             throw new SecurityException("Invalid provider");
         }
         JwtUtils.validateJwtTimeClaims(claims, issuedAtRange, validateClaimsAlways);

http://git-wip-us.apache.org/repos/asf/cxf/blob/c7053bc5/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/rp/IdTokenValidator.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/rp/IdTokenValidator.java
b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/rp/IdTokenValidator.java
index 3d5a1f3..378cbe5 100644
--- a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/rp/IdTokenValidator.java
+++ b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/rp/IdTokenValidator.java
@@ -26,7 +26,7 @@ import org.apache.cxf.rs.security.oidc.utils.OidcUtils;
 public class IdTokenValidator extends AbstractTokenValidator {
     private boolean requireAtHash = true;
     
-    public IdToken getIdTokenFromJwt(ClientAccessToken at, String clientId) {
+    public IdToken getIdToken(ClientAccessToken at, String clientId) {
         JwtToken jwt = getIdJwtToken(at, clientId);
         return getIdTokenFromJwt(jwt, clientId);
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/c7053bc5/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/rp/UserInfoClient.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/rp/UserInfoClient.java
b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/rp/UserInfoClient.java
index bbd98d5..b6cab0c 100644
--- a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/rp/UserInfoClient.java
+++ b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/rp/UserInfoClient.java
@@ -29,9 +29,9 @@ public class UserInfoClient extends IdTokenValidator {
     private boolean encryptedOnly;
     private WebClient profileClient;
     public UserInfo getUserInfo(ClientAccessToken at, IdToken idToken) {
-        return getProfile(at, idToken, false);
+        return getUserInfo(at, idToken, false);
     }
-    public UserInfo getProfile(ClientAccessToken at, IdToken idToken, boolean asJwt) {
+    public UserInfo getUserInfo(ClientAccessToken at, IdToken idToken, boolean asJwt) {
         OAuthClientUtils.setAuthorizationHeader(profileClient, at);
         if (asJwt) {
             String jwt = profileClient.get(String.class);
@@ -64,8 +64,8 @@ public class UserInfoClient extends IdTokenValidator {
     public void setEncryptedOnly(boolean encryptedOnly) {
         this.encryptedOnly = encryptedOnly;
     }
-    public void setProfileClient(WebClient profileClient) {
-        this.profileClient = profileClient;
+    public void setUserInfoServiceClient(WebClient client) {
+        this.profileClient = client;
     }
     
 }


Mime
View raw message