use of org.hisp.dhis.webapi.security.utils.JwtUtils in project dhis2-core by dhis2.
the class JwtBearerTokenTest method setUpClass.
@BeforeAll
static void setUpClass() throws JOSEException {
DhisWebApiWebSecurityConfig.setApiContextPath("");
JWKSource<SecurityContext> jwkSource = (jwkSelector, securityContext) -> jwkSelector.select(new JWKSet(ImmutableList.of(RSA_KEY)));
jwsEncoder = new JwtUtils(jwkSource);
jwtDecoder = NimbusJwtDecoder.withPublicKey(RSA_KEY.toRSAPublicKey()).build();
}
Aggregations