# OAuthAuthorizationProps

Properties for `Authorization.oauth()`.

- Source: [`aws-events/lib/connection.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-events/lib/connection.ts#L146)
- Type last changed: v2.13.0 · 19 Feb 2022

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_events as events } from 'aws-cdk-lib';

declare const httpParameter: events.HttpParameter;
declare const secretValue: cdk.SecretValue;
const oAuthAuthorizationProps: events.OAuthAuthorizationProps = {
  authorizationEndpoint: 'authorizationEndpoint',
  clientId: 'clientId',
  clientSecret: secretValue,
  httpMethod: events.HttpMethod.POST,

  // the properties below are optional
  bodyParameters: {
    bodyParametersKey: httpParameter,
  },
  headerParameters: {
    headerParametersKey: httpParameter,
  },
  queryStringParameters: {
    queryStringParametersKey: httpParameter,
  },
};
```

## Properties

- `authorizationEndpoint`: string (required) — The URL to the authorization endpoint.

- `bodyParameters`: { [key: string]: [HttpParameter](/cdk/api/v2/docs/aws-cdk-lib.aws_events.HttpParameter.html) } — Additional string parameters to add to the OAuth request body.

  **Default:** No additional parameters

- `clientId`: string (required) — The client ID to use for OAuth authorization for the connection.

- `clientSecret`: [SecretValue](/cdk/api/v2/docs/aws-cdk-lib.SecretValue.html) (required) — The client secret associated with the client ID to use for OAuth authorization for the connection.

- `headerParameters`: { [key: string]: [HttpParameter](/cdk/api/v2/docs/aws-cdk-lib.aws_events.HttpParameter.html) } — Additional string parameters to add to the OAuth request header.

  **Default:** No additional parameters

- `httpMethod`: [HttpMethod](/cdk/api/v2/docs/aws-cdk-lib.aws_events.HttpMethod.html) (required) — The method to use for the authorization request.

  (Can only choose POST, GET or PUT).

- `queryStringParameters`: { [key: string]: [HttpParameter](/cdk/api/v2/docs/aws-cdk-lib.aws_events.HttpParameter.html) } — Additional string parameters to add to the OAuth request query string.

  **Default:** No additional parameters
