Polish gh-15937

This commit is contained in:
Steve Riesenberg 2024-11-13 15:16:00 -06:00
parent aec5afb6eb
commit ca1f891f25
1 changed files with 3 additions and 3 deletions

View File

@ -626,7 +626,7 @@ public class NimbusReactiveJwtDecoderTests {
JWSKeySelector<JWKSecurityContext> jwsKeySelector = NimbusReactiveJwtDecoder.withJwkSetUri(this.jwkSetUri)
.jwsKeySelector(jwkSource)
.block();
assertThat(jwsKeySelector instanceof JWSVerificationKeySelector).isTrue();
assertThat(jwsKeySelector).isInstanceOf(JWSVerificationKeySelector.class);
JWSVerificationKeySelector<JWKSecurityContext> jwsVerificationKeySelector = (JWSVerificationKeySelector<JWKSecurityContext>) jwsKeySelector;
assertThat(jwsVerificationKeySelector.isAllowed(JWSAlgorithm.RS256)).isTrue();
}
@ -638,7 +638,7 @@ public class NimbusReactiveJwtDecoderTests {
.jwsAlgorithm(SignatureAlgorithm.RS512)
.jwsKeySelector(jwkSource)
.block();
assertThat(jwsKeySelector instanceof JWSVerificationKeySelector).isTrue();
assertThat(jwsKeySelector).isInstanceOf(JWSVerificationKeySelector.class);
JWSVerificationKeySelector<JWKSecurityContext> jwsVerificationKeySelector = (JWSVerificationKeySelector<JWKSecurityContext>) jwsKeySelector;
assertThat(jwsVerificationKeySelector.isAllowed(JWSAlgorithm.RS512)).isTrue();
}
@ -652,7 +652,7 @@ public class NimbusReactiveJwtDecoderTests {
.jwsAlgorithm(SignatureAlgorithm.RS512)
.jwsKeySelector(jwkSource).block();
// @formatter:on
assertThat(jwsKeySelector instanceof JWSVerificationKeySelector).isTrue();
assertThat(jwsKeySelector).isInstanceOf(JWSVerificationKeySelector.class);
JWSVerificationKeySelector<?> jwsAlgorithmMapKeySelector = (JWSVerificationKeySelector<?>) jwsKeySelector;
assertThat(jwsAlgorithmMapKeySelector.isAllowed(JWSAlgorithm.RS256)).isTrue();
assertThat(jwsAlgorithmMapKeySelector.isAllowed(JWSAlgorithm.RS512)).isTrue();