Skip to content

thomasbhatia/jwte

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JWTe TravisCI build License

By Thomas Bhatia (thomas.bhatia@eo.io)

Description

A light and compact yet fully IETF RFC 7518 compliant JSON Web Token (JWT) library for Erlang.

Supports the following algorithms:

  • HMAC with SHA-2
  • HS256
  • HS384
  • HS512
  • RSA PKCS1-v1_5 rsassa_pkcs1_sign / rsassa_pkcs1_verify
  • RS256
  • RS384
  • RS512
  • ECDSA rsaes_pkcs1_encrypt / rsaes_pkcs1_verify
  • ES256 - secp256r1
  • ES384 - secp384r1
  • ES512 - secp512r1

Installation

Add JWTe to your rebar.config dependencies:

{deps, [
    {jwte,{git , "git@github.com:thomasbhatia/jwte.git", {tag, "v0.5.0"}}}
]}.

Usage

Encode

jwte:encode(#{foo => bar}, Key).

Decode

Decode payload with verification

jwte:decode(<<"XXXX">>, Key).

Peek

Decode without verifying the payload

jwte:peek(<<"XXXX">>).

License

JWTe is released under BSD (see LICENSE).

About

A IETF RFC 7518 compliant JSON Web Token (JWT) library for Erlang.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages