Various small improvements/bugfixes
parent
54fbf0d0ac
commit
6dc2b2cb5e
|
@ -29,6 +29,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
|
|
||||||
|
import com.google.common.collect.Iterables;
|
||||||
import org.apache.http.client.HttpClient;
|
import org.apache.http.client.HttpClient;
|
||||||
import org.apache.http.client.config.RequestConfig;
|
import org.apache.http.client.config.RequestConfig;
|
||||||
import org.apache.http.impl.client.HttpClientBuilder;
|
import org.apache.http.impl.client.HttpClientBuilder;
|
||||||
|
@ -246,7 +247,7 @@ public class OIDCAuthenticationFilter extends AbstractAuthenticationProcessingFi
|
||||||
String redirectUri = null;
|
String redirectUri = null;
|
||||||
if (clientConfig.getRegisteredRedirectUri() != null && clientConfig.getRegisteredRedirectUri().size() == 1) {
|
if (clientConfig.getRegisteredRedirectUri() != null && clientConfig.getRegisteredRedirectUri().size() == 1) {
|
||||||
// if there's a redirect uri configured (and only one), use that
|
// 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 {
|
} else {
|
||||||
// otherwise our redirect URI is this current URL, with no query parameters
|
// otherwise our redirect URI is this current URL, with no query parameters
|
||||||
redirectUri = request.getRequestURL().toString();
|
redirectUri = request.getRequestURL().toString();
|
||||||
|
|
|
@ -76,6 +76,7 @@ public class ClientInformationResponseView extends AbstractView {
|
||||||
if (code == null) {
|
if (code == null) {
|
||||||
code = HttpStatus.OK;
|
code = HttpStatus.OK;
|
||||||
}
|
}
|
||||||
|
response.setStatus(code.value());
|
||||||
|
|
||||||
JsonObject o = ClientDetailsEntityJsonProcessor.serialize(c);
|
JsonObject o = ClientDetailsEntityJsonProcessor.serialize(c);
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class DefaultResourceSetService implements ResourceSetService {
|
||||||
public ResourceSet update(ResourceSet oldRs, ResourceSet newRs) {
|
public ResourceSet update(ResourceSet oldRs, ResourceSet newRs) {
|
||||||
|
|
||||||
if (oldRs.getId() == null || newRs.getId() == null
|
if (oldRs.getId() == null || newRs.getId() == null
|
||||||
|| oldRs.getId() != newRs.getId()) {
|
|| !oldRs.getId().equals(newRs.getId())) {
|
||||||
|
|
||||||
throw new IllegalArgumentException("Resource set IDs mismatched");
|
throw new IllegalArgumentException("Resource set IDs mismatched");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue