Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

arc-macro-auth

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arc-macro-auth

Use JWT authentication with Architect HTTP APIs

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

arc-macro-auth

Use JWT authentication with Architect HTTP APIs.

Ok..How?!

Install:

npm i arc-macro-auth

And add to your .arc-file:

@app
myapp

@auth
issuer https://example.auth0.com/ #Issuer of JWT
audience https://example.com,https://example2.com #Audience in the JWT
identitySource $request.header.Authorization #Where is the token source
scopes read:foo,write:foo #Not required
default false #Set to true to secure all routes (--auth flags in @http are ignored)

@http
get / #Not secured
get /foo --auth #Secured with default scopes
get /bar --auth read:bar,... #Secured with specified scopes

@macros
architect/macro-http-api #Required until HTTP APIs are default in arc
arc-macro-auth

See AWS::Serverless::HttpApi/HttpApiAuth for more information.

FAQs

Package last updated on 31 Mar 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc