@JsonIgnore
    public OAuth2AccessToken toAccessToken() {
        return new OAuth2AccessToken(accessToken.getAccessToken(),
            accessToken.getTokenType(), accessToken.getExpiresIn(),
            accessToken.getRefreshToken(), accessToken.getScope(),
            accessToken.getRawResponse());
    }
For OAuth2 Authorization Code Flow.

@param code       the authorization code
pac4j-oauth/src/main/java/org/pac4j/oauth/credentials/OAuth20Credentials.java