Hi there,
My purpose is to encrypt a communication using JWT tokens. I am developing on IRIS and my purpose is to generate a JWT token that will run on an older version of Cache (so I have to use functions that are compatible with the older version, Cache).
I wrote this code in IRIS:
s username = "user-test123"
set st = ##class(%OAuth2.Utils).TimeInSeconds($ztimestamp,0)
set et = ##class(%OAuth2.Utils).TimeInSeconds($ztimestamp, 60*15)
s payload = {"id": "test-id-123", "username": "test-username"}
s payload.exp = et
s payload.time = st
s alg = "HS256"
s JOSE("sigalg") = alg
s secret =

.png)

.jpg)


.png)
.png)