class UrlSource implements ExternalAccountCredentialSourceInterface (View source)

Retrieve a token from a URL.

Methods

__construct(string $url, string $format = null, string $subjectTokenFieldName = null, array $headers = null)

No description

string
fetchSubjectToken(callable $httpHandler = null)

No description

string|null
getCacheKey()

Get the cache key for the credentials.

Details

__construct(string $url, string $format = null, string $subjectTokenFieldName = null, array $headers = null)

No description

Parameters

string $url

The URL to fetch the subject token from.

string $format

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

string $subjectTokenFieldName

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

array $headers

Request headers to send in with the request to the URL.

string fetchSubjectToken(callable $httpHandler = null)

No description

Parameters

callable $httpHandler

Return Value

string

string|null getCacheKey()

Get the cache key for the credentials.

The format for the cache key is: URL

Return Value

string|null