class UrlSource implements ExternalAccountCredentialSourceInterface (View source)

Retrieve a token from a URL.

Methods

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

No description

string
fetchSubjectToken(callable|null $httpHandler = null)

No description

string|null
getCacheKey()

Get the cache key for the credentials.

Details

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

No description

Parameters

string $url

The URL to fetch the subject token from.

string|null $format

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

string|null $subjectTokenFieldName

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

array|null $headers

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

string fetchSubjectToken(callable|null $httpHandler = null)

No description

Parameters

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