Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ktonon/elm-serverless-auth-jwt
Authorization middleware using JWT for elm-serverless
https://github.com/ktonon/elm-serverless-auth-jwt
authorization elm jwt middleware serverless
Last synced: about 1 month ago
JSON representation
Authorization middleware using JWT for elm-serverless
- Host: GitHub
- URL: https://github.com/ktonon/elm-serverless-auth-jwt
- Owner: ktonon
- License: mit
- Created: 2017-08-27T15:35:52.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-28T02:12:06.000Z (over 7 years ago)
- Last Synced: 2023-08-08T20:39:30.655Z (over 1 year ago)
- Topics: authorization, elm, jwt, middleware, serverless
- Language: JavaScript
- Size: 13.7 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# elm-serverless-auth-jwt
[![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com)
[![elm-package](https://img.shields.io/badge/elm-1.0.0-blue.svg)](http://package.elm-lang.org/packages/ktonon/elm-serverless-auth-jwt/latest)
[![CircleCI](https://img.shields.io/circleci/project/github/ktonon/elm-serverless-auth-jwt/master.svg)](https://circleci.com/gh/ktonon/elm-serverless-auth-jwt)This is authorization middleware for [elm-serverless][] using [JSON Web Tokens][].
## Example
See the [demo](https://github.com/ktonon/elm-serverless-auth-jwt/blob/master/demo/src/Auth/API.elm)
for a complete usage example.To run the demo
```shell
npm install
npm start
```and visit http://localhost:3000. Use [curl][] or [Postman][] to set an `Authorization` header to `Bearer SOME_JWT_TOKEN`. The demo secret is `"secret"`. You can change the secret by setting the environment variable `demoAuth_auth__secret`, before running `npm start`.
[curl]:https://curl.haxx.se/docs/manpage.html
[elm-serverless]:http://package.elm-lang.org/packages/ktonon/elm-serverless/latest
[JSON Web Tokens]:https://jwt.io/
[Postman]:https://www.getpostman.com/