Open
Description
Hi there! Thanks for the great little library.
I wrote a small shard that adds a mixin to the JWT namespace that makes it easy to extend existing classes and structs with the optional JWT claims and serialize them with #encode
encoded = session.encode("secret", "none") do
issued_at Time.now
issuer "z64"
audience ["GitHub", "snapcase"]
end
See the full example and implementation here: https://github.com/y32/jwt_obj
This abstracts away the optional claim "codes" of "ext", "iss", etc. into a more expressive DSL, additionally letting users use Time
for applicable fields instead of writing their own epoch conversion.
It is currently built to fit our use case, but I'd be happy to PR it and make adjustments if it would complement this shard. If this shard is meant to strictly be a implementation of JWT, that's cool too 👍
Metadata
Metadata
Assignees
Labels
No labels