diff --git a/Authentication/JWT.php b/Authentication/JWT.php index 8791000e..161424bb 100644 --- a/Authentication/JWT.php +++ b/Authentication/JWT.php @@ -132,7 +132,7 @@ public static function encode($payload, $key, $alg = 'HS256', $keyId = null, $he $header['kid'] = $keyId; } if ( isset($head) && is_array($head) ) { - $header = array_merge($header, $head); + $header = array_merge($head, $header); } $segments = array(); $segments[] = JWT::urlsafeB64Encode(JWT::jsonEncode($header));