-
Notifications
You must be signed in to change notification settings - Fork 110
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
Header flexibility #80
Comments
Any thoughts @djones6 ? 😀 |
@markfinlabs Let me start off by saying that I'm not an expert in the JWT/JWS/JOSE space. It looks like what you are after is a more general JWS library. I feel this goes beyond the intended scope of the Swift-JWT project, which was to support JWTs (as defined by RFC 7519). Specifically, the JWT specification requires All that said, if you'd like to develop your changes into a broader JWS library, you'd be welcome to use this one as a starting point, and if you were to develop an API which is additive, I'd be happy to review a PR to add support for this (at which point it might make sense to rename this library, or create a 'Swift-JWS' library that 'Swift-JWT' is based upon). |
Thanks @djones6 for your comments, I'll give this some thought and reply this week. I really appreciate the crypto support your library provides but I understand the need for scope limitations. I need to think if there is a simple way I can add something to your library or minor changes which might allow more external flexibility which i could propose. At the moment this is blocking my own software release so I'm motivated to see if there might be a solution.😀 |
Hi @djones6 . The most obvious change would be to turn Header into a protocol like Claims which would also have the benefit of allowing Header.encode() to overridable like Claims.encode(). However a better solution might be have both a protocol, say HeaderProtocol, as well as the current (now conforming) Header type to retain the simple syntax If either of these solutions worked for you I'd be happy to prepare a pull request somehow? |
Any thoughts on this @djones6 ? |
I have made a pull request based on the HeaderProtocol option: #84 I welcome any thoughts. |
Hi there,
I have made local modifications (hacks) to support headers of the type
but wondering if these could be supported in the library?
Maybe making headers a Swift protocol is the way to go?
Interested in your thoughts.
BR,
Mark
The text was updated successfully, but these errors were encountered: