newToken
newToken(
header,payload):Token
newToken creates a token from the decoded header and payload of a JWT.
Signature verification must happen before the token reaches CEL. Checking Token.isValidAt and Token.presentedBy afterwards is recommended so the token matches the assumptions an expression makes about it.
Parameters
Section titled “Parameters”header
Section titled “header”Record<string, unknown>
payload
Section titled “payload”Record<string, unknown>
Returns
Section titled “Returns”Throws
Section titled “Throws”when a required header or claim is missing or malformed.