tweaking maven config
parent
febad61730
commit
4ce425eddc
|
@ -4,11 +4,11 @@
|
|||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
|
||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
|
||||
<classpathentry kind="src" path="spring-security-oauth/spring-security-oauth2/src/main/java"/>
|
||||
<classpathentry kind="src" path="mitre-local/src/main/java"/>
|
||||
<classpathentry kind="src" path="spring-security-oauth/spring-security-oauth2/src/main/resources"/>
|
||||
<classpathentry kind="src" path="spring-security-oauth/spring-security-oauth/src/main/java"/>
|
||||
<classpathentry kind="src" path="spring-security-oauth/spring-security-oauth/src/main/resources"/>
|
||||
<classpathentry kind="src" path="spring-security-oauth/spring-security-oauth2/src/main/java"/>
|
||||
<classpathentry kind="src" path="spring-security-oauth/spring-security-oauth2/src/main/resources"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/spring-security-oauth/spring-security-oauth2/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/mitre-local/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/spring-security-oauth/spring-security-oauth2/src/main/resources"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/spring-security-oauth/spring-security-oauth/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/spring-security-oauth/spring-security-oauth/src/main/resources"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/spring-security-oauth/spring-security-oauth2/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/spring-security-oauth/spring-security-oauth2/src/main/resources"/>
|
||||
<property name="java-output-path" value="target/classes"/>
|
||||
<property name="context-root" value="openid"/>
|
||||
</wb-module>
|
||||
|
|
|
@ -8,8 +8,16 @@ import com.google.gson.JsonElement;
|
|||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonPrimitive;
|
||||
|
||||
/**
|
||||
* Generic container for JSON-based claims. Backed with a {@link Map} that preserves
|
||||
* insertion order. Several convenience methods for getting and setting claims in different
|
||||
* formats.
|
||||
* @author jricher
|
||||
*
|
||||
*/
|
||||
public class ClaimSet {
|
||||
|
||||
// the LinkedHashMap preserves insertion order
|
||||
private Map<String, Object> claims = new LinkedHashMap<String, Object>();
|
||||
|
||||
/**
|
||||
|
@ -85,9 +93,16 @@ public class ClaimSet {
|
|||
public JsonObject getAsJsonObject() {
|
||||
JsonObject o = new JsonObject();
|
||||
|
||||
|
||||
/*
|
||||
* We step through the claims object and serialize the internal values as
|
||||
* appropriate to JsonElements.
|
||||
*/
|
||||
|
||||
if (this.claims != null) {
|
||||
for (Map.Entry<String, Object> claim : this.claims.entrySet()) {
|
||||
if (claim.getValue() instanceof JsonElement) {
|
||||
// raw JSON elements get passed through directly
|
||||
o.add(claim.getKey(), (JsonElement)claim.getValue());
|
||||
} else if (claim.getValue() instanceof String) {
|
||||
o.addProperty(claim.getKey(), (String)claim.getValue());
|
||||
|
|
Loading…
Reference in New Issue