1.55.4 (latest) 1.55.3 1.52.0 1.50.1 1.49.0 1.48.1 1.47.1 1.46.0 1.45.2 Reference documentation and code samples for the Google Auth Library Client class UrlSource.

Retrieve a token from a URL.

## Namespace

Google \\ Auth \\ CredentialSource

## Implements

[ExternalAccountCredentialSourceInterface](https://docs.cloud.google.com/php/docs/reference/auth/latest/ExternalAccountCredentialSourceInterface.md.txt)

## Methods

### __construct

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `url` | `string` The URL to fetch the subject token from. |
| `format` | `string|null` The format of the token in the response. Can be null or "json". |
| `subjectTokenFieldName` | `string|null` The name of the field containing the token in the response. This is required when format is "json". |
| `headers` | `array` Request headers to send in with the request to the URL. |

### fetchSubjectToken

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `httpHandler` | `?callable` |

### getCacheKey

Get the cache key for the credentials.

The format for the cache key is:
URL

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `?string` |   |