Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
strehle committed Nov 29, 2023
1 parent affc0cc commit 5d7c941
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public CommonSignatureVerifier(JsonWebKey verificationKey) {
String keyId = verificationKey.getKid();
if (keyId == null || algorithm == null) {
delegate = JsonWebKeyHelper.parseConfiguration(webKey.toJSONString()).getKeys().get(0);
jwk = new JWKSet(webKey);
} else {
delegate = createJwkDelegate(verificationKey.getKid(), algorithm, webKey);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThrows;

class CommonSignatureVerifierTest {
Expand All @@ -51,7 +52,7 @@ void testGetRsaPublicKeyFromConfig(String value) {
assertNotNull(cs);
assertEquals("RS256", cs.algorithm());
assertEquals(1, cs.getJwkSet().size());
assertEquals("RS256", cs.getJwkSet().getKeys().get(0).getAlgorithm().getName());
assertNull(cs.getJwkSet().getKeys().get(0).getAlgorithm());
}

@Test
Expand Down

0 comments on commit 5d7c941

Please sign in to comment.