You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using JWT::encode to send an authentication request to an external API. For the $headers argument on JWT::encode I provide the following since I have a chain of public certificates:
This proves problematic for me since the external API does not accept anything other than me using an array as x5c. Reading about the x5c part from this stack overflow answer:
[..] The certificate chain is represented as a JSON array of certificate value strings [..]
Under the hood the $headers argument is json encoded which means I get a double encoded string if I encode x5c before passing it on to JWT::encode and it's therefor not valid.
I'm opening this issue to ask for some guidence. Is the phpdoc wrong or am I missing something here?
I'm happy to provide a patch to fix the documentation issue. 😄
The text was updated successfully, but these errors were encountered:
Hello there. 👋
I'm using JWT::encode to send an authentication request to an external API. For the $headers argument on
JWT::encode
I provide the following since I have a chain of public certificates:However I'm getting an error from phpstan since the headers argument is documented to accept only an array of strings not an nested array of strings.
This proves problematic for me since the external API does not accept anything other than me using an array as x5c. Reading about the x5c part from this stack overflow answer:
Under the hood the $headers argument is json encoded which means I get a double encoded string if I encode x5c before passing it on to JWT::encode and it's therefor not valid.
I'm opening this issue to ask for some guidence. Is the phpdoc wrong or am I missing something here?
I'm happy to provide a patch to fix the documentation issue. 😄
The text was updated successfully, but these errors were encountered: