signAndEncode
Sign and encode the token. Mainly used for testing.
Return
signed and encoded JWT.
Parameters
keyManager
KeyManagerInterface instance used to generate a digital signature.
keyId
identifier of the key to use for generate the signature.