1

I have a website which contains lot of user informations. I want to share those with client website through proper authentication. As I am going to develop this api using asp.net mvc 4, I selected DotnetOauth for providing authentication. If a website want to access my data from website, they have to register with my developer website, after the registration that website will generate Consumer key and Secret Key. After the registration, for each api request the client will pass these keys. Up to this is done.

Using this Consumer Key and Secret Key, client will send api request and if the valid token is not available in the request, it will redirect to login page. After the successful login, a token will generate and client can use this token for furthor request up to the expiry.

Anybody have idea about creating token based on Consumer Key and Secret Key with the help of DotnetOauth. Iam using Asp.net MVC

Thanks

1 Answer 1

2

In order to create an access token using DNOA, you should implement the interface IAuthorizationServerHost. The method CreateAccessToken is the responsible of creating the token.

I recommend you to download DotNetOpenAuth samples, and have a look to 'OAuthAuthorizationServer' project.

Hope this help.

Sign up to request clarification or add additional context in comments.

2 Comments

+1 I would merely write the same answer. They really have clear examples on that.
It might be too late, but hope this will help someone. This pages shows hope to implement IAuthorizationServerHost. github.com/DotNetOpenAuth/DotNetOpenAuth/wiki/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.