fixed pluralization of post logout URIs in data API services

pull/779/head
Justin Richer 2015-02-17 09:59:50 -05:00
parent d91da77a31
commit d88cc2ec8e
3 changed files with 11 additions and 4 deletions

View File

@ -18,6 +18,7 @@
*/
package org.mitre.openid.connect.service.impl;
import com.google.common.collect.Sets;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
@ -675,7 +676,8 @@ public class MITREidDataService_1_0 extends MITREidDataService_1_X {
} else if (name.equals("initiateLoginUri")) {
client.setInitiateLoginUri(reader.nextString());
} else if (name.equals("postLogoutRedirectUri")) {
client.setPostLogoutRedirectUri(reader.nextString());
HashSet<String> postLogoutUris = Sets.newHashSet(reader.nextString());
client.setPostLogoutRedirectUris(postLogoutUris);
} else if (name.equals("requestUris")) {
Set<String> requestUris = readSet(reader);
client.setRequestUris(requestUris);

View File

@ -62,6 +62,7 @@ import org.springframework.security.oauth2.provider.OAuth2Authentication;
import org.springframework.security.oauth2.provider.OAuth2Request;
import org.springframework.stereotype.Service;
import com.google.common.collect.Sets;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
@ -687,7 +688,8 @@ public class MITREidDataService_1_1 extends MITREidDataService_1_X {
} else if (name.equals("initiateLoginUri")) {
client.setInitiateLoginUri(reader.nextString());
} else if (name.equals("postLogoutRedirectUri")) {
client.setPostLogoutRedirectUri(reader.nextString());
HashSet<String> postLogoutUris = Sets.newHashSet(reader.nextString());
client.setPostLogoutRedirectUris(postLogoutUris);
} else if (name.equals("requestUris")) {
Set<String> requestUris = readSet(reader);
client.setRequestUris(requestUris);

View File

@ -62,6 +62,7 @@ import org.springframework.security.oauth2.provider.OAuth2Authentication;
import org.springframework.security.oauth2.provider.OAuth2Request;
import org.springframework.stereotype.Service;
import com.google.common.collect.Sets;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
@ -398,7 +399,8 @@ public class MITREidDataService_1_2 extends MITREidDataService_1_X {
writer.name("defaultACRValues");
writeNullSafeArray(writer, client.getDefaultACRvalues());
writer.name("intitateLoginUri").value(client.getInitiateLoginUri());
writer.name("postLogoutRedirectUri").value(client.getPostLogoutRedirectUris());
writer.name("postLogoutRedirectUri");
writeNullSafeArray(writer, client.getPostLogoutRedirectUris());
writer.name("requestUris");
writeNullSafeArray(writer, client.getRequestUris());
writer.name("description").value(client.getClientDescription());
@ -1022,7 +1024,8 @@ public class MITREidDataService_1_2 extends MITREidDataService_1_X {
} else if (name.equals("initiateLoginUri")) {
client.setInitiateLoginUri(reader.nextString());
} else if (name.equals("postLogoutRedirectUri")) {
client.setPostLogoutRedirectUris(reader.nextString());
HashSet<String> postLogoutUris = Sets.newHashSet(reader.nextString());
client.setPostLogoutRedirectUris(postLogoutUris);
} else if (name.equals("requestUris")) {
Set<String> requestUris = readSet(reader);
client.setRequestUris(requestUris);