[英]connect my webapi with parse server using identityserver
I have a Asp.Net WebApi that provide some native and javascript platforms with its data. 我有一个Asp.Net WebApi,它提供一些本机和javascript平台及其数据。
I have identityserver3 as the authentication/authorization module for this WebApi. 我有identityserver3作为此WebApi的身份验证/授权模块。
For example i used implicit flow in the communcation between my WebApi and It's native clients. 例如,我在WebApi和它的本机客户端之间的通信中使用了隐式流。
Now I want to integrate this WebApi system with Facebook Parse server system. 现在我想将这个WebApi系统与Facebook Parse服务器系统集成。
so for example: 例如:
If there is a user already in the parse server database and login to my identityserver, i can initiate requests from my WebApi to the Parse server and return data to it. 如果解析服务器数据库中已有用户并登录到我的身份服务器,我可以从WebApi向Parse服务器发起请求并将数据返回给它。
I know that parse using oAuth2 and OpenId too but what is the required steps for that, or what is the best approach for that? 我知道使用oAuth2和OpenId进行解析但是所需的步骤是什么,或者最好的方法是什么?
I have hard time understanding your question. 我很难理解你的问题。 So my answer may not be what you want, but please send me more details if what I said doesn't make sense. 所以我的答案可能不是你想要的,但如果我说的话没有意义,请发给我更多细节。
Register your Web API with Parse server as a client. 使用Parse服务器作为客户端注册Web API。 With the client ID and client secret you get from Parse server for your API, you can make calls to Parse by obtaining an access_token with client credentials flow. 使用从Parse服务器获取API的客户端ID和客户端密钥,您可以通过获取具有客户端凭据流的access_token来调用Parse。 Now, use that token from your API to call Parse to see if the user exists. 现在,使用API中的令牌调用Parse以查看用户是否存在。 If the user exists, then use that user details, token along with the data you want to post to make a request to Parse server to update the data. 如果用户存在,则使用该用户详细信息,令牌以及要发布的数据向Parse服务器发出请求以更新数据。
Thank you, Soma. 谢谢,Soma。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.