cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbernha...@apache.org
Subject cxf git commit: Adding redirect_uri collection and name to oauth2 consumer
Date Mon, 30 Nov 2015 14:56:33 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 5b0066f3f -> ec4539c59


Adding redirect_uri collection and name to oauth2 consumer


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

Branch: refs/heads/master
Commit: ec4539c592dbaf25052b8396db2c5878b93f5e88
Parents: 5b0066f
Author: Jan Bernhardt <jbernhardt@talend.com>
Authored: Mon Nov 30 15:46:04 2015 +0100
Committer: Jan Bernhardt <jbernhardt@talend.com>
Committed: Mon Nov 30 15:56:02 2015 +0100

----------------------------------------------------------------------
 .../cxf/rs/security/oauth2/client/Consumer.java | 44 ++++++++++++++++++--
 1 file changed, 40 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/ec4539c5/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/Consumer.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/Consumer.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/Consumer.java
index caa456d..e592ec9 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/Consumer.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/Consumer.java
@@ -18,44 +18,80 @@
  */
 package org.apache.cxf.rs.security.oauth2.client;
 
+import java.util.HashSet;
+import java.util.Set;
+
 public class Consumer {
-    
+
     private String key;
     private String secret;
+    private Set<String> redirectURIs;
+    private String name;
     private String description;
-    
+
     public Consumer() {
-        
+
     }
+
     public Consumer(String key, String secret) {
         this.setKey(key);
         this.setSecret(secret);
     }
+
     public String getKey() {
         return key;
     }
+
     public void setKey(String key) {
         this.key = key;
     }
+
     public String getSecret() {
         return secret;
     }
+
     public void setSecret(String secret) {
         this.secret = secret;
     }
+
     public String getDescription() {
         return description;
     }
+
     public void setDescription(String description) {
         this.description = description;
     }
+
     @Override
     public int hashCode() {
         return key.hashCode();
     }
+
     @Override
     public boolean equals(Object o) {
         return o instanceof Consumer && key.equals(((Consumer)o).key);
     }
-    
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Set<String> getRedirectURIs() {
+        return redirectURIs;
+    }
+
+    public void setRedirectURIs(Set<String> redirectUri) {
+        this.redirectURIs = redirectUri;
+    }
+
+    public boolean addRedirectURI(String redirectURI) {
+        if (this.redirectURIs == null) {
+            this.redirectURIs = new HashSet<String>();
+        }
+        return this.redirectURIs.add(redirectURI);
+    }
 }


Mime
View raw message