JWT令牌:注销JWT令牌 [英] JWT Token: logout JWT token

查看:241
本文介绍了JWT令牌:注销JWT令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前,我们使用JWT进行身份验证,因此一旦创建令牌,该令牌将终身有效,如果我们设置的时间到期,令牌将过期.有什么办法可以使令牌过期?在单击注销按钮时,我需要销毁令牌.asp.net核心,Web API.

Piotr在他的博客中很好地解释说,我认为取消JWT是处理注销的最佳方法.在此处输入链接描述取消JWT令牌

for authentication currently we are using JWT so once token created it's for lifetime and if we set time expire, the token will expire. is there any way to expire token ? while clicking log out button i need to destroy the token. asp.net core , web api.

解决方案

i think cancelling JWT is best way to handle logout , Piotr explained well in his blog. enter link description here Cancel JWT tokens

这篇关于JWT令牌:注销JWT令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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