Merge pull request #3362 from mhajas/KEYCLOAK-3654
KEYCLOAK-3654 Fix NullPointerException in lambda
This commit is contained in:
commit
f8f9ebf588
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