吊销令牌Identity Server OAuth2



我想知道是否可以在我想注销应用程序时撤销ThinkTecture Identity Server颁发的OAuth 2.0令牌。

这只有在实现RFC 7009的ThinkTecture Identity Server版本3的最新版本中才可能实现:https://www.rfc-editor.org/rfc/rfc7009.请参阅1.1.0版本的发布说明,网址为https://github.com/IdentityServer/Thinktecture.IdentityServer3/blob/master/RELEASES.md,其中包括指向的链接https://github.com/IdentityServer/Thinktecture.IdentityServer3/pull/858.

你读过这篇文章吗(http://leastprivilege.com/2013/11/15/adding-refresh-tokens-to-a-web-api-v2-authorization-server/)?

我引用下面这段话。

一旦令牌被发布,就没有"内置"的方法来撤销它。或者换句话说,你需要为它编写自己的机制,通常需要对每个请求进行数据库检查。可以——但往往会违背目的。

简而言之,给auth令牌一个较短的生存期并删除客户端中存储的auth令牌是适用的解决方案。

最新更新