Dave New
Dave New

Reputation: 40042

Web Api and OAuth authentication with multiple clients and users

We are a developing an AngularJS single page application with an ASP.NET Web Api 2 REST API. We are using OWIN middleware and OAuth, but are still unsure if we are taking the correct approach.

Our system consists of clients and users:

Getting a bearer token with a clientId:

Bearer Token

Should we be returning the clientId at this point?

The AngularJS front-end layer does need this clientId to perform other resource calls. For example:

Upvotes: 1

Views: 788

Answers (1)

vibronet
vibronet

Reputation: 7394

If you are working with companies, the active directory approach to SPAs (and Angular specifically) might be a good fit: you can use http://www.cloudidentity.com/blog/2014/10/28/adal-javascript-and-angularjs-deep-dive/ as a starting point. The token acquisition and use are fully abstracted there.

Upvotes: 1

Related Questions