-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for custom content_type and signature_type (#111) #112
base: master
Are you sure you want to change the base?
Conversation
This looks great! Would you mind if I propose some readme organization changes now that we have these additions? |
Fine by me! |
Friendship among coworkers is great. |
I'm not sure that tieing a What would be alternatives? Store this in |
It would get pretty awkward to store it in claims, since everything else in there just directly serializes to/from the claims section of the JWT. We could have |
So to sketch this out, each fn sign<CustomClaims: Serialize + DeserializeOwned>(
&self,
claims: JWTClaims<CustomClaims>,
) -> Result<String, Error> {
self.sign_with_header_options(claims, default::Default())
} |
I finally had some time available, so I took a crack at implementing an API similar to what I described above. I pushed it to this branch, although maybe it should be its own pull request? In any case, this is a bit of an experiment, so I'm entirely fine reverting it if you decide this isn't the way you want this done. |
sign_with_custom_enevelope? |
or only sign_with_options? |
|
This is my attempt at implementing the changes discussed in #111. Please let me know if I need to do any additional fixes.