Search in sources :

Example 1 with JoseHeader

use of org.hisp.dhis.webapi.security.utils.JoseHeader in project dhis2-core by dhis2.

the class JwtBearerTokenTest method createJwt.

private Jwt createJwt(String provider, String clientId, String mappingKey, String mappingValue) {
    JoseHeader joseHeader = TestJoseHeaders.joseHeader(provider).build();
    JwtClaimsSet jwtClaimsSet = TestJwtClaimsSets.jwtClaimsSet(provider, clientId, mappingKey, mappingValue).build();
    return jwsEncoder.encode(joseHeader, jwtClaimsSet);
}
Also used : JwtClaimsSet(org.hisp.dhis.webapi.security.utils.JwtClaimsSet) JoseHeader(org.hisp.dhis.webapi.security.utils.JoseHeader)

Aggregations

JoseHeader (org.hisp.dhis.webapi.security.utils.JoseHeader)1 JwtClaimsSet (org.hisp.dhis.webapi.security.utils.JwtClaimsSet)1