php-jwt
php-jwt copied to clipboard
Provide optional headers
I'm trying to use this extension to generate tokens for the Apple Push Notification service (APNs), however Apple requires a custom header with a 'kid' parameter, for an authorisation identifier code for the user's developer account. Unless I'm missing something (and I've looked at the c code) I can't see an ability to customise the headers.
Any chance of adding an optional additional_headers parameter to the encode function?
That's a good suggestion. I'll consider adding this feature in the next version.