Endodes token using provided Singer algorithm and already prepared payload.
If header is also provided it's checked for correct alg header field and added if not set.
Both header and payload are expected to be a valid json object serialized string.
-1 on error, otherwise number of characters written to the output.
See Implementation
Endodes token using provided Singer algorithm and already prepared payload.
If header is also provided it's checked for correct alg header field and added if not set.
Both header and payload are expected to be a valid json object serialized string.