问题描述
如何使用 WSO2 (5.11) IS 生成 JWT,其中存储在用于身份验证的非 WSO2 服务器上的信息?我的用例是通过 WSO2 IS 登录用户,但实际的身份验证将发生在不同的服务器上,而不是 WSO2.反过来,此服务器在对用户进行身份验证后,将调用 WSO2 以使用它发送的自定义数据生成 JWT.如果我正确理解这篇文章,我需要创建本地身份验证器,这是我应该采用的方法吗接受我的用例?
How can use WSO2 (5.11) IS to generate JWT with information stored on server that is not WSO2 that is used for autnetication? My use case is to login user via WSO2 IS, but the actual authentication will happen on a different server, not WSO2. In turn this server upon authenticating the user, will call WSO2 to generate JWT with custom data that it sends. If I understand this post correctly, I need to create local authenticator, is this the approach I should take in my use case?
此外,如果这种方法可行,我是否可以使用 WSO2 SSO 来允许用户访问远程服务器上的应用程序,或者 WSO2 SSO 是否严格用于在 WSO2 服务器本身上运行的应用程序?
Moreover, if this approach is possible, will I be able to use WSO2 SSO to allow user to access applications on remote server, or is WSO2 SSO strictly for applications running on WSO2 server itself?
推荐答案
由于您需要使用 REST API 连接到某个外部存储,您可以编写一些自定义的本地身份验证器并部署到 Identity servicer.您可以实现自定义本地身份验证器以使用某些 REST API 调用您的商店并对用户进行身份验证.
Since you need to connect to some external store using REST API, you can write some custom local authenticators and deploy into Identity servicer. You can implement the custom local authenticator to call your store using some REST API and authenticate the user.
[1]https://is.docs.wso2.com/en/5.9.0/develop/writing-a-custom-local-authenticator/[2]https://github.com/vihanga-liyanage/samples-is-1/tree/master/custom-local-authenticator[3]https://everything1know.wordpress.com/2019/09/17/wso2-is-custom-local-authenticator/
这篇关于通过不同的服务器对用户进行身份验证,在 WSO2 中生成 JWT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!