mosquitto-jwt-auth icon indicating copy to clipboard operation
mosquitto-jwt-auth copied to clipboard

Set the username from a claim field and use mosquitto ACL %c

Open mathieuruellan opened this issue 3 years ago • 0 comments

Hi,

Is there a way to set the username from a claim field? For instance i have a jwt token like that:

{
  "user_name": "[email protected]",
  "creationDate": "2020-10-28T15:33:30.792732Z",
  "client_id": "nebowebap_cloudtest",
  "aud": [
    "MyScriptSSO"
  ],
  "scope": [
    "read"
  ],
  "exp": 1605108810, 
  "jti": "723efff8-5d75-44a9-91c1-ff4430a615d8",
}

And i would like %c matches with the "user_name" field's value. (https://medium.com/jungletronics/mosquitto-acls-ac062aea3f9)

mathieuruellan avatar Oct 30 '20 13:10 mathieuruellan