web 2.0: the how of oauth

26
The How of OAuth OAuth Hackathon – 4/26 @ Six Apart http://icanhaz.com/oauth

Upload: nullstyle

Post on 08-May-2015

6.381 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Web 2.0: The How Of OAuth

The How of OAuth

OAuth Hackathon – 4/26 @ Six Aparthttp://icanhaz.com/oauth

Page 2: Web 2.0: The How Of OAuth

The How of OAuth

or: How I learned to stop worrying and fall in love with Factory Joe

Page 3: Web 2.0: The How Of OAuth

OAuth’s Goal

• Website X can access your protected data at API Y– All without sharing your password off-site – especially when there isn’t one like with OpenID

Page 4: Web 2.0: The How Of OAuth

OAuth gives you:

• Signed HTTP Requests• Safe, Password-less Token Exchange

• Signed HTTP Requests• Safe, Password-less Token Exchange

Page 5: Web 2.0: The How Of OAuth

The Three Actors

• User – My Buddy (not me)• Service Provider – Chuck E. Cheese• Consumer – 10 yr old kids

Page 6: Web 2.0: The How Of OAuth

The Three Tokens

• Access Tokens – Chuck E. Cheese Tickets• Request Tokens – Chuck E. Cheese Tokens• Consumer Keys

Page 7: Web 2.0: The How Of OAuth

The Three URLS

• Request Token Issuer• Authorization Page• Access Token Exchanger

Page 8: Web 2.0: The How Of OAuth

Building a Consumer

Page 9: Web 2.0: The How Of OAuth

Get a consumer key and secret

Page 10: Web 2.0: The How Of OAuth

Simple enough, eh?

Page 11: Web 2.0: The How Of OAuth

Get a Request Token

Page 12: Web 2.0: The How Of OAuth

Authorize the Request Token

Page 13: Web 2.0: The How Of OAuth

Exchange for an Access Token

Page 14: Web 2.0: The How Of OAuth

Making Authenticated Calls

Page 15: Web 2.0: The How Of OAuth

Building a Service Provider

Page 16: Web 2.0: The How Of OAuth

Data to store

• Consumers: – key, secret, callback_url

• Request Token: – token, secret, consumer, authorizing_user

• Access Token:– token, secret, consumer, user

Page 17: Web 2.0: The How Of OAuth

Registering Consumers

Page 18: Web 2.0: The How Of OAuth

Issuing Request Tokens

• Verify using only the consumer credential

Page 19: Web 2.0: The How Of OAuth

Issuing Request Tokens

• Issue the request token

Page 20: Web 2.0: The How Of OAuth

Authorizing Request Tokens

• Ask the user to accept the authorization

Page 21: Web 2.0: The How Of OAuth

Authorizing Request Tokens• Connecting the logged in user• go back to consumer

Page 22: Web 2.0: The How Of OAuth

Exchange for an Access Token

• Validate using Request Token and Consumer

Page 23: Web 2.0: The How Of OAuth

Exchange for an Access Token

• Issue the Access Token• Destroy the Request Token

Page 24: Web 2.0: The How Of OAuth

Protecting Resources

• Validate Access Token

Page 25: Web 2.0: The How Of OAuth

OAuth Hackathon – 4/26 @ Six Apart

http://icanhaz.com/oauth

Page 26: Web 2.0: The How Of OAuth

Thanks!