Question
· Oct 16

Generate JWT token in Cache 2018

Hi,

I try to generate JWT tokens in Cache (not in IRIS).

In IRIS I managed to generate tokens using ##class(%OAuth2.JWKS).AddOct("HS256",secret,.jwks).

But In Cache there is no such routine.

Could you provide me a place to find an example how to use JWT, please ?  I am interested to generate a token in Cache, send it to javascript client, and read a token provided by the client and check it is valid.

Kind regards,

 

Alin Soare.

$ZV: Cache for Windows (x86-64) 2018.1.9 (Build 805) Thu Feb 1 2024 09:01:09 EST
Discussion (1)2
Log in or sign up to continue

Hi Alin,

Looking in the Caché & Ensemble 2018.1.4 – 2018.1.9 documentation there is a class %OAuth2.JWKS with method AddOct() for Cache almost identical to the one you described above for IRIS. This method is available for Cache 2018.1.9 the version you listed in your question. Hope this documentation helps.

For others reference w.r.t. IRIS, the method and class you described above are deprecated in later versions of IRIS and %Net.JSON.JWK or %Net.JSON.JWKS should be used instead.