-
Notifications
You must be signed in to change notification settings - Fork 299
Open
Description
Hello, like #9 I'm looking into using this for an ACME implementation. I think a few other changes would be necessary
- Support extra fields in the header, specifically
url
andnonce
. I'm not sure the best way to do this. I can think of three options?- Allow embedding Header in other structs as a flat field, and move methods out of that struct. This would probably lose type safety since there's no way to restrict arguments on struct members
- Allow embedding a user struct in Header as a flat field, with generics. You'd still need the generic parameter even if you aren't adding any fields.
- Just add
url
andnonce
to Header. Header is already a superset of possible fields, and AFAIK the two main uses of JWT are Oauth2 and ACME so it doesn't seem like a stretch.
- Allow empty payload (in JWS at least) - per the JWT spec the payload can be any octet sequence, but is typically a base64 encoded document. ACME requires it to be
""
forPOST for GET
in the protocol. - Add a JWS structure and encode/decode methods. I was thinking of
jws.rs
withencode_jws
anddecode_jws
These are fairly small changes so I'd be glad to make a PR if it sounds reasonable.
Metadata
Metadata
Assignees
Labels
No labels