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 FileSource.

Retrieve a token from a file.

## Namespace

Google \\ Auth \\ CredentialSource

## Implements

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

## Methods

### __construct

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `file` | `string` The file to read the subject token from. |
| `format` | `string|null` The format of the token in the file. Can be null or "json". |
| `subjectTokenFieldName` | `string|null` The name of the field containing the token in the file. This is required when format is "json". |

### fetchSubjectToken

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

### getCacheKey

Gets the unique key for caching.

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

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