public class OAuth2Util
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
OAuth2Util.AuthSession
Class to handle authorization headers and token refresh.
|
Modifier and Type | Method and Description |
---|---|
static java.util.Map<java.lang.String,java.lang.String> |
authHeaders(java.lang.String token) |
static java.util.Map<java.lang.String,java.lang.String> |
basicAuthHeaders(java.lang.String credential) |
static OAuthTokenResponse |
exchangeToken(RESTClient client,
java.util.Map<java.lang.String,java.lang.String> headers,
java.lang.String subjectToken,
java.lang.String subjectTokenType,
java.lang.String actorToken,
java.lang.String actorTokenType,
java.lang.String scope) |
static OAuthTokenResponse |
fetchToken(RESTClient client,
java.util.Map<java.lang.String,java.lang.String> headers,
java.lang.String credential,
java.lang.String scope) |
static boolean |
isValidScopeToken(java.lang.String scopeToken) |
static java.util.List<java.lang.String> |
parseScope(java.lang.String scope) |
static OAuthTokenResponse |
tokenResponseFromJson(com.fasterxml.jackson.databind.JsonNode json) |
static OAuthTokenResponse |
tokenResponseFromJson(java.lang.String json) |
static java.lang.String |
tokenResponseToJson(OAuthTokenResponse response) |
static void |
tokenResponseToJson(OAuthTokenResponse response,
com.fasterxml.jackson.core.JsonGenerator gen) |
static java.lang.String |
toScope(java.lang.Iterable<java.lang.String> scopes) |
public static java.util.Map<java.lang.String,java.lang.String> authHeaders(java.lang.String token)
public static java.util.Map<java.lang.String,java.lang.String> basicAuthHeaders(java.lang.String credential)
public static boolean isValidScopeToken(java.lang.String scopeToken)
public static java.util.List<java.lang.String> parseScope(java.lang.String scope)
public static java.lang.String toScope(java.lang.Iterable<java.lang.String> scopes)
public static OAuthTokenResponse exchangeToken(RESTClient client, java.util.Map<java.lang.String,java.lang.String> headers, java.lang.String subjectToken, java.lang.String subjectTokenType, java.lang.String actorToken, java.lang.String actorTokenType, java.lang.String scope)
public static OAuthTokenResponse fetchToken(RESTClient client, java.util.Map<java.lang.String,java.lang.String> headers, java.lang.String credential, java.lang.String scope)
public static java.lang.String tokenResponseToJson(OAuthTokenResponse response)
public static void tokenResponseToJson(OAuthTokenResponse response, com.fasterxml.jackson.core.JsonGenerator gen) throws java.io.IOException
java.io.IOException
public static OAuthTokenResponse tokenResponseFromJson(java.lang.String json)
public static OAuthTokenResponse tokenResponseFromJson(com.fasterxml.jackson.databind.JsonNode json)