Skip to content

Simple gem to encapsulate JWT Management functionality.

License

Notifications You must be signed in to change notification settings

rfdlp/jwt_manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gem Version

Manages encoding/decoding of any payload data.

You can dynamically refer to the key used to encode/decode through the use of secret_key_env_variable_name. By default, the key used is JWT_MANAGER_SHARED_SECRET.

Usage:
Add an environment variable to your stack, with the JWT shared secret. Use this variable's name to initialize the JWT Manager:

Encoding
manager = JwtManager.new('INTEGRATION_JWT_TOKEN')
payload = { a: 1, b: 2 }
token = manager.encode(payload)

Decoding
manager.decode(token)

About

Simple gem to encapsulate JWT Management functionality.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages