Package com.google.auth.oauth2
Class FileIdentityPoolSubjectTokenSupplier
java.lang.Object
com.google.auth.oauth2.FileIdentityPoolSubjectTokenSupplier
- All Implemented Interfaces:
IdentityPoolSubjectTokenSupplier
,Serializable
class FileIdentityPoolSubjectTokenSupplier
extends Object
implements IdentityPoolSubjectTokenSupplier
Internal provider for retrieving subject tokens for
IdentityPoolCredentials
to exchange
for GCP access tokens via a local file.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFileIdentityPoolSubjectTokenSupplier
(IdentityPoolCredentialSource credentialSource) Constructor for FileIdentitySubjectTokenProvider -
Method Summary
Modifier and TypeMethodDescriptionGets a subject token that can be exchanged for a GCP access token.(package private) static String
parseToken
(InputStream inputStream, IdentityPoolCredentialSource credentialSource)
-
Field Details
-
serialVersionUID
private final long serialVersionUID- See Also:
-
credentialSource
-
-
Constructor Details
-
FileIdentityPoolSubjectTokenSupplier
FileIdentityPoolSubjectTokenSupplier(IdentityPoolCredentialSource credentialSource) Constructor for FileIdentitySubjectTokenProvider- Parameters:
credentialSource
- the credential source to use.
-
-
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
-
parseToken
static String parseToken(InputStream inputStream, IdentityPoolCredentialSource credentialSource) throws IOException - Throws:
IOException
-