relaxed issuer constraints in client, closes #638

pull/873/head
Justin Richer 10 years ago
parent 59caf8bcbe
commit b13e369851

@ -216,8 +216,6 @@ public class OIDCAuthenticationFilter extends AbstractAuthenticationProcessingFi
throw new AuthenticationServiceException("No issuer found: " + issuer); throw new AuthenticationServiceException("No issuer found: " + issuer);
} }
session.setAttribute(ISSUER_SESSION_VARIABLE, issuer);
ServerConfiguration serverConfig = servers.getServerConfiguration(issuer); ServerConfiguration serverConfig = servers.getServerConfiguration(issuer);
if (serverConfig == null) { if (serverConfig == null) {
logger.error("No server configuration found for issuer: " + issuer); logger.error("No server configuration found for issuer: " + issuer);
@ -225,6 +223,8 @@ public class OIDCAuthenticationFilter extends AbstractAuthenticationProcessingFi
} }
session.setAttribute(ISSUER_SESSION_VARIABLE, serverConfig.getIssuer());
RegisteredClient clientConfig = clients.getClientConfiguration(serverConfig); RegisteredClient clientConfig = clients.getClientConfiguration(serverConfig);
if (clientConfig == null) { if (clientConfig == null) {
logger.error("No client configuration found for issuer: " + issuer); logger.error("No client configuration found for issuer: " + issuer);

@ -154,7 +154,7 @@ public class DynamicServerConfigurationService implements ServerConfigurationSer
} }
if (!issuer.equals(o.get("issuer").getAsString())) { if (!issuer.equals(o.get("issuer").getAsString())) {
throw new IllegalStateException("Discovered issuers didn't match, expected " + issuer + " got " + o.get("issuer").getAsString()); logger.info("Issuer used for discover was " + issuer + " but final issuer is " + o.get("issuer").getAsString());
} }
conf.setIssuer(o.get("issuer").getAsString()); conf.setIssuer(o.get("issuer").getAsString());

Loading…
Cancel
Save