Skip to content

Commit 43a07a7

Browse files
committed
Remove Deprecated Usages of RemoteJWKSet
close spring-projectsgh-16251 Signed-off-by: Daeho Kwon <[email protected]>
1 parent 662f7dd commit 43a07a7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/NimbusJwtDecoder.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ public List<JWK> get(JWKSelector jwkSelector, SecurityContext context) throws Ke
441441
JWKSet jwkSet = this.jwkSetCache.get();
442442
if (this.jwkSetCache.requiresRefresh() || jwkSet == null) {
443443
synchronized (this) {
444-
jwkSet = fetchJWKSet(context);
444+
jwkSet = fetchJWKSet();
445445
this.jwkSetCache.put(jwkSet);
446446
}
447447
}
@@ -457,20 +457,20 @@ public List<JWK> get(JWKSelector jwkSelector, SecurityContext context) throws Ke
457457
return Collections.emptyList();
458458
}
459459
synchronized (this) {
460-
jwkSet = fetchJWKSet(context);
460+
jwkSet = fetchJWKSet();
461461
this.jwkSetCache.put(jwkSet);
462462
}
463463
if(jwkSet == null) {
464464
return Collections.emptyList();
465465
}
466466
return jwkSelector.select(jwkSet);
467467
}
468-
return jwkSelector.select(fetchJWKSet(context));
468+
return jwkSelector.select(fetchJWKSet());
469469
}
470470

471-
private JWKSet fetchJWKSet(SecurityContext context) throws KeySourceException {
471+
private JWKSet fetchJWKSet() throws KeySourceException {
472472
return this.urlBasedJWKSetSource.getJWKSet(JWKSetCacheRefreshEvaluator.noRefresh(),
473-
System.currentTimeMillis(), context);
473+
System.currentTimeMillis(), null);
474474
}
475475

476476
private String getFirstSpecifiedKeyID(JWKMatcher jwkMatcher) {

0 commit comments

Comments
 (0)