Class WebSocketLambdaAuthorizer
(experimental) Authorize WebSocket Api routes via a lambda function.
Inheritance
System.Object
WebSocketLambdaAuthorizer
Implements
Namespace: Amazon.CDK.AWS.APIGatewayv2.Authorizers
Assembly: Amazon.CDK.AWS.APIGatewayv2.Authorizers.dll
Syntax (csharp)
public class WebSocketLambdaAuthorizer : DeputyBase, IWebSocketRouteAuthorizer
Syntax (vb)
Public Class WebSocketLambdaAuthorizer
Inherits DeputyBase
Implements IWebSocketRouteAuthorizer
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.APIGatewayv2.Authorizers;
using Amazon.CDK.AWS.APIGatewayv2.Integrations;
// This function handles your auth logic
Function authHandler;
// This function handles your WebSocket requests
Function handler;
var authorizer = new WebSocketLambdaAuthorizer("Authorizer", authHandler);
var integration = new WebSocketLambdaIntegration("Integration", handler);
new WebSocketApi(this, "WebSocketApi", new WebSocketApiProps {
ConnectRouteOptions = new WebSocketRouteOptions {
Integration = integration,
Authorizer = authorizer
}
});
Synopsis
Constructors
WebSocketLambdaAuthorizer(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
WebSocketLambdaAuthorizer(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
WebSocketLambdaAuthorizer(String, IFunction, IWebSocketLambdaAuthorizerProps) |
Methods
Bind(IWebSocketRouteAuthorizerBindOptions) | (experimental) Bind this authorizer to a specified WebSocket route. |
Constructors
WebSocketLambdaAuthorizer(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected WebSocketLambdaAuthorizer(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
WebSocketLambdaAuthorizer(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected WebSocketLambdaAuthorizer(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
WebSocketLambdaAuthorizer(String, IFunction, IWebSocketLambdaAuthorizerProps)
public WebSocketLambdaAuthorizer(string id, IFunction handler, IWebSocketLambdaAuthorizerProps props = null)
Parameters
- id System.String
- handler IFunction
- props IWebSocketLambdaAuthorizerProps
Remarks
Stability: Experimental
Methods
Bind(IWebSocketRouteAuthorizerBindOptions)
(experimental) Bind this authorizer to a specified WebSocket route.
public virtual IWebSocketRouteAuthorizerConfig Bind(IWebSocketRouteAuthorizerBindOptions options)
Parameters
Returns
IWebSocketRouteAuthorizerConfig
Remarks
Stability: Experimental