SlideShare a Scribd company logo
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control
Who am I?

Maarten Balliauw
Technical Evangelist, JetBrains
MyGet.org
AZUG
Focus on web
 ASP.NET MVC, Windows Azure, SignalR, ...
 MVP Windows Azure & ASPInsider

Buy me a beer! http://amzn.to/pronuget
http://blog.maartenballiauw.be
   Shameless self promotion: Pro NuGet -
@maartenballiauw
   http://amzn.to/pronuget
Agenda

Why would I need an API?
API characteristics
ASP.NET MVC Web API
Windows Azure ACS
Why would I need an API?
Consuming the web

2000-2008: Desktop browser
2008-2012: Mobile browser
2008-2012: iPhone and Android apps
2010-2014: Tablets, tablets, tablets
2014-2016: Your fridge (Internet of Things)
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control
Twitter & Facebook
By show of hands
Make everyone API
(as the French say)
Expose services to 3rd parties
Valuable
Flexible
Managed
Supported
Have a plan
Reach More Clients
You’re not the only one




  Source: http://blog.programmableweb.com/2012/04/16/open-apis-have-become-an-essential-piece-to-the-startup-model/
API Characteristics
What is an API?

Software-to-Software interface
Contract between software and developers
 Functionalities, constraints (technical / legal) Programming instructions and
  standards
Open services to other software developers (public or private)
Flavours

Transport   Message contract
 HTTP         SOAP
 Sockets      XML
               Binary
               JSON
               HTML
               …
Technical

 Most API’s use HTTP and REST extensively
    Addressing
    HTTP Verbs
    Media types
    HTTP status codes
    Hypermedia (*)
Demo
HTTP Verbs
GET – return data
HEAD – check if the data exists
POST – create or update data
PUT – put data
MERGE – merge values with existing data
DELETE – delete data
Status codes

200 OK – Everything is OK, your expected data is in the response.
401 Unauthorized – You either have to log in or you are not allowed to
access the resource.
404 Not Found – The resource could not be found.
500 Internal Server Error – The server failed processing your request.
…
Think RFC2324!
ASP.NET Web API
ASP.NET Web API

Part of ASP.NET MVC 4
Framework to build HTTP Services (REST)
Solid features
   Modern HTTP programming model
   Content negotiation (e.g. xml, json, ...)
   Query composition (OData query support)
   Model binding and validation (conversion to .NET objects)
   Routes
   Filters (e.g. Validation, exception handling, ...)
   And more!
ASP.NET Web API is easy!

HTTP Verb = action
“Content-type” header = data format in
“Accept” header = data format out
Return meaningful status code
Demo
Securing your API

No authentication
Basic/Windows authentication
[Authorize] attribute
Demo
The world of API clients is complex


 CLIENTS                   AUTHN + AUTHZ

 HTML5+JS                  Username/password?
 SPA                       Basic auth?
 Native apps               NTLM / Kerberos?
 Server-to-server          Client certificate?
                           Shared secret?
A lot of public API’s…

            “your API consumer isn’t really your user,
           but an application acting on behalf of a user”

                  (or: API consumer != user)
OAuth2
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control
TechDays badges


 “I received a ticket with a Barcode I can hand to
  the Reception which gives me a Badge stating
   Microsoft gives Me access to Kinepolis as a
              Speaker on 5-7 March”
TechDays badges

         +--------+                               +---------------+
         |        |--(A)– Register for TechDays-->|   Resource    |
         |        |                               |     Owner     |
         |        |<-(B)-Sure! Here’s an e-ticket-|   Microsoft   |
         |        |                               +---------------+
         |        |                                               .
         |        |                               +---------------+
         | Client |--(C)----- Was invited! ------>| Authorization |
         |   Me   |                               |     Server    |
         |        |<-(D)---- Here’s a badge! -----|   Reception   |
         |        |        (5-7 March;speaker)    +---------------+
         |        |                                               .
         |        |                               +---------------+
         |        |--(E)------ Show badge ------->|    Resource   |
         |        |                               |     Server    |
         |        |<-(F)-- Enter speakers room ---|    Kinepolis |
         +--------+                               +---------------+

                  Next year, I will have to refresh my badge
TechDays badges

 “I received a ticket with a Barcode I can hand to the Reception which gives me a
Badge stating Microsoft gives Me access to Kinepolis as a Speaker on 5-7 March”


             Me = Client
Delegation




             Barcode = Access Code
             Reception = Authorization Server
             Microsoft = Resource Owner
             Kinepolis = Resource Server
             Badge = Access Token
             Speaker = Scope
             5-7 March = Token Lifetime
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control
OAuth2

         +--------+                               +---------------+
         |        |--(A)- Authorization Request ->|   Resource    |
         |        |                               |     Owner     |
         |        |<-(B)-- Authorization Grant ---|               |
         |        |                               +---------------+
         |        |                                               .
         |        |                               +---------------+
         |        |--(C)-- Authorization Grant -->| Authorization |
         | Client |                               |     Server    |
         |        |<-(D)----- Access Token -------|               |
         |        |                               +---------------+
         |        |                                               .
         |        |                               +---------------+
         |        |--(E)----- Access Token ------>|    Resource   |
         |        |                               |     Server    |
         |        |<-(F)--- Protected Resource ---|               |
         +--------+                               +---------------+

                       Figure 1: Abstract Protocol Flow
                           http://tools.ietf.org/html/draft-ietf-oauth-v2-31
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control
Demo
Quick side note…

There are 3 major authentication flows
Based on type of client
Variants possible
OAuth2 – Initial flow
OAuth2 – “Refresh” (one of those variants)
Access tokens / Refresh tokens

In theory: whatever format you want
Widely used: JWT (“JSON Web Token”)
Less widely used: SWT (“Simple Web Token”)
Signed / Encrypted
JWT

Header:
{"alg":"none"}

Token:
{"iss":"joe",
   "exp":1300819380,
   "http://some.ns/read":true}
Is OAuth2 different from OpenID?

Yes.
OpenID = authN
OAuth2 = authN (optional) + authZ

http://softwareas.com/oauth-openid-youre-barking-up-the-wrong-tree-if-you-think-theyre-the-same-thing
http://blogs.msdn.com/b/vbertocci/archive/2013/01/02/oauth-2-0-and-sign-in.aspx
What you have to implement

OAuth authorization server
Keep track of supported consumers
Keep track of user consent
OAuth token expiration & refresh
Oh, and your API
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control
Windows Azure
Access Control Service
ACS - Identity in Windows Azure

Active Directory federation
Graph API
Web SSO
Link apps to identity providers using rules
Support WS-Security, WS-Federation, SAML
Little known feature: OAuth2 delegation
OAuth flow using ACS
Demo
OAuth2 delegation?

You: OAuth authorization server
ACS: Keep track of supported consumers
ACS: Keep track of user consent
ACS: OAuth token expiration & refresh
You: Your API
Conclusion
Key takeaways

API’s are the new apps
Valuable
HTTP
ASP.NET Web API
OAuth2
Windows Azure Access Control Service
http://blog.maartenballiauw.be
                         @maartenballiauw

                   http://amzn.to/pronuget
Thank you!
Ad

Recommended

OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control
Maarten Balliauw
 
Distributed Identities with OpenID
Distributed Identities with OpenID
Bastian Hofmann
 
Distributed Identities with OpenID
Distributed Identities with OpenID
Bastian Hofmann
 
Hostingultraso romania
Hostingultraso romania
tanyaseo
 
nota lukisan persembahan senibina
nota lukisan persembahan senibina
Aishah Liman
 
01 intro(prehistoric)
01 intro(prehistoric)
Shahril Khairi
 
The Architecture Profession
The Architecture Profession
Galala University
 
Prinsip rekaan premis makanan
Prinsip rekaan premis makanan
Asif Yahya
 
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...
Maarten Balliauw
 
When and Why Would I use Oauth2?
When and Why Would I use Oauth2?
Dave Syer
 
OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...
OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...
Brian Campbell
 
OAuth: Trust Issues
OAuth: Trust Issues
Lorna Mitchell
 
Draft Ietf Oauth V2 12
Draft Ietf Oauth V2 12
Vishal Shah
 
OAuth - Don’t Throw the Baby Out with the Bathwater
OAuth - Don’t Throw the Baby Out with the Bathwater
Apigee | Google Cloud
 
OAuth 2.0 & OpenID Connect @ OpenSource Conference 2011 Tokyo #osc11tk
OAuth 2.0 & OpenID Connect @ OpenSource Conference 2011 Tokyo #osc11tk
Nov Matake
 
Understanding Identity in the World of Web APIs – Ronnie Mitra, API Architec...
Understanding Identity in the World of Web APIs – Ronnie Mitra, API Architec...
CA API Management
 
Enterprise Access Control Patterns for Rest and Web APIs
Enterprise Access Control Patterns for Rest and Web APIs
CA API Management
 
Making Sense of API Access Control
Making Sense of API Access Control
CA API Management
 
OAuth 1.0
OAuth 1.0
Nov Matake
 
Stateless authentication for microservices
Stateless authentication for microservices
Alvaro Sanchez-Mariscal
 
O auth
O auth
Ashok Kumar N
 
Enterprise Access Control Patterns for REST and Web APIs Gluecon 2011, Franco...
Enterprise Access Control Patterns for REST and Web APIs Gluecon 2011, Franco...
CA API Management
 
Microservice security with spring security 5.1,Oauth 2.0 and open id connect
Microservice security with spring security 5.1,Oauth 2.0 and open id connect
Nilanjan Roy
 
Stateless authentication for microservices applications - JavaLand 2015
Stateless authentication for microservices applications - JavaLand 2015
Alvaro Sanchez-Mariscal
 
OAuth2
OAuth2
SPARK MEDIA
 
CIS14: Working with OAuth and OpenID Connect
CIS14: Working with OAuth and OpenID Connect
CloudIDSummit
 
OAuth2 + API Security
OAuth2 + API Security
Amila Paranawithana
 
Analyzing OAuth
Analyzing OAuth
Oliver Pfaff
 
Code in the Cloud - Ghent - 20 February 2015
Code in the Cloud - Ghent - 20 February 2015
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Executive Summit for ISV & Application builders - January 2015
Executive Summit for ISV & Application builders - January 2015
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 

More Related Content

Similar to OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control (20)

OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...
Maarten Balliauw
 
When and Why Would I use Oauth2?
When and Why Would I use Oauth2?
Dave Syer
 
OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...
OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...
Brian Campbell
 
OAuth: Trust Issues
OAuth: Trust Issues
Lorna Mitchell
 
Draft Ietf Oauth V2 12
Draft Ietf Oauth V2 12
Vishal Shah
 
OAuth - Don’t Throw the Baby Out with the Bathwater
OAuth - Don’t Throw the Baby Out with the Bathwater
Apigee | Google Cloud
 
OAuth 2.0 & OpenID Connect @ OpenSource Conference 2011 Tokyo #osc11tk
OAuth 2.0 & OpenID Connect @ OpenSource Conference 2011 Tokyo #osc11tk
Nov Matake
 
Understanding Identity in the World of Web APIs – Ronnie Mitra, API Architec...
Understanding Identity in the World of Web APIs – Ronnie Mitra, API Architec...
CA API Management
 
Enterprise Access Control Patterns for Rest and Web APIs
Enterprise Access Control Patterns for Rest and Web APIs
CA API Management
 
Making Sense of API Access Control
Making Sense of API Access Control
CA API Management
 
OAuth 1.0
OAuth 1.0
Nov Matake
 
Stateless authentication for microservices
Stateless authentication for microservices
Alvaro Sanchez-Mariscal
 
O auth
O auth
Ashok Kumar N
 
Enterprise Access Control Patterns for REST and Web APIs Gluecon 2011, Franco...
Enterprise Access Control Patterns for REST and Web APIs Gluecon 2011, Franco...
CA API Management
 
Microservice security with spring security 5.1,Oauth 2.0 and open id connect
Microservice security with spring security 5.1,Oauth 2.0 and open id connect
Nilanjan Roy
 
Stateless authentication for microservices applications - JavaLand 2015
Stateless authentication for microservices applications - JavaLand 2015
Alvaro Sanchez-Mariscal
 
OAuth2
OAuth2
SPARK MEDIA
 
CIS14: Working with OAuth and OpenID Connect
CIS14: Working with OAuth and OpenID Connect
CloudIDSummit
 
OAuth2 + API Security
OAuth2 + API Security
Amila Paranawithana
 
Analyzing OAuth
Analyzing OAuth
Oliver Pfaff
 
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...
Maarten Balliauw
 
When and Why Would I use Oauth2?
When and Why Would I use Oauth2?
Dave Syer
 
OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...
OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...
Brian Campbell
 
Draft Ietf Oauth V2 12
Draft Ietf Oauth V2 12
Vishal Shah
 
OAuth - Don’t Throw the Baby Out with the Bathwater
OAuth - Don’t Throw the Baby Out with the Bathwater
Apigee | Google Cloud
 
OAuth 2.0 & OpenID Connect @ OpenSource Conference 2011 Tokyo #osc11tk
OAuth 2.0 & OpenID Connect @ OpenSource Conference 2011 Tokyo #osc11tk
Nov Matake
 
Understanding Identity in the World of Web APIs – Ronnie Mitra, API Architec...
Understanding Identity in the World of Web APIs – Ronnie Mitra, API Architec...
CA API Management
 
Enterprise Access Control Patterns for Rest and Web APIs
Enterprise Access Control Patterns for Rest and Web APIs
CA API Management
 
Making Sense of API Access Control
Making Sense of API Access Control
CA API Management
 
Stateless authentication for microservices
Stateless authentication for microservices
Alvaro Sanchez-Mariscal
 
Enterprise Access Control Patterns for REST and Web APIs Gluecon 2011, Franco...
Enterprise Access Control Patterns for REST and Web APIs Gluecon 2011, Franco...
CA API Management
 
Microservice security with spring security 5.1,Oauth 2.0 and open id connect
Microservice security with spring security 5.1,Oauth 2.0 and open id connect
Nilanjan Roy
 
Stateless authentication for microservices applications - JavaLand 2015
Stateless authentication for microservices applications - JavaLand 2015
Alvaro Sanchez-Mariscal
 
CIS14: Working with OAuth and OpenID Connect
CIS14: Working with OAuth and OpenID Connect
CloudIDSummit
 

More from Microsoft Developer Network (MSDN) - Belgium and Luxembourg (20)

Code in the Cloud - Ghent - 20 February 2015
Code in the Cloud - Ghent - 20 February 2015
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Executive Summit for ISV & Application builders - January 2015
Executive Summit for ISV & Application builders - January 2015
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Executive Summit for ISV & Application builders - Internet of Things
Executive Summit for ISV & Application builders - Internet of Things
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Executive Summit for ISV & Application builders - January 2015
Executive Summit for ISV & Application builders - January 2015
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Code in the Cloud - December 8th 2014
Code in the Cloud - December 8th 2014
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Adam azure presentation
Adam azure presentation
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
release management
release management
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
cloud value for application development
cloud value for application development
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Modern lifecycle management practices
Modern lifecycle management practices
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Belgian visual studio launch 2013
Belgian visual studio launch 2013
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Windows Azure Virtually Speaking
Windows Azure Virtually Speaking
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Inside the Microsoft TechDays Belgium Apps
Inside the Microsoft TechDays Belgium Apps
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
TechDays 2013 Developer Keynote
TechDays 2013 Developer Keynote
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Windows Phone 8 Security Deep Dive
Windows Phone 8 Security Deep Dive
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Deep Dive into Entity Framework 6.0
Deep Dive into Entity Framework 6.0
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Applied MVVM in Windows 8 apps: not your typical MVVM session!
Applied MVVM in Windows 8 apps: not your typical MVVM session!
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Building SPA’s (Single Page App) with Backbone.js
Building SPA’s (Single Page App) with Backbone.js
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Deep Dive and Best Practices for Windows Azure Storage Services
Deep Dive and Best Practices for Windows Azure Storage Services
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Building data centric applications for web, desktop and mobile with Entity Fr...
Building data centric applications for web, desktop and mobile with Entity Fr...
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Bart De Smet Unplugged
Bart De Smet Unplugged
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Ad

OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control

  • 2. Who am I? Maarten Balliauw Technical Evangelist, JetBrains MyGet.org AZUG Focus on web  ASP.NET MVC, Windows Azure, SignalR, ...  MVP Windows Azure & ASPInsider Buy me a beer! http://amzn.to/pronuget http://blog.maartenballiauw.be Shameless self promotion: Pro NuGet - @maartenballiauw http://amzn.to/pronuget
  • 3. Agenda Why would I need an API? API characteristics ASP.NET MVC Web API Windows Azure ACS
  • 4. Why would I need an API?
  • 5. Consuming the web 2000-2008: Desktop browser 2008-2012: Mobile browser 2008-2012: iPhone and Android apps 2010-2014: Tablets, tablets, tablets 2014-2016: Your fridge (Internet of Things)
  • 7. Twitter & Facebook By show of hands
  • 8. Make everyone API (as the French say)
  • 9. Expose services to 3rd parties Valuable Flexible Managed Supported Have a plan
  • 11. You’re not the only one Source: http://blog.programmableweb.com/2012/04/16/open-apis-have-become-an-essential-piece-to-the-startup-model/
  • 13. What is an API? Software-to-Software interface Contract between software and developers  Functionalities, constraints (technical / legal) Programming instructions and standards Open services to other software developers (public or private)
  • 14. Flavours Transport Message contract  HTTP  SOAP  Sockets  XML  Binary  JSON  HTML  …
  • 15. Technical Most API’s use HTTP and REST extensively  Addressing  HTTP Verbs  Media types  HTTP status codes  Hypermedia (*)
  • 16. Demo
  • 17. HTTP Verbs GET – return data HEAD – check if the data exists POST – create or update data PUT – put data MERGE – merge values with existing data DELETE – delete data
  • 18. Status codes 200 OK – Everything is OK, your expected data is in the response. 401 Unauthorized – You either have to log in or you are not allowed to access the resource. 404 Not Found – The resource could not be found. 500 Internal Server Error – The server failed processing your request. …
  • 21. ASP.NET Web API Part of ASP.NET MVC 4 Framework to build HTTP Services (REST) Solid features  Modern HTTP programming model  Content negotiation (e.g. xml, json, ...)  Query composition (OData query support)  Model binding and validation (conversion to .NET objects)  Routes  Filters (e.g. Validation, exception handling, ...)  And more!
  • 22. ASP.NET Web API is easy! HTTP Verb = action “Content-type” header = data format in “Accept” header = data format out Return meaningful status code
  • 23. Demo
  • 24. Securing your API No authentication Basic/Windows authentication [Authorize] attribute
  • 25. Demo
  • 26. The world of API clients is complex CLIENTS AUTHN + AUTHZ HTML5+JS Username/password? SPA Basic auth? Native apps NTLM / Kerberos? Server-to-server Client certificate? Shared secret?
  • 27. A lot of public API’s… “your API consumer isn’t really your user, but an application acting on behalf of a user” (or: API consumer != user)
  • 30. TechDays badges “I received a ticket with a Barcode I can hand to the Reception which gives me a Badge stating Microsoft gives Me access to Kinepolis as a Speaker on 5-7 March”
  • 31. TechDays badges +--------+ +---------------+ | |--(A)– Register for TechDays-->| Resource | | | | Owner | | |<-(B)-Sure! Here’s an e-ticket-| Microsoft | | | +---------------+ | | . | | +---------------+ | Client |--(C)----- Was invited! ------>| Authorization | | Me | | Server | | |<-(D)---- Here’s a badge! -----| Reception | | | (5-7 March;speaker) +---------------+ | | . | | +---------------+ | |--(E)------ Show badge ------->| Resource | | | | Server | | |<-(F)-- Enter speakers room ---| Kinepolis | +--------+ +---------------+ Next year, I will have to refresh my badge
  • 32. TechDays badges “I received a ticket with a Barcode I can hand to the Reception which gives me a Badge stating Microsoft gives Me access to Kinepolis as a Speaker on 5-7 March” Me = Client Delegation Barcode = Access Code Reception = Authorization Server Microsoft = Resource Owner Kinepolis = Resource Server Badge = Access Token Speaker = Scope 5-7 March = Token Lifetime
  • 34. OAuth2 +--------+ +---------------+ | |--(A)- Authorization Request ->| Resource | | | | Owner | | |<-(B)-- Authorization Grant ---| | | | +---------------+ | | . | | +---------------+ | |--(C)-- Authorization Grant -->| Authorization | | Client | | Server | | |<-(D)----- Access Token -------| | | | +---------------+ | | . | | +---------------+ | |--(E)----- Access Token ------>| Resource | | | | Server | | |<-(F)--- Protected Resource ---| | +--------+ +---------------+ Figure 1: Abstract Protocol Flow http://tools.ietf.org/html/draft-ietf-oauth-v2-31
  • 36. Demo
  • 37. Quick side note… There are 3 major authentication flows Based on type of client Variants possible
  • 39. OAuth2 – “Refresh” (one of those variants)
  • 40. Access tokens / Refresh tokens In theory: whatever format you want Widely used: JWT (“JSON Web Token”) Less widely used: SWT (“Simple Web Token”) Signed / Encrypted
  • 41. JWT Header: {"alg":"none"} Token: {"iss":"joe", "exp":1300819380, "http://some.ns/read":true}
  • 42. Is OAuth2 different from OpenID? Yes. OpenID = authN OAuth2 = authN (optional) + authZ http://softwareas.com/oauth-openid-youre-barking-up-the-wrong-tree-if-you-think-theyre-the-same-thing http://blogs.msdn.com/b/vbertocci/archive/2013/01/02/oauth-2-0-and-sign-in.aspx
  • 43. What you have to implement OAuth authorization server Keep track of supported consumers Keep track of user consent OAuth token expiration & refresh Oh, and your API
  • 46. ACS - Identity in Windows Azure Active Directory federation Graph API Web SSO Link apps to identity providers using rules Support WS-Security, WS-Federation, SAML Little known feature: OAuth2 delegation
  • 48. Demo
  • 49. OAuth2 delegation? You: OAuth authorization server ACS: Keep track of supported consumers ACS: Keep track of user consent ACS: OAuth token expiration & refresh You: Your API
  • 51. Key takeaways API’s are the new apps Valuable HTTP ASP.NET Web API OAuth2 Windows Azure Access Control Service
  • 52. http://blog.maartenballiauw.be @maartenballiauw http://amzn.to/pronuget Thank you!