Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Consuming REST in .NET

9,727 views

Published on

Published in: Technology, News & Politics
  • Be the first to comment

Consuming REST in .NET

  1. 1. CONSUMING REST IN .NET By Aaron Stannard http://www.aaronstannard.com/ @Aaronontheweb Microsoft - Startup Developer Evangelist
  2. 2. Table of Contents • REST 101 • Background of REST • Consuming RESTful APIs • RESTful Principles • Security • Transport Security • Authentication • Authorization • Anti-Patterns • REST in .NET • RestSharp • Hammock REST
  3. 3. REST is Everywhere
  4. 4. REST •Representational •State •Transfer
  5. 5. REST at a Glance •REST is not a standard •It's an architecture
  6. 6. Consuming RESTful APIs
  7. 7. RESTful Principles •Identifiable Resources •Manipulation of Resources •Self-Descriptive Messages •Hypermedia is the Engine
  8. 8. RESTful APIs
  9. 9. RESTful Resources • Authentication Resources • Auth Tokens, Username / Password pairs • Data Resources • Personal Data, Public Data, GeoData, etc... • Service Resources • API Keys, Endpoints, etc...
  10. 10. Manipulation of Resources
  11. 11. Self-Descriptive Messages
  12. 12. Security!!
  13. 13. Security in RESTful APIs • Transport Security • SSL • Message Security • Encryption (Optional) • Authentication • Tokens • Signing Messages • Authorization • Controlled by Service
  14. 14. Authentication Flavors
  15. 15. Authentication Examples
  16. 16. Spot the Anti-Pattern
  17. 17. OAuth 1.0
  18. 18. OAuth 2.0
  19. 19. Consuming REST in .NET • RestSharp • http://restsharp.org • Hammock REST • http://hammock.codeplex.com/
  20. 20. Using Wrapper Libaries • Automate Some Tasks • Deserializing responses into objects • Managing request life-cycles • Simplify others • OAuth Workflow • Handling service errors
  21. 21. CODE

×