public static OAuth20AccessToken from(final OAuth2AccessToken accessToken) {
            return new OAuth20AccessToken(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