Package org.apache.iceberg.rest.auth
Class OAuth2Util
java.lang.Object
org.apache.iceberg.rest.auth.OAuth2Util
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass to handle authorization headers and token refresh. -
Method Summary
Modifier and TypeMethodDescriptionauthHeaders(String token) basicAuthHeaders(String credential) buildOptionalParam(Map<String, String> properties) buildOptionalParam(Map<String, String> properties, String defaultScope) static OAuthTokenResponseexchangeToken(RESTClient client, Map<String, String> headers, String subjectToken, String subjectTokenType, String actorToken, String actorTokenType, String scope) Deprecated.static OAuthTokenResponseexchangeToken(RESTClient client, Map<String, String> headers, String subjectToken, String subjectTokenType, String actorToken, String actorTokenType, String scope, String oauth2ServerUri) Deprecated.since 1.10.0, will be removed in 1.11.0; useexchangeToken(RESTClient, Map, String, String, String, String, String, String, Map)instead.static OAuthTokenResponseexchangeToken(RESTClient client, Map<String, String> headers, String subjectToken, String subjectTokenType, String actorToken, String actorTokenType, String scope, String oauth2ServerUri, Map<String, String> optionalParams) static OAuthTokenResponsefetchToken(RESTClient client, Map<String, String> headers, String credential, String scope) Deprecated.since 1.10.0, will be removed in 1.11.0; usefetchToken(RESTClient, Map, String, String, String, Map)instead.static OAuthTokenResponsefetchToken(RESTClient client, Map<String, String> headers, String credential, String scope, String oauth2ServerUri) Deprecated.since 1.10.0, will be removed in 1.11.0; usefetchToken(RESTClient, Map, String, String, String, Map)instead.static OAuthTokenResponsefetchToken(RESTClient client, Map<String, String> headers, String credential, String scope, String oauth2ServerUri, Map<String, String> optionalParams) static booleanisValidScopeToken(String scopeToken) parseScope(String scope) static OAuthTokenResponsetokenResponseFromJson(com.fasterxml.jackson.databind.JsonNode json) static OAuthTokenResponsetokenResponseFromJson(String json) static StringtokenResponseToJson(OAuthTokenResponse response) static voidtokenResponseToJson(OAuthTokenResponse response, com.fasterxml.jackson.core.JsonGenerator gen) static String
-
Method Details
-
authHeaders
-
basicAuthHeaders
-
isValidScopeToken
-
parseScope
-
toScope
-
buildOptionalParam
-
buildOptionalParam
-
exchangeToken
-
exchangeToken
@Deprecated public static OAuthTokenResponse exchangeToken(RESTClient client, Map<String, String> headers, String subjectToken, String subjectTokenType, String actorToken, String actorTokenType, String scope) Deprecated.since 1.10.0, will be removed in 1.11.0; useexchangeToken(RESTClient, Map, String, String, String, String, String, String, Map)instead. -
exchangeToken
@Deprecated public static OAuthTokenResponse exchangeToken(RESTClient client, Map<String, String> headers, String subjectToken, String subjectTokenType, String actorToken, String actorTokenType, String scope, String oauth2ServerUri) Deprecated.since 1.10.0, will be removed in 1.11.0; useexchangeToken(RESTClient, Map, String, String, String, String, String, String, Map)instead. -
fetchToken
-
fetchToken
@Deprecated public static OAuthTokenResponse fetchToken(RESTClient client, Map<String, String> headers, String credential, String scope) Deprecated.since 1.10.0, will be removed in 1.11.0; usefetchToken(RESTClient, Map, String, String, String, Map)instead. -
fetchToken
@Deprecated public static OAuthTokenResponse fetchToken(RESTClient client, Map<String, String> headers, String credential, String scope, String oauth2ServerUri) Deprecated.since 1.10.0, will be removed in 1.11.0; usefetchToken(RESTClient, Map, String, String, String, Map)instead. -
tokenResponseToJson
-
tokenResponseToJson
public static void tokenResponseToJson(OAuthTokenResponse response, com.fasterxml.jackson.core.JsonGenerator gen) throws IOException - Throws:
IOException
-
tokenResponseFromJson
-
tokenResponseFromJson
public static OAuthTokenResponse tokenResponseFromJson(com.fasterxml.jackson.databind.JsonNode json)
-
exchangeToken(RESTClient, Map, String, String, String, String, String, String, Map)instead.