Interface: WebSocketAuthHandlerConfig<AuthPayload>
handler.WebSocketAuthHandlerConfig
Configuration for websocket authentication handler.
Type parameters
Name |
---|
AuthPayload |
Hierarchy
-
Omit
<lambda.WebSocketHandlerConfig
<AuthPayload
>,"handler"
>↳
WebSocketAuthHandlerConfig
Properties
coerceTypes
• Optional
coerceTypes: boolean
If schema validation should attempt to coerce the parsed types of the request. Defaults to
false
.
Inherited from
Omit.coerceTypes
handler
• handler: (playerId
: GlobalPlayerId
, payload
: AuthPayload
, event
: APIGatewayProxyEvent
, context
: Context
) => Promise
<void
| APIGatewayProxyResult
>
Type declaration
▸ (playerId
, payload
, event
, context
): Promise
<void
| APIGatewayProxyResult
>
Parameters
Name | Type |
---|---|
playerId |
GlobalPlayerId |
payload |
AuthPayload |
event |
APIGatewayProxyEvent |
context |
Context |
Returns
Promise
<void
| APIGatewayProxyResult
>
schema
• Optional
schema: any
Optional schema to enable automatic schema validation: failed schema validation will result
in a status: 'error'
response with the schema validation error in the message
field.
Inherited from
Omit.schema