🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

serverless-plugin-authorizer

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-plugin-authorizer

Normally you would define this in every function in your http event: ```yaml # Before authorizer: resultTtlInSeconds: 30 arn: arn:aws:lambda:xxxx:function:authorizer-fn type: request ```

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Serverless Plugin Authorizer

Normally you would define this in every function in your http event:

# Before
authorizer:
  resultTtlInSeconds: 30
  arn: arn:aws:lambda:xxxx:function:authorizer-fn
  type: request

However, now you can add authorization which will allow everything to be passed through as authorizer in your functions.

# After
custom:
  authorization:
    resultTtlInSeconds: 30
    arn: arn:aws:lambda:xxxx:function:authorizer-fn
    type: request

Using authorize: true to your http event like so:

# After
functions:
  myFunction:
    handler: src/myFunction.handler
    events:
      - http:
        path: path/to/function
        method: get
        authorize: true

Install

Using yarn:

yarn add serverless-plugin-authorizer

Using npm:

npm install serverless-plugin-authorizer --save-dev

Add the plugin to your serverless.yml file:

plugins:
  - serverless-plugin-authorizer

FAQs

Package last updated on 29 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts