Package com.google.auth.oauth2
Class UrlIdentityPoolSubjectTokenSupplier
- java.lang.Object
-
- com.google.auth.oauth2.UrlIdentityPoolSubjectTokenSupplier
-
- All Implemented Interfaces:
IdentityPoolSubjectTokenSupplier
,java.io.Serializable
class UrlIdentityPoolSubjectTokenSupplier extends java.lang.Object implements IdentityPoolSubjectTokenSupplier
Provider for retrieving subject tokens forIdentityPoolCredentials
to exchange for GCP access tokens. The subject token is retrieved by calling a URL that returns the token.
-
-
Field Summary
Fields Modifier and Type Field Description private IdentityPoolCredentialSource
credentialSource
private static long
serialVersionUID
private HttpTransportFactory
transportFactory
-
Constructor Summary
Constructors Constructor Description UrlIdentityPoolSubjectTokenSupplier(IdentityPoolCredentialSource credentialSource, HttpTransportFactory transportFactory)
Constructor for UrlIdentityPoolSubjectTokenProvider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getSubjectToken(ExternalAccountSupplierContext context)
Gets a subject token that can be exchanged for a GCP access token.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
credentialSource
private final IdentityPoolCredentialSource credentialSource
-
transportFactory
private final transient HttpTransportFactory transportFactory
-
-
Constructor Detail
-
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 Detail
-
getSubjectToken
public java.lang.String getSubjectToken(ExternalAccountSupplierContext context) throws java.io.IOException
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:
java.io.IOException
-
-