是否可以编辑JWT令牌的到期时间? [英] Is it possible to edit the expiration of JWT token?

查看:116
本文介绍了是否可以编辑JWT令牌的到期时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是JWT领域的新手,很高兴在这里获得一些帮助. 我有一个应用程序可以很好地与这个出色的解决方案配合使用,但是在用户登录到我的应用程序时发现了一个扩展令牌过期的小问题.

I am new to the JWT world, and would be happy to get some help in here. I have an app that works perfectly with this wonderful solution, but found a little issue with extending the expiration of the token when the user logs in to my app.

换句话说,我想在用户每次使用其以前的JWT访问我的应用程序时续订到期时间.

In other words, I want to renew the expiration each time that the user access my app with his former JWT.

有什么解决方案可以做到这一点而又不会覆盖以前的令牌并重新发行新的令牌?

Is there any solution to do that without overwritting the former token and reissuing a new one?

谢谢!

推荐答案

有什么解决方案可以做到这一点而又不会覆盖以前的令牌并重新发行新的令牌?

Is there any solution to do that without overwritting the former token and reissuing a new one?

不.令牌签名后,对其内容的任何修改都会使令牌无效.

No. Once the token is signed, any modifications to its content will invalidate the token.

这篇关于是否可以编辑JWT令牌的到期时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆