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 2 months 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 (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-28T02:12:06.000Z (almost 9 years ago)
- Last Synced: 2025-03-04T06:13:49.722Z (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
[](http://www.serverless.com)
[](http://package.elm-lang.org/packages/ktonon/elm-serverless-auth-jwt/latest)
[](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/