Class WebSocketLambdaAuthorizer
Authorize WebSocket Api routes via a lambda function.
Inheritance
Implements
Namespace: Amazon.CDK.AwsApigatewayv2Authorizers
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class WebSocketLambdaAuthorizer : DeputyBase, IWebSocketRouteAuthorizer
Syntax (vb)
Public Class WebSocketLambdaAuthorizer
Inherits DeputyBase
Implements IWebSocketRouteAuthorizer
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AwsApigatewayv2Authorizers;
using Amazon.CDK.AwsApigatewayv2Integrations;
// 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
Web |
Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Web |
Used by jsii to construct an instance of this class from DeputyProps |
Web |
Methods
Bind(IWeb |
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. By Ref Value 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. Deputy Base. Deputy Props The deputy props
WebSocketLambdaAuthorizer(String, IFunction, IWebSocketLambdaAuthorizerProps)
public WebSocketLambdaAuthorizer(string id, IFunction handler, IWebSocketLambdaAuthorizerProps props = null)
Parameters
- id System.
String - handler IFunction
- props IWeb
Socket Lambda Authorizer Props
Methods
Bind(IWebSocketRouteAuthorizerBindOptions)
Bind this authorizer to a specified WebSocket route.
public virtual IWebSocketRouteAuthorizerConfig Bind(IWebSocketRouteAuthorizerBindOptions options)
Parameters
Returns
IWeb