# Declare your path
paths:
/any-endpoint-you-want:
get:
summary: Get some date
description: Returns any data you want
security:
- authenticated: []
# Declare your security rule
securityDefinitions:
authenticated:
type: "apiKey"
name: "Authorization" # Header name
in: "header"
x-amazon-apigateway-authtype: "cognito_user_pools"
x-amazon-apigateway-authorizer:
providerARNs:
- ${apigw_authorizer_cognito} # You user pool ARN, like 'arn:aws:cognito-idp:eu-west-1:123456123456:userpool/eu-west-1_a1z2e3r4t'
type: "cognito_user_pools"
See auth-login.ts basic example
See example in api.service.ts