Skip to content

Commit

Permalink
Remove Deprecated Usages of RemoteJWKSet
Browse files Browse the repository at this point in the history
  • Loading branch information
kwondh5217 committed Dec 18, 2024
1 parent 8ca07ef commit fa288c2
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ public List<JWK> get(JWKSelector jwkSelector, SecurityContext context) throws Ke
JWKSet jwkSet = this.jwkSetCache.get();
if (this.jwkSetCache.requiresRefresh() || jwkSet == null) {
synchronized (this) {
jwkSet = fetchJWKSet(context);
jwkSet = fetchJWKSet();
this.jwkSetCache.put(jwkSet);
}
}
Expand All @@ -457,20 +457,20 @@ public List<JWK> get(JWKSelector jwkSelector, SecurityContext context) throws Ke
return Collections.emptyList();
}
synchronized (this) {
jwkSet = fetchJWKSet(context);
jwkSet = fetchJWKSet();
this.jwkSetCache.put(jwkSet);
}
if(jwkSet == null) {
return Collections.emptyList();
}
return jwkSelector.select(jwkSet);
}
return jwkSelector.select(fetchJWKSet(context));
return jwkSelector.select(fetchJWKSet());
}

private JWKSet fetchJWKSet(SecurityContext context) throws KeySourceException {
private JWKSet fetchJWKSet() throws KeySourceException {
return this.urlBasedJWKSetSource.getJWKSet(JWKSetCacheRefreshEvaluator.noRefresh(),
System.currentTimeMillis(), context);
System.currentTimeMillis(), null);
}

private String getFirstSpecifiedKeyID(JWKMatcher jwkMatcher) {
Expand Down

0 comments on commit fa288c2

Please sign in to comment.