talira

JSON Web Token (JWT) library for Elixir

open sourceApache-2.0free

Joken is a JSON Web Token library for Elixir built on erlang-jose. It is centred on four operations that you can use separately: generating claims (such as time-based ones), signing, verifying and validating received claims. On top of erlang-jose it adds simple key configuration, reusable claim configuration in your own modules, built-in claim generation and validation, readable error messages, hooks to extend each operation, and defaults for JSON parsing. It supports every algorithm JOSE supports, including the HS, RS, ES and PS families and the Edwards algorithms.

Problems it solves

  • sign and verify JSON Web Tokens in an Elixir app
  • validate the claims of an incoming JWT in Phoenix
  • issue tokens for an API from Elixir with RS256 keys

Features

  • Generates, signs, verifies and validates JWTs as separate steps
  • Built-in claim generation and validation
  • Supports all HS, RS, ES and PS signing algorithms and the Edwards algorithms
  • Key configuration through Elixir's config system
  • Hooks to extend every core operation
  • Test helpers for apps that use Joken

Alternatives

The same job

These do what Joken does.

  1. Guardian A token based authentication library for Elixir applications
  2. JOSE (Erlang and Elixir) JSON Object Signing and Encryption for Erlang and Elixir
  3. OAuth2 (Elixir) An Elixir OAuth 2.0 client library

Compare Joken with the top 3