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

Authenticates requests using External Account Authorized User credentials.

This class allows authorizing requests from user refresh tokens sourced from
external accounts.

## Namespace

Google \\ Auth \\ Credentials

## Implements

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

## Methods

### __construct

Create a new ExternalAccountAuthorizedUserCredentials.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `scope` | `string|string[]|null` the scope of the access request, expressed either as an Array or as a space-delimited String. |
| `jsonKey` | `array` JSON credential file path or JSON credentials as an associative array |

### fetchAuthToken

Fetches the auth tokens based on the current state.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `httpHandler` | `callable|null` |
| `headers` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `array` | { A set of auth related metadata, containing the following @type string $access_token @type int $expires_in @type string $token_type } |

### updateMetadata

Updates metadata with the authorization token.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `metadata` | `array` metadata hashmap |
| `authUri` | `string` optional auth uri |
| `httpHandler` | `callable|null` callback which delivers psr7 request |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `array` | updated metadata hashmap |

### getCacheKey

Return the Cache Key for the credentials.

The format for the Cache key is
Hash(ClientId.Scope.RefreshToken)

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

### getLastReceivedToken

Returns an associative array with the token and
expiration time.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `array` |   |

### getQuotaProject

Get the quota project used for this API request

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

### getUniverseDomain

Get the universe domain used for this API request

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

### getGrantedScope

Get the granted scopes (if they exist) for the last fetched token.

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