Add support for an authorizer property to the rest-api component #204
Labels
good first issue
Good for newcomers
kind/feature
New feature
stage/accepted
This is ready to be worked on
Description
It would be great to have support for authorizers in the rest-api component. Our
rest-api
component dynamically creates either anaws-apigateway
under the hood or anevent-gateway
depending upon thegateway
input.https://github.com/serverless/components/blob/master/registry/rest-api/index.js#L162-L166
For now, we can only add support for this authorizer property to the
api-gateway
portion until we add support for authorizers to the event-gateway.The
aws-apigateway
component is built using theimportRestApi
method in the sdk which uses swagger to define the api.https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/APIGateway.html#importRestApi-property
The component takes in the inputs and converts them into a swagger definition.
https://github.com/serverless/components/blob/master/registry/aws-apigateway/index.js#L24-L27
The implementation would use the api gateway swagger extensions for adding authorizers to an api.
https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions-authorizer.html
An example of what the final implementation would look like to use.
The text was updated successfully, but these errors were encountered: