# Google Cloud Iap V1 Client - Class OAuth2 (2.3.0)

2.3.0 (latest) 2.2.2 2.1.2 2.0.3 1.4.5 1.3.4 1.2.3 1.1.1 1.0.1 Reference documentation and code samples for the Google Cloud Iap V1 Client class OAuth2.

The OAuth 2.0 Settings

Generated from protobuf message `google.cloud.iap.v1.OAuth2`

## Namespace

Google \\ Cloud \\ Iap \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ client_id` | `string` The OAuth 2.0 client ID registered in the workforce identity federation OAuth 2.0 Server. |
| `↳ client_secret` | `string` Input only. The OAuth 2.0 client secret created while registering the client ID. |
| `↳ client_secret_sha256` | `string` Output only. SHA256 hash value for the client secret. This field is returned by IAP when the settings are retrieved. |

### getClientId

The OAuth 2.0 client ID registered in the workforce identity federation
OAuth 2.0 Server.

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

### setClientId

The OAuth 2.0 client ID registered in the workforce identity federation
OAuth 2.0 Server.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getClientSecret

Input only. The OAuth 2.0 client secret created while registering the
client ID.

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

### setClientSecret

Input only. The OAuth 2.0 client secret created while registering the
client ID.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getClientSecretSha256

Output only. SHA256 hash value for the client secret. This field is
returned by IAP when the settings are retrieved.

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

### setClientSecretSha256

Output only. SHA256 hash value for the client secret. This field is
returned by IAP when the settings are retrieved.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |