emqx/emqx-auth-jwt

Recheck exp claim

Opened this issue · 0 comments

Hello, create job.
How would we react on the token expiration during subscribed session?
For example, we subscribed to some topic, and later within couple minutes a token would be expired.
Should't we disconnect the client?
I tested with the mosquitto client, like:

mosquitto_sub -C 1 -V mqttv5 -L mqtt://eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpZCI6IjEiLCJvcmciOjEsInJvbGUiOlsiYWRtaW4iLCJtYW5hZ2VyIl0sImV4cCI6MTYzMzgwNzU5NywiaWF0IjoxNjMzODA1Nzk3fQ.YKfEr4QfW8eXoy2s1XRDXAYDXcnBg_VL5j5j5lCxpLOed5o35p1P3WXuVSrH1Azyw0S4quawGMqeN-tGkuMXAsuJLiGAu_5Mp3u4FgDxNf0dlFFZFhredrdws1pOpphLruIXjtoFjsjLsPqr4VT9eo0QP7I0hdzcLLJ8UJsVjdSjOiVFcOakaSoZoa-tnK_DUlv7LKSYaviWICLCXJLaktlZrz3AD3RiErEbGAWQIlee6vfT9CiM_gKu8hZ2HO1ZmWfDFXS77YTNHZT9M3sUPpHgBgc-ZKlpfjIMWMI1svjMaFz24cyyWVEYLcWf9ymMktNw55ZcHtZyWCoUyT_lAQ@127.0.0.1:1883/sensor/1 -i 1 -q 2 -d -v -c