Skip to content

Commit

Permalink
Polish gh-15937
Browse files Browse the repository at this point in the history
  • Loading branch information
sjohnr committed Nov 13, 2024
1 parent aec5afb commit ca1f891
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ public void jwsKeySelectorWhenNoAlgorithmThenReturnsRS256Selector() {
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();
}
Expand All @@ -638,7 +638,7 @@ public void jwsKeySelectorWhenOneAlgorithmThenReturnsSingleSelector() {
.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();
}
Expand All @@ -652,7 +652,7 @@ public void jwsKeySelectorWhenMultipleAlgorithmThenReturnsCompositeSelector() {
.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();
Expand Down

0 comments on commit ca1f891

Please sign in to comment.