cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [43/50] [abbrv] cxf git commit: Minor update to Oidc services
Date Thu, 26 May 2016 21:46:11 GMT
Minor update to Oidc services


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

Branch: refs/heads/master-jaxrs-2.1
Commit: d243c99dbcb3cf3a0b2b5c24615c88324b641dad
Parents: dda4c7b
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Wed May 25 12:55:35 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Wed May 25 12:55:35 2016 +0100

----------------------------------------------------------------------
 .../cxf/rs/security/oidc/idp/OidcAuthorizationCodeService.java  | 5 ++---
 .../apache/cxf/rs/security/oidc/idp/OidcImplicitService.java    | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/d243c99d/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcAuthorizationCodeService.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcAuthorizationCodeService.java
b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcAuthorizationCodeService.java
index 17f595d..519361c 100644
--- a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcAuthorizationCodeService.java
+++ b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcAuthorizationCodeService.java
@@ -51,14 +51,13 @@ public class OidcAuthorizationCodeService extends AuthorizationCodeGrantService
         // Check the pre-configured consent
         boolean preConfiguredConsentForScopes =
             super.canAuthorizationBeSkipped(params, client, userSubject, requestedScope,
permissions);
-        boolean nonePromptRequested = promptValues.contains(OidcUtils.PROMPT_NONE_VALUE);
         
-        if (nonePromptRequested && !preConfiguredConsentForScopes) {
+        if (!preConfiguredConsentForScopes && promptValues.contains(OidcUtils.PROMPT_NONE_VALUE))
{
             // An error is returned if client does not have pre-configured consent for the
requested scopes/claims
             LOG.log(Level.FINE, "Prompt 'none' request can not be met");
             throw new OAuthServiceException(new OAuthError(OidcUtils.CONSENT_REQUIRED_ERROR));
         }
-        return !nonePromptRequested && preConfiguredConsentForScopes;
+        return preConfiguredConsentForScopes;
     }
     
     public void setSkipAuthorizationWithOidcScope(boolean skipAuthorizationWithOidcScope)
{

http://git-wip-us.apache.org/repos/asf/cxf/blob/d243c99d/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcImplicitService.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcImplicitService.java
b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcImplicitService.java
index b0a8e05..03f626f 100644
--- a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcImplicitService.java
+++ b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcImplicitService.java
@@ -99,14 +99,13 @@ public class OidcImplicitService extends ImplicitGrantService {
         // Check the pre-configured consent
         boolean preConfiguredConsentForScopes =
             super.canAuthorizationBeSkipped(params, client, userSubject, requestedScope,
permissions);
-        boolean nonePromptRequested = promptValues.contains(OidcUtils.PROMPT_NONE_VALUE);
         
-        if (nonePromptRequested && !preConfiguredConsentForScopes) {
+        if (!preConfiguredConsentForScopes && promptValues.contains(OidcUtils.PROMPT_NONE_VALUE))
{
             // An error is returned if client does not have pre-configured consent for the
requested scopes/claims
             LOG.log(Level.FINE, "Prompt 'none' request can not be met");
             throw new OAuthServiceException(new OAuthError(OidcUtils.CONSENT_REQUIRED_ERROR));
         }
-        return !nonePromptRequested && preConfiguredConsentForScopes;
+        return preConfiguredConsentForScopes;
     }
     
     public void setSkipAuthorizationWithOidcScope(boolean skipAuthorizationWithOidcScope)
{


Mime
View raw message