class FileSource implements ExternalAccountCredentialSourceInterface (View source)

Retrieve a token from a file.

Methods

__construct(string $file, string $format = null, string $subjectTokenFieldName = null)

No description

string
fetchSubjectToken(callable $httpHandler = null)

No description

string|null
getCacheKey()

Gets the unique key for caching.

Details

__construct(string $file, string $format = null, string $subjectTokenFieldName = null)

No description

Parameters

string $file

The file to read the subject token from.

string $format

The format of the token in the file. Can be null or "json".

string $subjectTokenFieldName

The name of the field containing the token in the file. This is required when format is "json".

string fetchSubjectToken(callable $httpHandler = null)

No description

Parameters

callable $httpHandler

Return Value

string

string|null getCacheKey()

Gets the unique key for caching.

The format for the cache key one of the following: Filename

Return Value

string|null