Search in sources :

Example 1 with CodeVerifier

use of com.nimbusds.oauth2.sdk.pkce.CodeVerifier in project cas by apereo.

the class NimbusOAuthJacksonModuleTests method verifyOperation.

@Test
public void verifyOperation() throws Exception {
    val mapper = SERIALIZER.getObjectMapper();
    assertTrue(mapper.getRegisteredModuleIds().contains(NimbusOAuthJacksonModule.class.getName()));
    runTest(CodeVerifier.class, new CodeVerifier(RandomUtils.randomAlphabetic(CodeVerifier.MIN_LENGTH)));
    runTest(BearerAccessToken.class, new BearerAccessToken("access-token-value"));
    runTest(RefreshToken.class, new RefreshToken("access-token-value"));
    runTest(AccessTokenType.class, AccessTokenType.BEARER);
    runTest(Scope.class, new Scope("profile"));
}
Also used : lombok.val(lombok.val) CodeVerifier(com.nimbusds.oauth2.sdk.pkce.CodeVerifier) RefreshToken(com.nimbusds.oauth2.sdk.token.RefreshToken) Scope(com.nimbusds.oauth2.sdk.Scope) BearerAccessToken(com.nimbusds.oauth2.sdk.token.BearerAccessToken) Test(org.junit.jupiter.api.Test)

Aggregations

Scope (com.nimbusds.oauth2.sdk.Scope)1 CodeVerifier (com.nimbusds.oauth2.sdk.pkce.CodeVerifier)1 BearerAccessToken (com.nimbusds.oauth2.sdk.token.BearerAccessToken)1 RefreshToken (com.nimbusds.oauth2.sdk.token.RefreshToken)1 lombok.val (lombok.val)1 Test (org.junit.jupiter.api.Test)1