This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Support for RS256 (RSA Signature with SHA-256)
#5
Here are JWT libraries from https://github.com/cdbattags/lua-resty-jwt with some minor changes to work on LM. Create a use library with the same name for each attached file.
Code:
jwt = require "user.jwt"

jwt_token = jwt:sign(
  "my-secrect-key",
  {
    header={typ="JWT", alg="HS256"},
    payload={foo="bar"}
  }
)

log(jwt_token)

Attached Files
.lua   evp.lua (Size: 17.46 KB / Downloads: 13)
.lua   aes.lua (Size: 6.57 KB / Downloads: 16)
.lua   hmac.lua (Size: 3.67 KB / Downloads: 13)
.lua   jwt.lua (Size: 28.69 KB / Downloads: 15)
.lua   jwt-validators.lua (Size: 14.92 KB / Downloads: 12)
Reply


Messages In This Thread
RE: Support for RS256 (RSA Signature with SHA-256) - by admin - 27.01.2020, 07:40

Forum Jump: