Skip to content

Custom Authorizer function #205

Answered by mgogoulos
theobouwman asked this question in Q&A
Discussion options

You must be logged in to vote

I guess by now you figured this out, but let me provide an example of how we use a custom authorizer in case it helps

functions:
  app:
    name: ourapp-service-handler 
    handler: wsgi_handler.handler
    events:
      - http:
          method: ANY
          path: /
          cors: true
      - http:
          method: ANY
          path: '{proxy+}'
          cors: true
          authorizer:
            name: custom_auth
            identitySource: method.request.header.Authorization
            type: token
  custom_auth:
    handler: ourapp.functionxyz.auth_authorizer
    warmup:
      enabled: false

So on ourapp.functionxyz.py there is auth_authorizer function that performs authoriza…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by logandk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #194 on April 04, 2022 08:24.