4

I am new to Web-Api, Cloud etc. I have some requirements with my project but as lots of resources are available over internet, I am not able to decide which way should i go.

Requirements:

  • The user should identify themselves with an authority (i.e facebook/google etc)

  • The users nameidentifier should be passed to our Web-API and stored in a database

  • Get the token/key that was given to us when the user authenticated themselves

  • Send the token in the header of every api-request and verify the users identity

  • It should run on a mobile client application (Windows phone, Android, iOS).

Question:

1) What is the simplest way to identify a client when using an external authority and then authorise the client when they call our web-api?

2) Is it possible to configure AD to use an external identity provider (i.e facebook, google) or can this only be done using ACS?

3) The only think needed is the nameidentifer (no name or email address, etc).

Relevant Links

3
  • Try investigating using ASP.NET Identity: asp.net/identity Apr 23, 2014 at 18:45
  • @martin_costello i got this link msdn.microsoft.com/en-us/magazine/dn463788.aspx what do u think about it?
    – loop
    Apr 23, 2014 at 19:26
  • 2
    This functionality is built into ASP.NET Web. When you create your project, choose change authentication and select the option for individual user accounts. It allows you to set up Facebook, Google, and Microsoft authentication out of the box. Apr 24, 2014 at 1:34

1 Answer 1

0

I have managed to define the Authorize attribute through the suggestions made by the following book: http://www.apress.com/9781430261759

You can download the source code from the above link, and chapter 8 or 9 can give you the solution that you are looking for!

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.