JOSESwift icon indicating copy to clipboard operation
JOSESwift copied to clipboard

Custom Header Parameter Names

Open tobihagemann opened this issue 2 years ago • 3 comments

Currently, the header parameters are strictly defined and I couldn't find a way to extend them with custom ones.

In JOSEHeader and its implementations, parameters can only be accessed internally so that you can't define custom parameters outside of this library.

Would it make sense to make parameters public? Or any other idea how custom header parameter names can be accomplished?

tobihagemann avatar Aug 11 '22 12:08 tobihagemann

+1 to this. At least let us extend the “fixed header”parameters ourselves via an extension or expose it or something. Is the current behaviour strictly by design?

CyberMew avatar Oct 18 '22 10:10 CyberMew

+1 for that. Since RFC7516 clearly states the Private Header Names, library should support both writing and reading them, as one of the purposes of the Private Headers are to validate their content before proceeding with the decryption.

olev-abel avatar Dec 02 '22 08:12 olev-abel

Ah, very nice, there is already a PR #282 by @taavi224 for this. To be honest, there are already multiple PRs that would just need a merge so that this library gets better and better but I'm not sure what the maintainers are up to. I know that I can maintain my own fork but it would be great if these changes could be merged upstream.

tobihagemann avatar Jan 12 '23 10:01 tobihagemann