我想知道是否可以撤销由ThinkTecture Identity Server颁发的OAuth 2.0令牌,因为我想让我的应用程序注销。撤销令牌标识服务器OAuth2
3
A
回答
0
您是否看了这篇文章(http://leastprivilege.com/2013/11/15/adding-refresh-tokens-to-a-web-api-v2-authorization-server/)?
我引用下面的段落。
一旦令牌发出后,就没有“内置”方式来撤消它。或换句话说,您需要编写自己的机制来处理每个请求中经常涉及数据库检查的机制。可行 - 但往往会破坏目的。
简而言之,缩短授权令牌的使用寿命并删除客户端中存储的令牌是适用的解决方案。
1
只有实现RFC 7009的ThinkTecture Identity Server版本3的最新版本才可能实现此操作:https://tools.ietf.org/html/rfc7009。请参阅https://github.com/IdentityServer/Thinktecture.IdentityServer3/blob/master/RELEASES.md版本1.1.0的发行说明,其中包含指向https://github.com/IdentityServer/Thinktecture.IdentityServer3/pull/858的链接。