2.0.1 • Published 5 years ago

arc-macro-jwt v2.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

arc-macro-jwt

Use JWT authentication with Architect HTTP APIs (APIG HTTP Api only).

Install:

npm i arc-macro-jwt

Add to your .arc-file:

@app
myapp

@aws
apigateway http

@jwt
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 (@jwt pragmas in .arc-config are ignored)

@http
get /
get /foo
get /bar

@macros
arc-macro-jwt

And add to individual .arc-config files for routes that needs auth:

@jwt
scopes read:bar,write:bar #Not required (use default scopes or none when not specified)

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

2.0.1

5 years ago

2.0.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago