wso2is:有没有办法删除令牌

问题描述 投票:0回答:1

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

wso2is
1个回答
1
投票

如果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://tools.ietf.org/html/rfc7009 [2] https://docs.wso2.com/display/IS550/OAuth2+Token+Revocation

© www.soinside.com 2019 - 2024. All rights reserved.