Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Using secure WebAPI services from a JavaScript SPA

Avatar for Don Wibier Don Wibier
January 04, 2016

Using secure WebAPI services from a JavaScript SPA

In this session, I will walk you through the process of setting up a WebAPI service and how to secure it by using MS Identity and the OWIN middleware.

I will also show the steps involved on how to get authenticated and create a JavaScript single page application including authentication to access the Web API service, and get its data in return.

Avatar for Don Wibier

Don Wibier

January 04, 2016

Other Decks in Technology

Transcript

  1. Using a Secure WebAPI Web Service from a mobile app

    Don Wibier Technical Evangelist
  2. Define Using WebAPI wikipedia.org A web API is a subset

    of an application programming interface (API)
  3. How to secure… Using WebAPI 1. Decorating the WebAPI Controller

    • Use the [Authorize(..)] attribute 2. Decorating individual Action Methods • Exclusions on Controller attributes ([OverrideAuthentication(..)], [AllowAnonymous]) • Individual methods to be secure ([Authorize(..)])
  4. Application/Client types Using WebAPI Same-Domain • Web APIs and clients

    live in the same domain • all security settings inherited from web host Cross-Domain • Web APIs and clients live in different domains • native apps (desktop, mobile) • client side JavaScript code (browser) • Web API specific security settings @leastprivelege