Package com.google.auth.oauth2
Class UrlIdentityPoolSubjectTokenSupplier
java.lang.Object
com.google.auth.oauth2.UrlIdentityPoolSubjectTokenSupplier
- All Implemented Interfaces:
IdentityPoolSubjectTokenSupplier
,Serializable
class UrlIdentityPoolSubjectTokenSupplier
extends Object
implements IdentityPoolSubjectTokenSupplier
Provider for retrieving subject tokens for
IdentityPoolCredentials
to exchange for GCP
access tokens. The subject token is retrieved by calling a URL that returns the token.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IdentityPoolCredentialSource
private static final long
private final HttpTransportFactory
-
Constructor Summary
ConstructorsConstructorDescriptionUrlIdentityPoolSubjectTokenSupplier
(IdentityPoolCredentialSource credentialSource, HttpTransportFactory transportFactory) Constructor for UrlIdentityPoolSubjectTokenProvider. -
Method Summary
Modifier and TypeMethodDescriptionGets a subject token that can be exchanged for a GCP access token.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
credentialSource
-
transportFactory
-
-
Constructor Details
-
UrlIdentityPoolSubjectTokenSupplier
UrlIdentityPoolSubjectTokenSupplier(IdentityPoolCredentialSource credentialSource, HttpTransportFactory transportFactory) Constructor for UrlIdentityPoolSubjectTokenProvider.- Parameters:
credentialSource
- the credential source to use.transportFactory
- the transport factory to use for calling the URL.
-
-
Method Details
-
getSubjectToken
Description copied from interface:IdentityPoolSubjectTokenSupplier
Gets a subject token that can be exchanged for a GCP access token.- Specified by:
getSubjectToken
in interfaceIdentityPoolSubjectTokenSupplier
- Parameters:
context
- relevant context from the calling credential.- Returns:
- a valid subject token.
- Throws:
IOException
-