class FileSource implements ExternalAccountCredentialSourceInterface (View source)

Retrieve a token from a file.

Methods

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

No description

string
fetchSubjectToken(callable|null $httpHandler = null)

No description

string|null
getCacheKey()

Gets the unique key for caching.

Details

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

No description

Parameters

string $file

The file to read the subject token from.

string|null $format

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

string|null $subjectTokenFieldName

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

string fetchSubjectToken(callable|null $httpHandler = null)

No description

Parameters

callable|null $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