Class BearerToken
java.lang.Object
com.google.api.client.auth.oauth2.BearerToken
OAuth 2.0 helper for accessing protected resources using the Bearer Token specification.
- Since:
- 1.7
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
Immutable and thread-safe OAuth 2.0 method for accessing protected resources using the Authorization Request Header Field.(package private) static final class
Immutable and thread-safe OAuth 2.0 method for accessing protected resources using the Form-Encoded Body Parameter.(package private) static final class
Immutable and thread-safe OAuth 2.0 method for accessing protected resources using the URI Query Parameter. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final Pattern
In case an abnormal HTTP response is received withWWW-Authenticate
header, and its value contains this error pattern, we will try to refresh the token.(package private) static final String
Query and form-encoded parameter name. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Credential.AccessMethod
Returns a new instance of an immutable and thread-safe OAuth 2.0 method for accessing protected resources using the Authorization Request Header Field.static Credential.AccessMethod
Returns a new instance of an immutable and thread-safe OAuth 2.0 method for accessing protected resources using the Form-Encoded Body Parameter.static Credential.AccessMethod
Returns a new instance of an immutable and thread-safe OAuth 2.0 method for accessing protected resources using the URI Query Parameter.
-
Field Details
-
PARAM_NAME
Query and form-encoded parameter name.- See Also:
-
INVALID_TOKEN_ERROR
In case an abnormal HTTP response is received withWWW-Authenticate
header, and its value contains this error pattern, we will try to refresh the token.
-
-
Constructor Details
-
BearerToken
public BearerToken()
-
-
Method Details
-
authorizationHeaderAccessMethod
Returns a new instance of an immutable and thread-safe OAuth 2.0 method for accessing protected resources using the Authorization Request Header Field.According to the specification, this method MUST be supported by resource servers.
-
formEncodedBodyAccessMethod
Returns a new instance of an immutable and thread-safe OAuth 2.0 method for accessing protected resources using the Form-Encoded Body Parameter. -
queryParameterAccessMethod
Returns a new instance of an immutable and thread-safe OAuth 2.0 method for accessing protected resources using the URI Query Parameter.
-