use of com.nimbusds.oauth2.sdk.assertions.jwt.JWTAssertionDetails in project OpenConext-oidcng by OpenConext.
the class TokenEndpointTest method clientSecretJWT.
private ClientSecretJWT clientSecretJWT(String issuer, String tokenEndPoint, String secret, Date expiration) throws JOSEException {
// Issuer and subject in client JWT assertion must designate the same client identifier
JWTAssertionDetails jwtAssertionDetails = new JWTAssertionDetails(new Issuer(issuer), new Subject(issuer), Audience.create(tokenEndPoint), expiration, null, null, null, null);
SignedJWT signedJWT = JWTAssertionFactory.create(jwtAssertionDetails, JWSAlgorithm.HS256, new Secret(secret));
return new ClientSecretJWT(signedJWT);
}
Aggregations