Using modem JWT to encode arbitrary payload

I need to send a JWT to a non-nordic server.  They ask for a small struct to be encoded and sent as a string in a larger MQTT message.  For example:

{
     string1: "foo",
     string2: "bar",
     exp: 123456789098765431
     fres: {
         string3: "deadbeef"
     }
}

That struct is encoded in the JWT, and is THEN put as part of a string in an MQTT message.  I was looking at the AT%%JWT option but don't see a way to pass this payload into the generation function.  Am I missing something?   If this isn't available for my needs, is there another way to do this?  I need to use the keys already installed in one of the sec tags in the 9160.

Parents Reply Children
  • The current support we have is only AT%JWT, and these JWT tokens generated by the modem, do not support adding any custom information unfortunately. Zephyr has JWT and JSON libraries as well, however, these do not utilize the modem secure tags.

    I will add this as a feature request. Unfortunately no timeline available for when or if this will be supported.

    Kind regards,
    Øyvind

Related