wso2is:有没有办法删除令牌

wso2is: Is there a way to remove a token

我正在使用 wso2is5.5。 WSO2is 将访问令牌存储在数据库中,并将它们缓存在内存中。如果要删除令牌,则必须从数据库中删除令牌并重新启动服务器。我的问题是,是否有办法在不重新启动服务器的情况下执行此操作?特别是如果某些索赔数据已更改。

如果 OAuth 2.0 令牌撤销 [1] 可以满足您的要求,您可以使用 WSO2 IS 撤销端点来执行以下操作,

curl -X POST --basic -u "<client id>:<client secret>" -H "Content-Type: application/x-www-form-urlencoded;charset=UTF-8" -k -d "token=<token to revoke>&token_type_hint=access_token" https://localhost:9443/oauth2/revoke

令牌撤销定义了一种机制,供客户端向授权服务器指示不再需要访问令牌。请参阅文档 [2] 以获取更多详细信息。

[1] https://www.rfc-editor.org/rfc/rfc7009
[2] https://docs.wso2.com/display/IS550/OAuth2+Token+Revocation