Various small improvements/bugfixes

pull/844/head
Mark Janssen 2015-05-24 18:19:36 +02:00 committed by Justin Richer
parent 54fbf0d0ac
commit 6dc2b2cb5e
3 changed files with 4 additions and 2 deletions

View File

@ -29,6 +29,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.google.common.collect.Iterables;
import org.apache.http.client.HttpClient;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.impl.client.HttpClientBuilder;
@ -246,7 +247,7 @@ public class OIDCAuthenticationFilter extends AbstractAuthenticationProcessingFi
String redirectUri = null;
if (clientConfig.getRegisteredRedirectUri() != null && clientConfig.getRegisteredRedirectUri().size() == 1) {
// if there's a redirect uri configured (and only one), use that
redirectUri = clientConfig.getRegisteredRedirectUri().toArray(new String[] {})[0];
redirectUri = Iterables.getOnlyElement(clientConfig.getRegisteredRedirectUri());
} else {
// otherwise our redirect URI is this current URL, with no query parameters
redirectUri = request.getRequestURL().toString();

View File

@ -76,6 +76,7 @@ public class ClientInformationResponseView extends AbstractView {
if (code == null) {
code = HttpStatus.OK;
}
response.setStatus(code.value());
JsonObject o = ClientDetailsEntityJsonProcessor.serialize(c);

View File

@ -63,7 +63,7 @@ public class DefaultResourceSetService implements ResourceSetService {
public ResourceSet update(ResourceSet oldRs, ResourceSet newRs) {
if (oldRs.getId() == null || newRs.getId() == null
|| oldRs.getId() != newRs.getId()) {
|| !oldRs.getId().equals(newRs.getId())) {
throw new IllegalArgumentException("Resource set IDs mismatched");