KEYCLOAK-3654 Fix jwks-url in integration-arquillian
This commit is contained in:
parent
f2f508ac2e
commit
218065a349
1 changed files with 3 additions and 1 deletions
|
@ -80,7 +80,9 @@ public abstract class AbstractAdapterTest extends AbstractAuthTest {
|
||||||
|
|
||||||
private void modifyClientJWKSUrl(RealmRepresentation realm, String regex, String replacement) {
|
private void modifyClientJWKSUrl(RealmRepresentation realm, String regex, String replacement) {
|
||||||
if (realm.getClients() != null) {
|
if (realm.getClients() != null) {
|
||||||
realm.getClients().stream().filter(client -> "client-jwt".equals(client.getClientAuthenticatorType())).forEach(client -> {
|
realm.getClients().stream().
|
||||||
|
filter(client -> "client-jwt".equals(client.getClientAuthenticatorType()) && client.getAttributes().containsKey("jwks.url")).
|
||||||
|
forEach(client -> {
|
||||||
Map<String, String> attr = client.getAttributes();
|
Map<String, String> attr = client.getAttributes();
|
||||||
attr.put("jwks.url", attr.get("jwks.url").replaceFirst(regex, replacement));
|
attr.put("jwks.url", attr.get("jwks.url").replaceFirst(regex, replacement));
|
||||||
client.setAttributes(attr);
|
client.setAttributes(attr);
|
||||||
|
|
Loading…
Reference in a new issue