Skip to content

Commit

Permalink
DT-609 Fix caching of JWK Set (#416)
Browse files Browse the repository at this point in the history
This is a short term fix until we implement RemoteJwkSet.
  • Loading branch information
mikehalmamoj authored Mar 12, 2020
1 parent a30a7be commit 5ddbb7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/net/syscon/elite/web/config/JwkClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public JwkClient(@Value("${spring.security.oauth2.resourceserver.jwt.jwk-set-uri
public PublicKey getPublicKeyForKeyId(final String keyId) {
return publicKeysById
.map(keys -> keys.get(keyId))
.orElse(retrieveKeysAndFind(keyId));
.orElseGet(() -> retrieveKeysAndFind(keyId));
}

private PublicKey retrieveKeysAndFind(final String keyId) {
Expand Down

0 comments on commit 5ddbb7c

Please sign in to comment.