Search in sources :

Example 1 with JWTAssertionDetails

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);
}
Also used : Secret(com.nimbusds.oauth2.sdk.auth.Secret) Issuer(com.nimbusds.oauth2.sdk.id.Issuer) ClientSecretJWT(com.nimbusds.oauth2.sdk.auth.ClientSecretJWT) SignedJWT(com.nimbusds.jwt.SignedJWT) JWTAssertionDetails(com.nimbusds.oauth2.sdk.assertions.jwt.JWTAssertionDetails) Subject(com.nimbusds.oauth2.sdk.id.Subject)

Aggregations

SignedJWT (com.nimbusds.jwt.SignedJWT)1 JWTAssertionDetails (com.nimbusds.oauth2.sdk.assertions.jwt.JWTAssertionDetails)1 ClientSecretJWT (com.nimbusds.oauth2.sdk.auth.ClientSecretJWT)1 Secret (com.nimbusds.oauth2.sdk.auth.Secret)1 Issuer (com.nimbusds.oauth2.sdk.id.Issuer)1 Subject (com.nimbusds.oauth2.sdk.id.Subject)1