$partnerID = {{to_fill}};
$partnerSecret = {{to_fill}};
$token = {{to_fill}}; // userToken (frontend) or token (backend), empty for auth/token
$requestHeaders = {{to_fill}};
$requestBody = {{to_fill}};
“iss” => $partnerID, // The "iss" (issuer) claim identifies the principal that issued the JWT.
“sub” => $token, // The "sub" (subject) claim identifies the principal that is the subject of the JWT
“iat” => $timestamp, // The "iat" (issued at) claim identifies the time at which the JWT was issued. UTC.
“data_header” => json_encode($requestHeaders),
“data_body” => json_encode($requestBody)
base64UrlEncode($header) . "." .
base64UrlEncode($payload),
$jwtToken = base64UrlEncode($header) . "." . base64UrlEncode($payload) . "." . $signature;