【发布时间】:2021-11-27 13:45:26
【问题描述】:
在 WSO2IS 5.7 中,我曾经使用自定义 JWT 令牌颁发者,方法是将其 jar 文件部署到 wso2is_home/repository/components/lib,然后在 identity.xml 文件中更改 OAuth 部分 IdentityOAuthTokenGenerator 元素与我的自定义令牌发行者的类:
<OAuth>
...
<!--<IdentityOAuthTokenGenerator>org.wso2.carbon.identity.oauth2.token.JWTTokenIssuer</IdentityOAuthTokenGenerator>-->
<IdentityOAuthTokenGenerator>it.smartcity.wso2.jwt_generator.CustomTokenIssuer</IdentityOAuthTokenGenerator>
...
</OAuth>
重新启动服务器。然后就可以在Service Provider配置中看到了:
使用 WSO2IS 5.10,除了将 jar 放入 components/lib 文件夹外,我只编辑了 deployment.toml 文件,添加以下内容:
[oauth.extensions]
token_generator = "it.smartcity.wso2.jwt_generator.CustomTokenIssuer"
如此处所述https://is.docs.wso2.com/en/latest/learn/extension-points-for-oauth/#oauth-token-generator 但它不起作用。
我在服务提供商屏幕中看不到我的令牌颁发者。
我还有什么需要做的吗?
【问题讨论】: