Skip to content
v2.278.0

GatewayAuthorizer Class ​

Factory class for creating Gateway Authorizers.

Initializer ​

ts
new GatewayAuthorizer()
python
GatewayAuthorizer()
java
new GatewayAuthorizer()
csharp
new GatewayAuthorizer()
go
NewGatewayAuthorizer()

Methods ​

usingAwsIam(): IGatewayAuthorizerConfig@staticmethod def using_aws_iam() -> IGatewayAuthorizerConfigpublic static IGatewayAuthorizerConfig usingAwsIam()public static IGatewayAuthorizerConfig UsingAwsIam()func UsingAwsIam() IGatewayAuthorizerConfig static #
AWS IAM authorizer instance.
usingCognito(props: CognitoAuthorizerProps): IGatewayAuthorizerConfig@staticmethod def using_cognito(props: CognitoAuthorizerProps) -> IGatewayAuthorizerConfigpublic static IGatewayAuthorizerConfig usingCognito(CognitoAuthorizerProps props)public static IGatewayAuthorizerConfig UsingCognito(CognitoAuthorizerProps props)func UsingCognito(Props CognitoAuthorizerProps) IGatewayAuthorizerConfig static #
Create a JWT authorizer from Cognito User Pool.
1 parameter · returns

Parameters

  • propspropspropspropsProps — - The Cognito configuration.

Returns: CustomJwtAuthorizer configured for Cognito

usingCustomJwt(configuration: CustomJwtConfiguration): IGatewayAuthorizerConfig@staticmethod def using_custom_jwt(configuration: CustomJwtConfiguration) -> IGatewayAuthorizerConfigpublic static IGatewayAuthorizerConfig usingCustomJwt(CustomJwtConfiguration configuration)public static IGatewayAuthorizerConfig UsingCustomJwt(CustomJwtConfiguration configuration)func UsingCustomJwt(Configuration CustomJwtConfiguration) IGatewayAuthorizerConfig static #
Create a custom JWT authorizer.
1 parameter · returns

Parameters

  • configurationconfigurationconfigurationconfigurationConfiguration — - The JWT configuration.

Returns: IGatewayAuthorizerConfig configured for custom JWT

withNoAuth(): IGatewayAuthorizerConfig@staticmethod def with_no_auth() -> IGatewayAuthorizerConfigpublic static IGatewayAuthorizerConfig withNoAuth()public static IGatewayAuthorizerConfig WithNoAuth()func WithNoAuth() IGatewayAuthorizerConfig static #
No authorization — the gateway will not perform any inbound authorization.

The gateway endpoint will be publicly accessible without credentials. Use this for testing/development, or for production gateways where you have implemented compensating controls such as Gateway Interceptors.

returns

Returns: IGatewayAuthorizerConfig configured for no authorization