KEYCLOAK-14655 Check issuer config exists
This commit is contained in:
parent
9c4da9b3ce
commit
2ec572e9b5
1 changed files with 9 additions and 5 deletions
|
@ -605,16 +605,20 @@ public class OIDCIdentityProvider extends AbstractOAuth2IdentityProvider<OIDCIde
|
||||||
String requestedIssuer = params.getFirst(OAuth2Constants.SUBJECT_ISSUER);
|
String requestedIssuer = params.getFirst(OAuth2Constants.SUBJECT_ISSUER);
|
||||||
if (requestedIssuer == null) requestedIssuer = issuer;
|
if (requestedIssuer == null) requestedIssuer = issuer;
|
||||||
if (requestedIssuer.equals(getConfig().getAlias())) return true;
|
if (requestedIssuer.equals(getConfig().getAlias())) return true;
|
||||||
|
|
||||||
|
String trustedIssuers = getConfig().getIssuer();
|
||||||
|
|
||||||
String[] issuers = getConfig().getIssuer().split(",");
|
if (trustedIssuers != null && trustedIssuers.length() > 0) {
|
||||||
|
String[] issuers = trustedIssuers.split(",");
|
||||||
|
|
||||||
for (String trustedIssuer : issuers) {
|
for (String trustedIssuer : issuers) {
|
||||||
if (requestedIssuer.equals(trustedIssuer.trim())) {
|
if (requestedIssuer.equals(trustedIssuer.trim())) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean supportsExternalExchange() {
|
protected boolean supportsExternalExchange() {
|
||||||
|
|
Loading…
Reference in a new issue