sign And Encode
Sign and encode the token. Mainly used for testing.
Return
signed and encoded JWT.
Parameters
key Manager
KeyManagerInterface instance used to generate a digital signature.
key Id
identifier of the key to use for generate the signature.