View Source Joken
A JSON Web Token (JWT) Library.
Please, do read our comprehensive documentation and guides:
- Changelog
- Joken Overview
- Configuration
- Signers
- Asymmetric cryptography signers
- Testing your app with Joken
- JWT Common use cases
- Migrating from Joken 1.0
- Custom header arguments
Usage
Add :joken
to your list of dependencies in mix.exs
:
def deps do
# .. other deps
{:joken, "~> 2.6"},
# Recommended JSON library
{:jason, "~> 1.4"}
end
All set! (don't forget to take a look at our comprehensive documentation and guides!)
Benchmarking
Just run the benchmark script based on the supported algorithm:
mix run benchmarks/hs_benchmark.exs
mix run benchmarks/jose_hs_benchmark.exs
mix run benchmarks/pem_rs_benchmark.exs
mix run benchmarks/rs_benchmark.exs
License
Copyright (c) 2014 Bryan Joseph
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Disclaimer
This library would not be possible without the work of @potatosalad (Andrew Bennet). Specifically his library erlang-jose.