You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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 👍
The text was updated successfully, but these errors were encountered:
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
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 👍
The text was updated successfully, but these errors were encountered: