Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bryanjos/plug_jwt

Plug for JWT authentication
https://github.com/bryanjos/plug_jwt

Last synced: about 1 month ago
JSON representation

Plug for JWT authentication

Awesome Lists containing this project

README

        

PlugJwt
=======

A JWT Plug

Usage:

```elixir
#When reading from joken config block
plug PlugJwt

#or the module that implements `Joken.Config` can be set explicitly
plug PlugJwt, config_module: My.Joken.Config

#You may also add a list of expected claims to verify
plug PlugJwt, config_module: My.Joken.Config, claims: [aud: "spiderman", admin: true]
```

Parameters:

PlugJWT will attempt to read from your joken config block. Parameters can also be placed on the Plug itself
which overrides the joken configuration

* config_module: The module that implements Joken.Config