C# OAuth provider [closed]

空扰寡人 提交于 2019-12-24 03:04:33

问题


I am struggling with the understanding of the OAuthProvider Library. I am also struggling to understand the following oauth-dot-net

I am trying to implement am OAuth provider in my custom RESTful webservice. I am familiar with OAuth already as I implemented an OAuth 1.0a client already (using the amazing RESTsharp library). I just don't get how to use this library which to be honest seems to be the simplest one I could find (dotnetopenoauth is a nightmare).

Did any of you do this with this library? I am looking for a simple example I could get some inspiration from. The documentation provided is just too slim and I get lost in the example as it is not implemented for a webservice.

Thanks a lot for your help !


Here is the documentation for the first library I was talking about regarding a provider implementation :

Implementation Steps :

-> 3 interfaces need to be implemented, for the 3 different stores required by the default provider implementation.

IConsumerStore - a store for consumer details. ITokenStore - a store for request and access tokens. INonceStore - a store for nonces, unique strings supplied in requests - the provider checks to ensure requests aren't replayed by storing previous nonces in the nonce store.

-> Construct an OAuthProvider instance, providing a set of inspectors.

-> Wire up the provider to pages/controller actions/WCF operations etc.

I've had this from the beginning but I am very unsure about what some methods are about. I am working on it right now and will post here a detailed example of implementation once I'm done. I do not know if this will work but it looks fairly simple so far.

来源:https://stackoverflow.com/questions/11777665/c-sharp-oauth-provider

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!