cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Setting an implicit flow flag so that the consent form can block a refresh token question
Date Mon, 23 Nov 2015 14:16:14 GMT
Repository: cxf
Updated Branches:
  refs/heads/master c97de8f3a -> 67146026f


Setting an implicit flow flag so that the consent form can block a refresh token question


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

Branch: refs/heads/master
Commit: 67146026f0f82edb18f0699371c1b90c894c783e
Parents: c97de8f
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Mon Nov 23 14:15:59 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Mon Nov 23 14:15:59 2015 +0000

----------------------------------------------------------------------
 .../oauth2/common/OAuthAuthorizationData.java     |  9 +++++++++
 .../oauth2/services/ImplicitGrantService.java     | 18 ++++++++++++++++++
 2 files changed, 27 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/67146026/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/OAuthAuthorizationData.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/OAuthAuthorizationData.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/OAuthAuthorizationData.java
index 7f26bf4..05dc72c 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/OAuthAuthorizationData.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/OAuthAuthorizationData.java
@@ -46,6 +46,7 @@ public class OAuthAuthorizationData extends OAuthRedirectionState implements
Ser
     private String applicationLogoUri;
     private List<String> applicationCertificates = new LinkedList<String>();
     private Map<String, String> extraApplicationProperties = new HashMap<String,
String>();
+    private boolean implicitFlow;
     
     private List<? extends Permission> permissions;
     
@@ -192,4 +193,12 @@ public class OAuthAuthorizationData extends OAuthRedirectionState implements
Ser
     public void setApplicationCertificates(List<String> applicationCertificates) {
         this.applicationCertificates = applicationCertificates;
     }
+
+    public boolean isImplicitFlow() {
+        return implicitFlow;
+    }
+
+    public void setImplicitFlow(boolean implicitFlow) {
+        this.implicitFlow = implicitFlow;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/67146026/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/ImplicitGrantService.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/ImplicitGrantService.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/ImplicitGrantService.java
index d2dcdbf..057c59d 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/ImplicitGrantService.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/ImplicitGrantService.java
@@ -19,10 +19,16 @@
 
 package org.apache.cxf.rs.security.oauth2.services;
 
+import java.util.List;
 import java.util.Set;
 
 import javax.ws.rs.Path;
+import javax.ws.rs.core.MultivaluedMap;
 
+import org.apache.cxf.rs.security.oauth2.common.Client;
+import org.apache.cxf.rs.security.oauth2.common.OAuthAuthorizationData;
+import org.apache.cxf.rs.security.oauth2.common.OAuthPermission;
+import org.apache.cxf.rs.security.oauth2.common.UserSubject;
 import org.apache.cxf.rs.security.oauth2.utils.OAuthConstants;
 
 
@@ -44,6 +50,18 @@ public class ImplicitGrantService extends AbstractImplicitGrantService
{
     public ImplicitGrantService(Set<String> responseTypes) {
         super(responseTypes, OAuthConstants.IMPLICIT_GRANT);
     }
+    @Override
+    protected OAuthAuthorizationData createAuthorizationData(Client client, 
+                                                             MultivaluedMap<String, String>
params,
+                                                             String redirectUri,
+                                                             UserSubject subject,
+                                                             List<OAuthPermission>
perms,
+                                                             boolean authorizationCanBeSkipped)
{
+        OAuthAuthorizationData data = 
+            super.createAuthorizationData(client, params, redirectUri, subject, perms, authorizationCanBeSkipped);
+        data.setImplicitFlow(true);
+        return data;
+    }
 }
 
 


Mime
View raw message