JWT.SIGN
signs the body of a JSON Web Token (JWT) using a specified algorithm and signature. It attempts to encode its payload as JSON.
Function category: JWT​
JWT.SIGN(arg1, arg2, arg3, [args...])
Arguments | Definition |
| A string denoting the algorithm to be used. |
| The payload as an object for which to generate a signature. |
| Signature to use in signing the JWT. |
| An additional set of arguments for use with certain subsets of algorithms. |
If we want to create a JWT, use the following function that includes an algorithm and signature.
JWT.SIGN('HS256', OBJECT.NEW({{\"foo\", 1}, {\"bar\", {4, 5, 'qwe'}}}), 'password')
This creates the following JWT.
eyJhbGciOiJIUzI1NiJ9.eyJuaWwiOls0LDUsInF3ZSJdfQ.slTZMJTvamnCLdyAk4x_HrIkK_SESjboxdHiuFj-meM