cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Adding a Client dynamic registration flag
Date Wed, 28 Sep 2016 11:44:16 GMT
Repository: cxf
Updated Branches:
  refs/heads/master dcb1e4029 -> 44e59d77c


Adding a Client dynamic registration flag


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

Branch: refs/heads/master
Commit: 44e59d77cdba0c1fe29eb8bf4949a19e5acaa541
Parents: dcb1e40
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Wed Sep 28 12:44:02 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Wed Sep 28 12:44:02 2016 +0100

----------------------------------------------------------------------
 .../org/apache/cxf/rs/security/oauth2/common/Client.java | 11 ++++++++++-
 .../security/oauth2/common/OAuthAuthorizationData.java   |  9 +++++++++
 .../oauth2/services/DynamicRegistrationService.java      |  3 ++-
 .../oauth2/services/RedirectionBasedGrantService.java    |  1 +
 4 files changed, 22 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/44e59d77/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/Client.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/Client.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/Client.java
index 5988fcd..581fe0a 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/Client.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/Client.java
@@ -63,7 +63,8 @@ public class Client implements Serializable {
     private UserSubject resourceOwnerSubject;
     private long registeredAt;
     private String homeRealm;
-
+    private boolean registeredDynamically;
+    
     public Client() {
 
     }
@@ -384,4 +385,12 @@ public class Client implements Serializable {
     public void setHomeRealm(String homeRealm) {
         this.homeRealm = homeRealm;
     }
+
+    public boolean isRegisteredDynamically() {
+        return registeredDynamically;
+    }
+
+    public void setRegisteredDynamically(boolean registeredDynamically) {
+        this.registeredDynamically = registeredDynamically;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/44e59d77/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 ea8ded3..b3ef3a0 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
@@ -54,6 +54,7 @@ public class OAuthAuthorizationData extends OAuthRedirectionState implements
Ser
     private List<OAuthPermission> permissions;
     private List<OAuthPermission> alreadyAuthorizedPermissions;
     private boolean hidePreauthorizedScopesInForm;
+    private boolean applicationRegisteredDynamically;
     
     public OAuthAuthorizationData() {
     }
@@ -257,4 +258,12 @@ public class OAuthAuthorizationData extends OAuthRedirectionState implements
Ser
         return allPerms;
     }
 
+    public boolean isApplicationRegisteredDynamically() {
+        return applicationRegisteredDynamically;
+    }
+
+    public void setApplicationRegisteredDynamically(boolean applicationRegisteredDynamically)
{
+        this.applicationRegisteredDynamically = applicationRegisteredDynamically;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/44e59d77/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
index 7ad1c74..d8d5c59 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java
@@ -249,7 +249,8 @@ public class DynamicRegistrationService {
         //TODO: check other properties
         // Add more typed properties like tosUri, policyUri, etc to Client
         // or set them as Client extra properties
-        
+     
+        newClient.setRegisteredDynamically(true);
         return newClient;
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/44e59d77/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/RedirectionBasedGrantService.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/RedirectionBasedGrantService.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/RedirectionBasedGrantService.java
index f844a2e..d336a09 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/RedirectionBasedGrantService.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/RedirectionBasedGrantService.java
@@ -287,6 +287,7 @@ public abstract class RedirectionBasedGrantService extends AbstractOAuthService
             secData.setApplicationCertificates(client.getApplicationCertificates());
             Map<String, String> extraProperties = client.getProperties();
             secData.setExtraApplicationProperties(extraProperties);
+            secData.setApplicationRegisteredDynamically(client.isRegisteredDynamically());
             String replyTo = getMessageContext().getUriInfo()
                 .getAbsolutePathBuilder().path("decision").build().toString();
             secData.setReplyTo(replyTo);


Mime
View raw message