Add Support for JWK Signature Algorithm Discovery

Issue gh-7160
This commit is contained in:
Nick Hitchan
2020-06-23 20:11:10 -04:00
committed by Josh Cummings
parent 4ffc3d6ceb
commit 290786438c
13 changed files with 229 additions and 12 deletions

View File

@@ -70,6 +70,7 @@ public class JwtIssuerAuthenticationManagerResolverTests {
.setBody(String.format(DEFAULT_RESPONSE_TEMPLATE, issuer, issuer)
));
// @formatter:on
server.enqueue(new MockResponse().setResponseCode(200));
JWSObject jws = new JWSObject(new JWSHeader(JWSAlgorithm.RS256),
new Payload(new JSONObject(Collections.singletonMap(JwtClaimNames.ISS, issuer))));
jws.sign(new RSASSASigner(TestKeys.DEFAULT_PRIVATE_KEY));

View File

@@ -71,6 +71,7 @@ public class JwtIssuerReactiveAuthenticationManagerResolverTests {
String issuer = server.url("").toString();
server.enqueue(new MockResponse().setResponseCode(200).setHeader("Content-Type", "application/json")
.setBody(String.format(DEFAULT_RESPONSE_TEMPLATE, issuer, issuer)));
server.enqueue(new MockResponse().setResponseCode(200));
JWSObject jws = new JWSObject(new JWSHeader(JWSAlgorithm.RS256),
new Payload(new JSONObject(Collections.singletonMap(JwtClaimNames.ISS, issuer))));
jws.sign(new RSASSASigner(TestKeys.DEFAULT_PRIVATE_KEY));