use of com.nimbusds.langtag.LangTag in project OpenConext-oidcng by OpenConext.
the class JWTRequestTest method fullBlown.
@Test
public void fullBlown() throws Exception {
OpenIDClient client = getClient();
setCertificateFields(client, getStrippedCertificate(), null, null);
String keyID = getCertificateKeyID(client);
SignedJWT signedJWT = signedJWT(client.getClientId(), keyID, client.getRedirectUrls().get(0));
ClaimsRequest claimsRequest = new ClaimsRequest();
claimsRequest.addIDTokenClaim("email");
List<LangTag> langTags = Collections.singletonList(new LangTag("en"));
List<ACR> acrValues = Collections.singletonList(new ACR("loa"));
AuthenticationRequest authenticationRequest = new AuthenticationRequest(new URI("http://localhost/authorize"), ResponseType.getDefault(), ResponseMode.FRAGMENT, new Scope("openid"), new ClientID(client.getClientId()), new URI(client.getRedirectUrls().get(0)), new State("state"), new Nonce("nonce"), Display.getDefault(), Prompt.parse("consent"), 1200, langTags, langTags, null, "hint", acrValues, claimsRequest, "purpose", signedJWT, null, CodeChallenge.compute(CodeChallengeMethod.S256, new CodeVerifier()), CodeChallengeMethod.S256, Collections.singletonList(new URI("http://localhost")), true, Collections.singletonMap("custom", Collections.singletonList("value")));
authenticationRequest = JWTRequest.parse(authenticationRequest, client);
assertEquals("login", authenticationRequest.getPrompt().toString());
}
Aggregations