# HttpRouteAuthorizerConfig

Results of binding an authorizer to an http route.

Returned by: [IHttpRouteAuthorizer.bind](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.IHttpRouteAuthorizer.html#bind)

- Source: [`aws-apigatewayv2/lib/http/authorizer.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-apigatewayv2/lib/http/authorizer.ts#L252)
- Type last changed: v2.112.0 · 1 Dec 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apigatewayv2 as apigatewayv2 } from 'aws-cdk-lib';
const httpRouteAuthorizerConfig: apigatewayv2.HttpRouteAuthorizerConfig = {
  authorizationType: 'authorizationType',

  // the properties below are optional
  authorizationScopes: ['authorizationScopes'],
  authorizerId: 'authorizerId',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_apigatewayv2 as apigatewayv2

http_route_authorizer_config = apigatewayv2.HttpRouteAuthorizerConfig(
    authorization_type="authorizationType",

    # the properties below are optional
    authorization_scopes=["authorizationScopes"],
    authorizer_id="authorizerId"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.apigatewayv2.*;

HttpRouteAuthorizerConfig httpRouteAuthorizerConfig = HttpRouteAuthorizerConfig.builder()
        .authorizationType("authorizationType")

        // the properties below are optional
        .authorizationScopes(List.of("authorizationScopes"))
        .authorizerId("authorizerId")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Apigatewayv2;

var httpRouteAuthorizerConfig = new HttpRouteAuthorizerConfig {
    AuthorizationType = "authorizationType",

    // the properties below are optional
    AuthorizationScopes = new [] { "authorizationScopes" },
    AuthorizerId = "authorizerId"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

httpRouteAuthorizerConfig := &HttpRouteAuthorizerConfig{
	AuthorizationType: jsii.String("authorizationType"),

	// the properties below are optional
	AuthorizationScopes: []*string{
		jsii.String("authorizationScopes"),
	},
	AuthorizerId: jsii.String("authorizerId"),
}
```

## Properties

- `authorizationScopes`: string[] — The list of OIDC scopes to include in the authorization.

  **Default:** no authorization scopes

- `authorizationType`: string (required) — The type of authorization.

  Possible values are:
  - AWS_IAM - IAM Authorizer
  - JWT - JSON Web Token Authorizer
  - CUSTOM - Lambda Authorizer
  - NONE - No Authorization

- `authorizerId`: string — The authorizer id.

  **Default:** No authorizer id (useful for AWS_IAM route authorizer)
