JWS.SIGN will sign the body of a JWT using a specified algorithm and signature. This function will not try to encode its payload as JSON.
Function category: JWT
JWS.SIGN(arg1, arg2, arg3, [args...])
String denoting the algorithm to be used.
Payload as a string to be used to generate a signature.
Signature to use in signing the JWT.
Additional set of arguments for use with certain subsets of algorithms.
If we want to create a JWT, we can use
JWT.SIGN using the following function.
JWS.SIGN('HS256', "any + old + string", 'password')
This would use the provided algorithm and signature to create the following JWT.