You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
docuseal/lib/json_web_token.rb

14 lines
248 B

# frozen_string_literal: true
module JsonWebToken
module_function
def encode(payload)
JWT.encode(payload, Rails.application.secret_key_base)
end
def decode(token)
JWT.decode(token, Rails.application.secret_key_base)[0]
end
end