Skip to content
On this page

useLambdaAuthorizerContext

Composable to access the Lambda Authorizer Context

Usage

import { use, useLambdaAuthorizerContext } from '@serverless-use/apigw'

export default use(async () => {
  const { authorizer } = useLambdaAuthorizerContext<{ name: string }>()

  const { name } = authorizer || {}

  return {
    name,
  }
})