From 075e7d71bd7504add551fc29b87521006f5b717a Mon Sep 17 00:00:00 2001 From: Joakim Antman Date: Sun, 15 Sep 2024 19:00:28 +0300 Subject: [PATCH] chore: Fix readme --- README.md | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index dd0994b..a7ae6aa 100644 --- a/README.md +++ b/README.md @@ -5,28 +5,22 @@ A library extending the ruby-jwt gem with EdDSA algorithms. Based on [RFC 8037](https://datatracker.ietf.org/doc/html/rfc8037). -**NOTE: This gem is still WIP** - -Work is currently done in [ruby-jwt](https://github.com/jwt/ruby-jwt/pull/607) to allow extending the algorithms. - -Plan is to replace rbnacl with something else in the near future. - ## Installation -Will only work with the WIP branch, so adding the following to your the Gemfile should do the trick: +Add the following to your Gemfile + ``` -gem "jwt", github: "anakinj/ruby-jwt", branch: "extendable-algos" gem "jwt-eddsa" ``` ``` -require "jwt/eddsa" # not verified if this actually works +require "jwt/eddsa" ``` ## Usage ```ruby -private_key = RbNaCl::Signatures::Ed25519::SigningKey.new("b" * 32) +private_key = Ed25519::SigningKey.new("b" * 32) token = JWT.encode({pay: "load"}, private_key, "EdDSA") payload, header = JWT.decode(token, private_key.verify_key, true, algorithm: "EdDSA") ```