Merge pull request #10808 from demarches-simplifiees/fix-missing-expiration

Fix missing expiration after refacto
This commit is contained in:
Mathieu Magnin 2024-09-17 12:34:05 +00:00 committed by GitHub
commit f9994245f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,6 +10,7 @@ class JwtField < Administrate::Field::Base
return "Token présent, sans expiration" unless decoded_token[0].key?('exp')
expiration = Time.zone.at(decoded_token[0]['exp'])
if expiration < Time.zone.now
"Token présent, expiré le #{expiration.strftime('%d/%m/%Y à %H:%M')}"
else