When we have custom "Header" keys, the auto-generated code for firebase/php-jwt does not accomodate for it. It should add something like: ``` $keyId = null; $header = array( "alg" => "RS256", "typ" => "JWT", "x5t" => "somecustomstring" ); ... $jwt = JWT::encode($payload, $privateKey, 'RS256', $keyId, $header); ... ``` In my case I need to add custom header with key "x5t" that contain certificate thumbprint (Microsoft/Azure token stuff) Likewise, I don't see it specifying encoding algorithm, so it will drop to whatever is the default (HS256). php-jwt function declaration: `public static function encode($payload, $key, $alg = 'HS256', $keyId = null, $head = null)`
When we have custom "Header" keys, the auto-generated code for firebase/php-jwt does not accomodate for it.
It should add something like:
In my case I need to add custom header with key "x5t" that contain certificate thumbprint (Microsoft/Azure token stuff)
Likewise, I don't see it specifying encoding algorithm, so it will drop to whatever is the default (HS256).
php-jwt function declaration:
public static function encode($payload, $key, $alg = 'HS256', $keyId = null, $head = null)