Package com.google.auth.oauth2
Class FileIdentityPoolSubjectTokenSupplier
- java.lang.Object
-
- com.google.auth.oauth2.FileIdentityPoolSubjectTokenSupplier
-
- All Implemented Interfaces:
IdentityPoolSubjectTokenSupplier
,java.io.Serializable
class FileIdentityPoolSubjectTokenSupplier extends java.lang.Object implements IdentityPoolSubjectTokenSupplier
Internal provider for retrieving subject tokens forIdentityPoolCredentials
to exchange for GCP access tokens via a local file.
-
-
Field Summary
Fields Modifier and Type Field Description private IdentityPoolCredentialSource
credentialSource
private long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description FileIdentityPoolSubjectTokenSupplier(IdentityPoolCredentialSource credentialSource)
Constructor for FileIdentitySubjectTokenProvider
-
Method Summary
All Methods Static 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.(package private) static java.lang.String
parseToken(java.io.InputStream inputStream, IdentityPoolCredentialSource credentialSource)
-
-
-
Field Detail
-
serialVersionUID
private final long serialVersionUID
- See Also:
- Constant Field Values
-
credentialSource
private final IdentityPoolCredentialSource credentialSource
-
-
Constructor Detail
-
FileIdentityPoolSubjectTokenSupplier
FileIdentityPoolSubjectTokenSupplier(IdentityPoolCredentialSource credentialSource)
Constructor for FileIdentitySubjectTokenProvider- Parameters:
credentialSource
- the credential source to use.
-
-
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
-
parseToken
static java.lang.String parseToken(java.io.InputStream inputStream, IdentityPoolCredentialSource credentialSource) throws java.io.IOException
- Throws:
java.io.IOException
-
-