You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2016/02/24 13:36:41 UTC
cxf git commit: Renaming ClaimPreference to ClaimRequirement
Repository: cxf
Updated Branches:
refs/heads/master b5f01c635 -> 3e5241a77
Renaming ClaimPreference to ClaimRequirement
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/3e5241a7
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/3e5241a7
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/3e5241a7
Branch: refs/heads/master
Commit: 3e5241a7725433b906529449689a273cabd62d0d
Parents: b5f01c6
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Wed Feb 24 12:36:26 2016 +0000
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Wed Feb 24 12:36:26 2016 +0000
----------------------------------------------------------------------
.../security/oidc/common/ClaimPreference.java | 55 --------------------
.../security/oidc/common/ClaimRequirement.java | 55 ++++++++++++++++++++
.../rs/security/oidc/common/ClaimsRequest.java | 26 ++++-----
3 files changed, 68 insertions(+), 68 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/3e5241a7/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/common/ClaimPreference.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/common/ClaimPreference.java b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/common/ClaimPreference.java
deleted file mode 100644
index 212dac8..0000000
--- a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/common/ClaimPreference.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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.oidc.common;
-
-import java.util.List;
-
-import org.apache.cxf.helpers.CastUtils;
-import org.apache.cxf.jaxrs.json.basic.JsonMapObject;
-
-public class ClaimPreference extends JsonMapObject {
- public static final String ESSENTIAL_PROPERTY = "essential";
- public static final String VALUE_PROPERTY = "value";
- public static final String VALUES_PROPERTY = "values";
- private static final long serialVersionUID = 9105405849730632953L;
-
- public void setEssential(Boolean essential) {
- setProperty(ESSENTIAL_PROPERTY, essential);
- }
- public Boolean getEssential() {
- return getBooleanProperty(ESSENTIAL_PROPERTY);
- }
- public void setValue(String value) {
- setProperty(VALUE_PROPERTY, value);
- }
- public String getValue() {
- return getStringProperty(VALUE_PROPERTY);
- }
- public void setValues(List<String> values) {
- setProperty(VALUES_PROPERTY, values);
- }
- public List<String> getValues() {
- Object prop = getProperty(VALUES_PROPERTY);
- if (prop instanceof List) {
- return CastUtils.cast((List<?>)prop);
- } else {
- return null;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/3e5241a7/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/common/ClaimRequirement.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/common/ClaimRequirement.java b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/common/ClaimRequirement.java
new file mode 100644
index 0000000..2cc9d98
--- /dev/null
+++ b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/common/ClaimRequirement.java
@@ -0,0 +1,55 @@
+/**
+ * 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.oidc.common;
+
+import java.util.List;
+
+import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.jaxrs.json.basic.JsonMapObject;
+
+public class ClaimRequirement extends JsonMapObject {
+ public static final String ESSENTIAL_PROPERTY = "essential";
+ public static final String VALUE_PROPERTY = "value";
+ public static final String VALUES_PROPERTY = "values";
+ private static final long serialVersionUID = 9105405849730632953L;
+
+ public void setEssential(Boolean essential) {
+ setProperty(ESSENTIAL_PROPERTY, essential);
+ }
+ public Boolean getEssential() {
+ return getBooleanProperty(ESSENTIAL_PROPERTY);
+ }
+ public void setValue(String value) {
+ setProperty(VALUE_PROPERTY, value);
+ }
+ public String getValue() {
+ return getStringProperty(VALUE_PROPERTY);
+ }
+ public void setValues(List<String> values) {
+ setProperty(VALUES_PROPERTY, values);
+ }
+ public List<String> getValues() {
+ Object prop = getProperty(VALUES_PROPERTY);
+ if (prop instanceof List) {
+ return CastUtils.cast((List<?>)prop);
+ } else {
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/cxf/blob/3e5241a7/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/common/ClaimsRequest.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/common/ClaimsRequest.java b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/common/ClaimsRequest.java
index 5c02f42..d3365a2 100644
--- a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/common/ClaimsRequest.java
+++ b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/common/ClaimsRequest.java
@@ -30,42 +30,42 @@ public class ClaimsRequest extends JsonMapObject {
private static final long serialVersionUID = -1356735897518391517L;
- public void setIdTokenClaims(Map<String, ClaimPreference> claims) {
+ public void setIdTokenClaims(Map<String, ClaimRequirement> claims) {
setProperty(ID_TOKEN_CLAIMS, claims);
}
- public Map<String, ClaimPreference> getIdTokenClaims() {
+ public Map<String, ClaimRequirement> getIdTokenClaims() {
return getClaims(ID_TOKEN_CLAIMS);
}
- public void setUserInfoClaims(Map<String, ClaimPreference> claims) {
+ public void setUserInfoClaims(Map<String, ClaimRequirement> claims) {
setProperty(USER_INFO_CLAIMS, claims);
}
- private Map<String, ClaimPreference> getClaims(String propertyName) {
+ private Map<String, ClaimRequirement> getClaims(String propertyName) {
Object claimsProp = getProperty(propertyName);
if (claimsProp instanceof Map) {
Map<String, ?> claimsMap = CastUtils.cast((Map<?, ?>)claimsProp);
if (!claimsMap.isEmpty()) {
- if (claimsMap.values().iterator().next() instanceof ClaimPreference) {
+ if (claimsMap.values().iterator().next() instanceof ClaimRequirement) {
return CastUtils.cast((Map<?, ?>)claimsMap);
}
- Map<String, ClaimPreference> claims = new LinkedHashMap<String, ClaimPreference>();
+ Map<String, ClaimRequirement> claims = new LinkedHashMap<String, ClaimRequirement>();
Map<String, Map<String, ?>> parsedMap = CastUtils.cast((Map<?, ?>)claimsProp);
for (Map.Entry<String, Map<String, ?>> entry : parsedMap.entrySet()) {
- ClaimPreference pref = new ClaimPreference();
- Object essentialProp = entry.getValue().get(ClaimPreference.ESSENTIAL_PROPERTY);
+ ClaimRequirement pref = new ClaimRequirement();
+ Object essentialProp = entry.getValue().get(ClaimRequirement.ESSENTIAL_PROPERTY);
if (essentialProp != null) {
- pref.setProperty(ClaimPreference.ESSENTIAL_PROPERTY, essentialProp);
+ pref.setProperty(ClaimRequirement.ESSENTIAL_PROPERTY, essentialProp);
}
- Object valueProp = entry.getValue().get(ClaimPreference.VALUE_PROPERTY);
+ Object valueProp = entry.getValue().get(ClaimRequirement.VALUE_PROPERTY);
if (valueProp != null) {
- pref.setProperty(ClaimPreference.VALUE_PROPERTY, valueProp);
+ pref.setProperty(ClaimRequirement.VALUE_PROPERTY, valueProp);
}
- Object valuesProp = entry.getValue().get(ClaimPreference.VALUES_PROPERTY);
+ Object valuesProp = entry.getValue().get(ClaimRequirement.VALUES_PROPERTY);
if (valuesProp != null) {
- pref.setProperty(ClaimPreference.VALUES_PROPERTY, valuesProp);
+ pref.setProperty(ClaimRequirement.VALUES_PROPERTY, valuesProp);
}
}
return claims;