From 8384be12a0828fef8150dbbb2eb015af040650c4 Mon Sep 17 00:00:00 2001 From: Mathieu Magnin Date: Tue, 17 Sep 2024 14:21:54 +0200 Subject: [PATCH] Fix missing expiration after refacto --- app/fields/jwt_field.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/fields/jwt_field.rb b/app/fields/jwt_field.rb index e2c944066..c73b7a4bc 100644 --- a/app/fields/jwt_field.rb +++ b/app/fields/jwt_field.rb @@ -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