[#10798] fix tests
This commit is contained in:
parent
539853255d
commit
7ace670010
1 changed files with 2 additions and 1 deletions
|
@ -7,7 +7,8 @@ class JwtField < Administrate::Field::Base
|
|||
if data.present?
|
||||
begin
|
||||
decoded_token = JWT.decode(data, nil, false)
|
||||
expiration = Time.zone.at(decoded_token[0]['exp'])
|
||||
|
||||
return "Token présent, sans expiration" unless decoded_token[0].key?('exp')
|
||||
|
||||
if expiration < Time.zone.now
|
||||
"Token présent, expiré le #{expiration.strftime('%d/%m/%Y à %H:%M')}"
|
||||
|
|
Loading…
Reference in a new issue