Author: sergeyb
Date: Fri Nov 30 13:30:00 2012
New Revision: 1415623

URL: http://svn.apache.org/viewvc?rev=1415623&view=rev
Log:
[CXF-4656] UserSubject should be able to keep the list of custom properties

Added:
    
cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/Property.java
   (with props)
Modified:
    
cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/UserSubject.java

Added: 
cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/Property.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/Property.java?rev=1415623&view=auto
==============================================================================
--- 
cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/Property.java
 (added)
+++ 
cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/Property.java
 Fri Nov 30 13:30:00 2012
@@ -0,0 +1,52 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.rs.security.oauth2.common;
+
+
+public class Property {
+
+    private String name;
+    private String value;
+
+    public Property() {
+        
+    }
+
+    public Property(String name, String value) {
+        this.name = name;
+        this.value = value;
+    }
+    
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+    
+}

Propchange: 
cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/Property.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/Property.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: 
cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/UserSubject.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/UserSubject.java?rev=1415623&r1=1415622&r2=1415623&view=diff
==============================================================================
--- 
cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/UserSubject.java
 (original)
+++ 
cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/UserSubject.java
 Fri Nov 30 13:30:00 2012
@@ -32,6 +32,7 @@ public class UserSubject {
     
     private String login;
     private List<String> roles = new LinkedList<String>();
+    private List<Property> properties = new LinkedList<Property>();;
     
     public UserSubject() {
         
@@ -79,6 +80,22 @@ public class UserSubject {
     public void setRoles(List<String> roles) {
         this.roles = roles;
     }
+
+    /**
+     * Get the list of additional user subject properties
+     * @return the list of properties
+     */
+    public List<Property> getProperties() {
+        return properties;
+    }
+
+    /**
+     * Set the list of additional user subject properties
+     * @param properties the properties
+     */
+    public void setProperties(List<Property> properties) {
+        this.properties = properties;
+    }
     
 
 }


Reply via email to