我正在编写一个REST API,供我们的内部应用程序使用。我需要使用通过http请求授予的代码来登录和注销身份服务器的用户
我需要知道如何调用以下端点:
案件:
我们公司有很多应用。我希望在他们的company-x帐户中进行一次身份验证,就像您只需要登录到atlassian帐户即可访问jira和confluence云一样。该REST API,我的工作是为我们的前端开发人员(截至目前)。
I cannot simply let the user login to WSO2 IS since they only need a module where they can manage their company-x profile and other basic stuffs. By this I think I have 2 options:
id_token
How about having a basic login page on front-end and use request path authenticator to get the authorization code
/id_token
.
基本上,这意味着不必从将用户重定向到IS登录页面,而是可以从创建的基本登录页面中提取用户名和密码,然后将授权授予请求与凭据一起发送。
因此您的授权码要求将是:
https://localhost:9443/oauth2/authorize?response_type=code&client_id=JqB4NGZLMC6L3n4jz094FMls2Joa&redirect_uri=https://localhost/callback&scope=openid§oken=<sec_token>
sec_token = base64encode(用户名:密码)
您需要添加基本认证 请求路径验证器在你的服务提供商配置。此请求应向您返回授权code
。如果您只想id_token
将隐式流与请求路径认证一起使用。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句