drogue-iot / drogue-cloud

Cloud Native IoT
https://drogue.io
Apache License 2.0
113 stars 30 forks source link

[feat] add a timer to check for JWT expiration in websocket service #290

Closed jbtrystram closed 2 years ago

jbtrystram commented 2 years ago

The actix_auth middleware now adds the JWT expiration as a request extension when verifying the token The WS service pull this value to set up a periodic validation for the token expiration and close the connection if needed.

jbtrystram commented 2 years ago

@ctron I updated the PR to use a complete DateTime struct for this. Regarding the overhead, I think we can add a second method without this later on if we feel it's needed

ctron commented 2 years ago

/test

drogue-bot commented 2 years ago

Aye, aye, captain! … Triggered System Test worklow!

drogue-bot commented 2 years ago
Total Passed Failed Ignored Filtered Duration
148 148 0 0 0 55m 6s

Git: https://github.com/drogue-iot/drogue-cloud @ refs/heads/feat/close_WS_token_exp

Commit: c61fd270deb8983ad03ae98d8fff3fd76fd6b8aa
Author: jbtrystram <jbtrystram@redhat.com>
Date: Mon, 13 Jun 2022 13:09:52 -0200

    Commit lock file

Job: https://github.com/drogue-iot/drogue-cloud-testing/actions/runs/2489698140

Report: https://drogue-iot.github.io/drogue-cloud-testing/test-report/2022/06/13/test-run-2489698140.html