Skip to content
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

Allow custom value in HeaderContentType #67

Open
abonander opened this issue Feb 22, 2021 · 0 comments
Open

Allow custom value in HeaderContentType #67

abonander opened this issue Feb 22, 2021 · 0 comments

Comments

@abonander
Copy link

abonander commented Feb 22, 2021

Generating JWTs for client API access to Twilio requires setting the cty field of the JWT header to a specific magic string: https://www.twilio.com/docs/iam/access-tokens#jwt-format

cty is the content-type and encodes the version of the Access Token. Its value must be "twilio-fpa;v=1".

It would be nice not to have to implement JoseHeader for a custom type just to set this. I'm thinking an extra variant HeaderContentType::Custom(String) would be sufficient. If we want to ensure it's a properly formatted MIME type it could be mime::Mime instead but I feel like that's overkill.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant