SlideShare a Scribd company logo
1 of 78
An Introduction
to OAuth 2
Aaron Parecki ā€¢ @aaronpk
Oā€™Reilly Webcast ā€¢ July 2012
A Brief History


aaron.pk/oauth2               @aaronpk
Before OAuth
   aka the Dark Ages
    If a third party wanted access to an account,
    youā€™d give them your password.
aaron.pk/oauth2                                     @aaronpk
Several Problems and
   Limitations
   ļ‚” Apps store the userā€™s password

   ļ‚” Apps get complete access to a userā€™s account

   ļ‚” Users canā€™t revoke access to an app except by
     changing their password

   ļ‚” Compromised apps expose the userā€™s password




aaron.pk/oauth2                                      @aaronpk
Before OAuth 1.0
   ļ‚” Services recognized the problems with password
     authentication

   ļ‚” Many services implemented things similar to
     OAuth 1.0

   ļ‚” Each implementation was slightly different,
     certainly not compatible with each other




aaron.pk/oauth2                                       @aaronpk
Before OAuth 1.0
   ļ‚” Flickr: ā€œFlickrAuthā€ frobs and tokens

   ļ‚” Google: ā€œAuthSubā€

   ļ‚” Facebook: requests signed with MD5 hashes

   ļ‚” Yahoo: BBAuth (ā€œBrowser-Based Authā€)




aaron.pk/oauth2                                  @aaronpk
ā€œWe want something like Flickr Auth /
       Google AuthSub / Yahoo! BBAuth, but
       published as an open standard, with
       common server and client libraries.ā€
                      Blaine Cook, April 5th, 2007



aaron.pk/oauth2                                  @aaronpk
OAuth 1.0




aaron.pk/oauth2   @aaronpk
aaron.pk/oauth2   @aaronpk
aaron.pk/oauth2   @aaronpk
OAuth 1.0 Signatures
   The signature base string is often the most difficult part of
   OAuth for newcomers to construct. The signature base string
   is composed of the HTTP method being used, followed by
   an ampersand ("&") and then the URL-encoded base URL
   being accessed, complete with path (but not query
   parameters), followed by an ampersand ("&"). Then, you
   take all query parameters and POST body parameters
   (when the POST body is of the URL-encoded type, otherwise
   the POST body is ignored), including the OAuth parameters
   necessary for negotiation with the request at hand, and sort
   them in lexicographical order by first parameter name and
                                        oauth_nonce="QP70eNmVz8jvdPevU3oJD2AfF7R7o
   then parameter value (for duplicate parameters), all the
                                        dC2XJcn4XlZJqk",
   while ensuring that both the key and the value for each
   parameter are URL encoded in isolation. Instead of using
                                        oauth_callback="http%3A%2F%2Flocalhost%3A300
   the equals ("=") sign to mark the key/value relationship, you
                                        5%2Fthe_dance%2Fprocess_callback%3Fservice_pr
   use the URL-encoded form of "%3D". Each parameter is then
                                        ovider_id%3D11",
   joined by the URL-escaped ampersand sign, "%26".
                                        oauth_signature_method="HMAC-SHA1",
                                       oauth_timestamp="1272323042",
                                       oauth_consumer_key="GDdmIQH6jhtmLUypg82g",
                                       oauth_signature="8wUi7m5HFQy76nowoCThusfgB%
aaron.pk/oauth2                        2BQ%3D", oauth_version="1.0"            @aaronpk
aaron.pk/oauth2   @aaronpk
OAuth 2:
                  signatures replaced by https




        HMAC

aaron.pk/oauth2                             @aaronpk
Some Current Implementers
The OAuth 2 Spec
       http://oauth.net/2/
OAuth 2?!

   There are 29 versions!




aaron.pk/oauth2             @aaronpk
Currently Implemented Drafts
Provider     Draft       Reference
Foursquare   -10         http://aaron.pk/2YS
                         http://code.google.com/apis/accounts/do
Google       -10
                         cs/OAuth2.html
                         https://developers.facebook.com/docs/aut
Facebook     -10 (ish)
                         hentication/oauth2_updates/
Windows
             -10         http://aaron.pk/2YV
Live
Salesforce   -10         http://aaron.pk/2YW
Github       -07         http://develop.github.com/p/oauth.html
Geoloqi      -10         http://developers.geoloqi.com/api
                                                             @aaronpk
So how does it work?
aaron.pk/oauth2               @aaronpk
Definitions
   ļ‚”Resource Owner: The User
   ļ‚”Resource Server: The API
   ļ‚”Authorization Server: Often the same
    as the API server
   ļ‚”Client: The Third-Party Application


aaron.pk/oauth2                            @aaronpk
Use Cases
   ļ‚”Web-server apps
   ļ‚”Browser-based apps
   ļ‚”Username/password access
   ļ‚”Application access
   ļ‚”Mobile apps


aaron.pk/oauth2                @aaronpk
Facebookā€™s OAuth Flow




Source: https://developers.facebook.com/docs/authentication/   @aaronpk
Web Server Apps
                       Authorization Code Grant




aaron.pk/oauth2                          @aaronpk
Create a ā€œLog Inā€ link
Link to:
https://facebook.com/dialog/oauth?response_
type=code&client_id=YOUR_CLIENT_ID&redirect
_uri=REDIRECT_URI&scope=email




aaron.pk/oauth2                       @aaronpk
Create a ā€œLog Inā€ link
Link to:
https://facebook.com/dialog/oauth?response_
type=code&client_id=YOUR_CLIENT_ID&redirect
_uri=REDIRECT_URI&scope=email




aaron.pk/oauth2                       @aaronpk
Create a ā€œLog Inā€ link
Link to:
https://facebook.com/dialog/oauth?response_
type=code&client_id=YOUR_CLIENT_ID&redirect
_uri=REDIRECT_URI&scope=email




aaron.pk/oauth2                       @aaronpk
Create a ā€œLog Inā€ link
Link to:
https://facebook.com/dialog/oauth?response_
type=code&client_id=YOUR_CLIENT_ID&redirect
_uri=REDIRECT_URI&scope=email




aaron.pk/oauth2                       @aaronpk
Create a ā€œLog Inā€ link
Link to:
https://facebook.com/dialog/oauth?response_
type=code&client_id=YOUR_CLIENT_ID&redirect
_uri=REDIRECT_URI&scope=email




aaron.pk/oauth2                       @aaronpk
User visits the authorization page
https://facebook.com/dialog/oauth?response_
type=code&client_id=28653682475872&redirect
_uri=everydaycity.com&scope=email




aaron.pk/oauth2                         @aaronpk
On success, user is redirected
back to your site with auth code
https://example.com/auth?code=AUTH_CODE_HERE




On error, user is redirected back
to your site with error code
https://example.com/auth?error=access_denied




aaron.pk/oauth2                         @aaronpk
Server exchanges auth
code for an access token
Your server makes the following request

POST
https://graph.facebook.com/oauth/access_to
ken

Post Body:
grant_type=authorization_code
&code=CODE_FROM_QUERY_STRING
&redirect_uri=REDIRECT_URI
&client_id=YOUR_CLIENT_ID
&client_secret=YOUR_CLIENT_SECRET


aaron.pk/oauth2                           @aaronpk
Server exchanges auth
code for an access token
Your server gets a response like the following

{
    "access_token":"RsT5OjbzRn430zqMLgV3Ia",
    "token_type":"bearer",
    "expires_in":3600,
    "refresh_token":"e1qoXg7Ik2RRua48lXIV"
}

or if there was an error

{
    "error":"invalid_request"
}
aaron.pk/oauth2                                  @aaronpk
Browser-Based Apps
                          Implicit Grant




aaron.pk/oauth2                   @aaronpk
Create a ā€œLog Inā€ link
Link to:
https://facebook.com/dialog/oauth?response_
type=token&client_id=CLIENT_ID
&redirect_uri=REDIRECT_URI&scope=email




aaron.pk/oauth2                       @aaronpk
User visits the authorization page
https://facebook.com/dialog/oauth?response_
type=token&client_id=2865368247587&redirect
_uri=everydaycity.com&scope=email




aaron.pk/oauth2                         @aaronpk
On success, user is redirected
back to your site with the access
token in the fragment
https://example.com/auth#token=ACCESS_TOKEN




On error, user is redirected back
to your site with error code
https://example.com/auth#error=access_denied




aaron.pk/oauth2                         @aaronpk
Browser-Based Apps
ļ‚” Use the ā€œImplicitā€ grant type

ļ‚” No server-side code needed

ļ‚” Client secret not used

ļ‚” Browser makes API requests directly




aaron.pk/oauth2                         @aaronpk
Username/Password
                         Password Grant




aaron.pk/oauth2                   @aaronpk
Password Grant
Password grant is only appropriate for
trusted clients, most likely first-party apps
only.
If you build your own website as a client of
your API, then this is a great way to handle
logging in.




aaron.pk/oauth2                             @aaronpk
Password Grant Type
   Only appropriate for your
   serviceā€™s website or your
   serviceā€™s mobile apps.




aaron.pk/oauth2
Password Grant
POST https://api.example.com/oauth/token

Post Body:
grant_type=password
&username=USERNAME
&password=PASSWORD
&client_id=YOUR_CLIENT_ID
&client_secret=YOUR_CLIENT_SECRET

Response:

{
    "access_token":"RsT5OjbzRn430zqMLgV3Ia",
    "token_type":"bearer",
    "expires_in":3600,
    "refresh_token":"e1qoXg7Ik2RRua48lXIV"
}
aaron.pk/oauth2                         @aaronpk
Application Access
                          Client Credentials Grant




aaron.pk/oauth2                             @aaronpk
Client Credentials Grant
POST https://api.example.com/1/oauth/token

Post Body:
grant_type=client_credentials
&client_id=YOUR_CLIENT_ID
&client_secret=YOUR_CLIENT_SECRET

Response:
{
    "access_token":"RsT5OjbzRn430zqMLgV3Ia",
    "token_type":"bearer",
    "expires_in":3600,
    "refresh_token":"e1qoXg7Ik2RRua48lXIV"
}


aaron.pk/oauth2                         @aaronpk
Mobile Apps
                       Implicit Grant




aaron.pk/oauth2                @aaronpk
aaron.pk/oauth2   @aaronpk
aaron.pk/oauth2   @aaronpk
Redirect back to your app
    Facebook app redirects back to your app
    using a custom URI scheme.
    Access token is included in the redirect, just
    like browser-based apps.

   fb2865://authorize/#access_token=BAAEEmo2nocQBAFFOeRTd




aaron.pk/oauth2                                      @aaronpk
aaron.pk/oauth2   @aaronpk
Mobile Apps
ļ‚” Use the ā€œImplicitā€ grant type

ļ‚” No server-side code needed

ļ‚” Client secret not used

ļ‚” Mobile app makes API requests directly




aaron.pk/oauth2                            @aaronpk
Grant Type Summary
   ļ‚”authorization_code:
       Web-server apps
   ļ‚”implicit:
       Mobile and browser-based apps
   ļ‚”password:
       Username/password access
   ļ‚”client_credentials:
       Application access
aaron.pk/oauth2                        @aaronpk
Accessing Resources
                     So you have an access token.
                                      Now what?


aaron.pk/oauth2                             @aaronpk
Use the access token to
make requests
Now you can make requests using the access token.
GET https://api.example.com/me
Authorization: Bearer RsT5OjbzRn430zqMLgV3Ia



Access token can be in an HTTP header or a query
string parameter
https://api.example.com/me?access_token=RsT5Ojb
zRn430zqMLgV3Ia



aaron.pk/oauth2                              @aaronpk
Eventually the access token
will expire
When you make a request with an expired token,
you will get this response
{
    "error":"expired_token"
}



Now you need to get a new access token!




aaron.pk/oauth2                             @aaronpk
Get a new access token
using a refresh token
Your server makes the following request
POST https://api.example.com/oauth/token

grant_type=refresh_token
&reresh_token=e1qoXg7Ik2RRua48lXIV
&client_id=YOUR_CLIENT_ID
&client_secret=YOUR_CLIENT_SECRET

Your server gets a similar response as the original call to
oauth/token with new tokens.
{
    "access_token":"RsT5OjbzRn430zqMLgV3Ia",
    "expires_in":3600,
    "refresh_token":"e1qoXg7Ik2RRua48lXIV"
}
aaron.pk/oauth2                                       @aaronpk
Moving access into
                     separate specs
                       Bearer tokens vs MAC
                              authentication

aaron.pk/oauth2                         @aaronpk
Bearer Tokens
    GET /1/profile HTTP/1.1
    Host: api.example.com
    Authorization: Bearer B2mpLsHWhuVFw3YeLFW3f2

    Bearer tokens are a cryptography-free way to access
    protected resources.

    Relies on the security present in the HTTPS connection, since the
    request itself is not signed.




aaron.pk/oauth2                                                    @aaronpk
Security Recommendations
for Clients Using Bearer
Tokens
ļ‚” Safeguard bearer tokens

ļ‚” Validate SSL certificates

ļ‚” Always use https

ļ‚” Donā€™t store bearer tokens in plaintext cookies

ļ‚” Issue short-lived bearer tokens

ļ‚” Donā€™t pass bearer tokens in page URLs




aaron.pk/oauth2                                    @aaronpk
MAC Tokens
GET /1/profile HTTP/1.1
Host: api.example.com
Authorization: MAC id="jd93dh9dh39D",
                   nonce="273156:di3hvdf8",
                   bodyhash="k9kbtCIyI3/FEfpS/oIDjk6k=",
                   mac="W7bdMZbv9UWOTadASIQHagZyirA="


MAC tokens provide a way to make authenticated requests
with cryptographic verification of the request.

Similar to the original OAuth 1.0 method of using signatures.


                                                                @aaronpk
OAuth 2 Clients
Client libraries should handle refreshing the token
automatically behind the scenes.




aaron.pk/oauth2                                   @aaronpk
Scope
                  Limiting access to resouces



aaron.pk/oauth2                         @aaronpk
Limiting Access to Third Parties




aaron.pk/oauth2                       @aaronpk
Limiting Access to Third Parties




aaron.pk/oauth2                       @aaronpk
Limiting Access to Third Parties




aaron.pk/oauth2                       @aaronpk
OAuth 2 scope
   ļ‚” Created to limit access to the third party.

   ļ‚” The scope of the access request expressed as a list of space-
     delimited strings.
      ļ‚” In practice, many people use comma-separators instead.

   ļ‚” The spec does not define any values, itā€™s left up to the
     implementor.

   ļ‚” If the value contains multiple strings, their order does not matter,
     and each string adds an additional access range to the
     requested scope.


aaron.pk/oauth2                                                      @aaronpk
OAuth 2 scope on Facebook
    https://www.facebook.com/dialog/oauth?
    client_id=YOUR_APP_ID&redirect_uri=YOUR_URL
    &scope=email,read_stream




aaron.pk/oauth2                                   @aaronpk
OAuth 2 scope on Facebook




aaron.pk/oauth2                @aaronpk
OAuth 2 scope on Github
    https://github.com/login/oauth/authorize?
      client_id=...&scope=user,public_repo

     user
     ā€¢ Read/write access to profile info only.
     public_repo
     ā€¢ Read/write access to public repos and organizations.
     repo
     ā€¢ Read/write access to public and private repos and organizations.
     delete_repo
     ā€¢ Delete access to adminable repositories.
     gist
     ā€¢ write access to gists.
aaron.pk/oauth2                                                       @aaronpk
Proposed New UI for Twitter
by Ben Ward




http://blog.benward.me/post/968515729
Implementing an OAuth Server
Implementing an OAuth
   Server
   ļ‚” Find a server library already written:
      ļ‚” A short list available here: http://oauth.net/2/

   ļ‚” Read the spec of your chosen draft, in its entirety.
      ļ‚” These people didnā€™t write the spec for you to ignore it.
      ļ‚” Each word is chosen carefully.

   ļ‚” Ultimately, each implementation is somewhat different, since in
     many cases the spec says SHOULD and leaves the choice up to
     the implementer.

   ļ‚” Understand the security implications of the implementation
     choices you make.

aaron.pk/oauth2                                                    @aaronpk
Implementing an OAuth
   Server
   ļ‚” Choose which grant types you want to support
      ļ‚”   Authorization Code ā€“ for traditional web apps
      ļ‚”   Implicit ā€“ for browser-based apps and mobile apps
      ļ‚”   Password ā€“ for your own website or mobile apps
      ļ‚”   Client Credentials ā€“ if applications can access resources on
          their own

   ļ‚” Choose whether to support Bearer tokens, MAC or both

   ļ‚” Define appropriate scopes for your service


aaron.pk/oauth2                                                      @aaronpk
OAuth 2 scope on your service

   ļ‚” Think about what scopes you might offer

   ļ‚” Donā€™t over-complicate it for your users

   ļ‚” Read vs write is a good start




aaron.pk/oauth2                                @aaronpk
Mobile Applications
   ļ‚” External user agents are best
      ļ‚” Use the serviceā€™s primary app for authentication, like
        Facebook
      ļ‚” Or open native Safari on iPhone rather than use an
        embedded browser

   ļ‚” Auth code or implicit grant type
      ļ‚” In both cases, the client secret should never be
        used, since it is possible to decompile the app which
        would reveal the secret




aaron.pk/oauth2                                                  @aaronpk
Staying Involved


aaron.pk/oauth2                @aaronpk
Join the Mailing List!
ļ‚” https://www.ietf.org/mailman/listinfo/oauth

ļ‚” People talk about OAuth

ļ‚” Keep up to date on changes

ļ‚” People argue about OAuth

ļ‚” Itā€™s fun!




aaron.pk/oauth2                                 @aaronpk
oauth.net




aaron.pk/oauth2   @aaronpk
oauth.net Website
   ļ‚” http://oauth.net

   ļ‚” Source code available on Github
      ļ‚” github.com/aaronpk/oauth.net

   ļ‚” Please feel free to contribute to the website

   ļ‚” Contribute new lists of libraries, or help update information

   ļ‚” OAuth is community-driven!




aaron.pk/oauth2                                                      @aaronpk
github.com/aaronpk/oauth.net




aaron.pk/oauth2                   @aaronpk
More Info, Slides & Code Samples:
aaron.pk/oauth2




                                          Thanks.
                                         Aaron Parecki
                                             @aaronpk
                                     aaronparecki.com
                                    github.com/aaronpk

More Related Content

What's hot

OpenID Connect Explained
OpenID Connect ExplainedOpenID Connect Explained
OpenID Connect ExplainedVladimir Dzhuvinov
Ā 
Implementing OAuth
Implementing OAuthImplementing OAuth
Implementing OAuthleahculver
Ā 
OpenID Connect: An Overview
OpenID Connect: An OverviewOpenID Connect: An Overview
OpenID Connect: An OverviewPat Patterson
Ā 
OAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID ConnectOAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID ConnectJacob Combs
Ā 
OAuth - Donā€™t Throw the Baby Out with the Bathwater
OAuth - Donā€™t Throw the Baby Out with the Bathwater OAuth - Donā€™t Throw the Baby Out with the Bathwater
OAuth - Donā€™t Throw the Baby Out with the Bathwater Apigee | Google Cloud
Ā 
OAuth - Open API Authentication
OAuth - Open API AuthenticationOAuth - Open API Authentication
OAuth - Open API Authenticationleahculver
Ā 
Intro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID ConnectIntro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID ConnectLiamWadman
Ā 
DCC17 - Identity Server 4
DCC17 - Identity Server 4DCC17 - Identity Server 4
DCC17 - Identity Server 4Chris Holwerda
Ā 
OAuth in the Wild
OAuth in the WildOAuth in the Wild
OAuth in the WildVictor Rentea
Ā 
OpenId Connect Protocol
OpenId Connect ProtocolOpenId Connect Protocol
OpenId Connect ProtocolMichael Furman
Ā 
SSO introduction
SSO introductionSSO introduction
SSO introductionAidy Tificate
Ā 
Stateless Auth using OAuth2 & JWT
Stateless Auth using OAuth2 & JWTStateless Auth using OAuth2 & JWT
Stateless Auth using OAuth2 & JWTGaurav Roy
Ā 
API Security Best Practices & Guidelines
API Security Best Practices & GuidelinesAPI Security Best Practices & Guidelines
API Security Best Practices & GuidelinesPrabath Siriwardena
Ā 
OAuth2 and Spring Security
OAuth2 and Spring SecurityOAuth2 and Spring Security
OAuth2 and Spring SecurityOrest Ivasiv
Ā 
Introduction to OpenID Connect
Introduction to OpenID Connect Introduction to OpenID Connect
Introduction to OpenID Connect Nat Sakimura
Ā 
REST API Design & Development
REST API Design & DevelopmentREST API Design & Development
REST API Design & DevelopmentAshok Pundit
Ā 
Draft: building secure applications with keycloak (oidc/jwt)
Draft: building secure applications with keycloak (oidc/jwt)Draft: building secure applications with keycloak (oidc/jwt)
Draft: building secure applications with keycloak (oidc/jwt)Abhishek Koserwal
Ā 

What's hot (20)

OAuth 2
OAuth 2OAuth 2
OAuth 2
Ā 
OpenID Connect Explained
OpenID Connect ExplainedOpenID Connect Explained
OpenID Connect Explained
Ā 
Implementing OAuth
Implementing OAuthImplementing OAuth
Implementing OAuth
Ā 
OpenID Connect: An Overview
OpenID Connect: An OverviewOpenID Connect: An Overview
OpenID Connect: An Overview
Ā 
OAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID ConnectOAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID Connect
Ā 
OAuth - Donā€™t Throw the Baby Out with the Bathwater
OAuth - Donā€™t Throw the Baby Out with the Bathwater OAuth - Donā€™t Throw the Baby Out with the Bathwater
OAuth - Donā€™t Throw the Baby Out with the Bathwater
Ā 
OAuth - Open API Authentication
OAuth - Open API AuthenticationOAuth - Open API Authentication
OAuth - Open API Authentication
Ā 
Intro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID ConnectIntro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID Connect
Ā 
OAuth
OAuthOAuth
OAuth
Ā 
DCC17 - Identity Server 4
DCC17 - Identity Server 4DCC17 - Identity Server 4
DCC17 - Identity Server 4
Ā 
Oauth 2.0
Oauth 2.0Oauth 2.0
Oauth 2.0
Ā 
OAuth in the Wild
OAuth in the WildOAuth in the Wild
OAuth in the Wild
Ā 
OpenId Connect Protocol
OpenId Connect ProtocolOpenId Connect Protocol
OpenId Connect Protocol
Ā 
SSO introduction
SSO introductionSSO introduction
SSO introduction
Ā 
Stateless Auth using OAuth2 & JWT
Stateless Auth using OAuth2 & JWTStateless Auth using OAuth2 & JWT
Stateless Auth using OAuth2 & JWT
Ā 
API Security Best Practices & Guidelines
API Security Best Practices & GuidelinesAPI Security Best Practices & Guidelines
API Security Best Practices & Guidelines
Ā 
OAuth2 and Spring Security
OAuth2 and Spring SecurityOAuth2 and Spring Security
OAuth2 and Spring Security
Ā 
Introduction to OpenID Connect
Introduction to OpenID Connect Introduction to OpenID Connect
Introduction to OpenID Connect
Ā 
REST API Design & Development
REST API Design & DevelopmentREST API Design & Development
REST API Design & Development
Ā 
Draft: building secure applications with keycloak (oidc/jwt)
Draft: building secure applications with keycloak (oidc/jwt)Draft: building secure applications with keycloak (oidc/jwt)
Draft: building secure applications with keycloak (oidc/jwt)
Ā 

Viewers also liked

OAuth2 Authentication
OAuth2 AuthenticationOAuth2 Authentication
OAuth2 AuthenticationIsmael Costa
Ā 
JavaOne 2014 - Securing RESTful Resources with OAuth2
JavaOne 2014 - Securing RESTful Resources with OAuth2JavaOne 2014 - Securing RESTful Resources with OAuth2
JavaOne 2014 - Securing RESTful Resources with OAuth2Rodrigo CĆ¢ndido da Silva
Ā 
Stateless authentication with OAuth 2 and JWT - JavaZone 2015
Stateless authentication with OAuth 2 and JWT - JavaZone 2015Stateless authentication with OAuth 2 and JWT - JavaZone 2015
Stateless authentication with OAuth 2 and JWT - JavaZone 2015Alvaro Sanchez-Mariscal
Ā 
The State of OAuth2
The State of OAuth2The State of OAuth2
The State of OAuth2Aaron Parecki
Ā 
Node.js å¼‚ę­„ä»»åŠ”ēš„å››ē§ęؔ式
Node.js å¼‚ę­„ä»»åŠ”ēš„å››ē§ęؔ式Node.js å¼‚ę­„ä»»åŠ”ēš„å››ē§ęؔ式
Node.js å¼‚ę­„ä»»åŠ”ēš„å››ē§ęؔ式Stackia Jia
Ā 
Auth in the extended enterprise - Keynote for MIT Legal Hack A Thon 2013
Auth in the extended enterprise - Keynote for MIT Legal Hack A Thon 2013Auth in the extended enterprise - Keynote for MIT Legal Hack A Thon 2013
Auth in the extended enterprise - Keynote for MIT Legal Hack A Thon 2013Justin Richer
Ā 
Best Practices in Building an API Security Ecosystem
Best Practices in Building an API Security EcosystemBest Practices in Building an API Security Ecosystem
Best Practices in Building an API Security EcosystemPrabath Siriwardena
Ā 
API Security : Patterns and Practices
API Security : Patterns and PracticesAPI Security : Patterns and Practices
API Security : Patterns and PracticesPrabath Siriwardena
Ā 
RESTful Security
RESTful SecurityRESTful Security
RESTful SecurityJim Siegienski
Ā 
Open Standards in Identity Management
Open Standards  in  Identity ManagementOpen Standards  in  Identity Management
Open Standards in Identity ManagementPrabath Siriwardena
Ā 
IP Security
IP SecurityIP Security
IP SecurityKeshab Nath
Ā 
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...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
Ā 
SesiĆ³n de aprendizaje 2017.docx
SesiĆ³n de aprendizaje 2017.docxSesiĆ³n de aprendizaje 2017.docx
SesiĆ³n de aprendizaje 2017.docxHugo Carlos Balbuena
Ā 
Secure Your REST API (The Right Way)
Secure Your REST API (The Right Way)Secure Your REST API (The Right Way)
Secure Your REST API (The Right Way)Stormpath
Ā 

Viewers also liked (16)

OAuth2 Authentication
OAuth2 AuthenticationOAuth2 Authentication
OAuth2 Authentication
Ā 
JavaOne 2014 - Securing RESTful Resources with OAuth2
JavaOne 2014 - Securing RESTful Resources with OAuth2JavaOne 2014 - Securing RESTful Resources with OAuth2
JavaOne 2014 - Securing RESTful Resources with OAuth2
Ā 
Stateless authentication with OAuth 2 and JWT - JavaZone 2015
Stateless authentication with OAuth 2 and JWT - JavaZone 2015Stateless authentication with OAuth 2 and JWT - JavaZone 2015
Stateless authentication with OAuth 2 and JWT - JavaZone 2015
Ā 
The State of OAuth2
The State of OAuth2The State of OAuth2
The State of OAuth2
Ā 
Node.js å¼‚ę­„ä»»åŠ”ēš„å››ē§ęؔ式
Node.js å¼‚ę­„ä»»åŠ”ēš„å››ē§ęؔ式Node.js å¼‚ę­„ä»»åŠ”ēš„å››ē§ęؔ式
Node.js å¼‚ę­„ä»»åŠ”ēš„å››ē§ęؔ式
Ā 
Auth in the extended enterprise - Keynote for MIT Legal Hack A Thon 2013
Auth in the extended enterprise - Keynote for MIT Legal Hack A Thon 2013Auth in the extended enterprise - Keynote for MIT Legal Hack A Thon 2013
Auth in the extended enterprise - Keynote for MIT Legal Hack A Thon 2013
Ā 
Best Practices in Building an API Security Ecosystem
Best Practices in Building an API Security EcosystemBest Practices in Building an API Security Ecosystem
Best Practices in Building an API Security Ecosystem
Ā 
API Security : Patterns and Practices
API Security : Patterns and PracticesAPI Security : Patterns and Practices
API Security : Patterns and Practices
Ā 
RESTful Security
RESTful SecurityRESTful Security
RESTful Security
Ā 
Deep Dive In To Kerberos
Deep Dive In To KerberosDeep Dive In To Kerberos
Deep Dive In To Kerberos
Ā 
Open Standards in Identity Management
Open Standards  in  Identity ManagementOpen Standards  in  Identity Management
Open Standards in Identity Management
Ā 
Ipsec
IpsecIpsec
Ipsec
Ā 
IP Security
IP SecurityIP Security
IP Security
Ā 
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...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...
Ā 
SesiĆ³n de aprendizaje 2017.docx
SesiĆ³n de aprendizaje 2017.docxSesiĆ³n de aprendizaje 2017.docx
SesiĆ³n de aprendizaje 2017.docx
Ā 
Secure Your REST API (The Right Way)
Secure Your REST API (The Right Way)Secure Your REST API (The Right Way)
Secure Your REST API (The Right Way)
Ā 

Similar to An Introduction to OAuth2

The Current State of OAuth 2
The Current State of OAuth 2The Current State of OAuth 2
The Current State of OAuth 2Aaron Parecki
Ā 
OAuth 2 at Webvisions
OAuth 2 at WebvisionsOAuth 2 at Webvisions
OAuth 2 at WebvisionsAaron Parecki
Ā 
UC2013 Speed Geeking: Intro to OAuth2
UC2013 Speed Geeking: Intro to OAuth2UC2013 Speed Geeking: Intro to OAuth2
UC2013 Speed Geeking: Intro to OAuth2Aaron Parecki
Ā 
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Aaron Parecki
Ā 
Api security with OAuth
Api security with OAuthApi security with OAuth
Api security with OAuththariyarox
Ā 
INTERFACE by apidays - The State of OAuth by Aaron Parecki,
INTERFACE by apidays - The State of OAuth by Aaron Parecki,INTERFACE by apidays - The State of OAuth by Aaron Parecki,
INTERFACE by apidays - The State of OAuth by Aaron Parecki,apidays
Ā 
OAuth Introduction
OAuth IntroductionOAuth Introduction
OAuth Introductionh_marvin
Ā 
UserCentric Identity based Service Invocation
UserCentric Identity based Service InvocationUserCentric Identity based Service Invocation
UserCentric Identity based Service Invocationguestd5dde6
Ā 
OAuth and OEmbed
OAuth and OEmbedOAuth and OEmbed
OAuth and OEmbedleahculver
Ā 
ć‚¢ćƒ—ćƒŖ開ē™ŗ恧ēŸ„ć£ć¦ćŠććŸć„čŖčØ¼ęŠ€č”“ - OAuth 1.0 + OAuth 2.0 + OpenID Connect -
ć‚¢ćƒ—ćƒŖ開ē™ŗ恧ēŸ„ć£ć¦ćŠććŸć„čŖčØ¼ęŠ€č”“ - OAuth 1.0 + OAuth 2.0 + OpenID Connect -ć‚¢ćƒ—ćƒŖ開ē™ŗ恧ēŸ„ć£ć¦ćŠććŸć„čŖčØ¼ęŠ€č”“ - OAuth 1.0 + OAuth 2.0 + OpenID Connect -
ć‚¢ćƒ—ćƒŖ開ē™ŗ恧ēŸ„ć£ć¦ćŠććŸć„čŖčØ¼ęŠ€č”“ - OAuth 1.0 + OAuth 2.0 + OpenID Connect -Naoki Nagazumi
Ā 
Devteach 2017 OAuth and Open id connect demystified
Devteach 2017 OAuth and Open id connect demystifiedDevteach 2017 OAuth and Open id connect demystified
Devteach 2017 OAuth and Open id connect demystifiedTaswar Bhatti
Ā 
Introduction to OAuth
Introduction to OAuthIntroduction to OAuth
Introduction to OAuthPaul Osman
Ā 
OAuth 2.0 and Library
OAuth 2.0 and LibraryOAuth 2.0 and Library
OAuth 2.0 and LibraryKenji Otsuka
Ā 
iMasters Intercon 2016 - Identity within Microservices
iMasters Intercon 2016 - Identity within MicroservicesiMasters Intercon 2016 - Identity within Microservices
iMasters Intercon 2016 - Identity within MicroservicesErick Belluci Tedeschi
Ā 
InterCon 2016 - SeguranƧa de identidade digital levando em consideraĆ§Ć£o uma a...
InterCon 2016 - SeguranƧa de identidade digital levando em consideraĆ§Ć£o uma a...InterCon 2016 - SeguranƧa de identidade digital levando em consideraĆ§Ć£o uma a...
InterCon 2016 - SeguranƧa de identidade digital levando em consideraĆ§Ć£o uma a...iMasters
Ā 
What the Heck is OAuth and OIDC - UberConf 2018
What the Heck is OAuth and OIDC - UberConf 2018What the Heck is OAuth and OIDC - UberConf 2018
What the Heck is OAuth and OIDC - UberConf 2018Matt Raible
Ā 
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop Apigee | Google Cloud
Ā 
ORCID OAuth Dance with google playground
ORCID OAuth Dance with google playgroundORCID OAuth Dance with google playground
ORCID OAuth Dance with google playgroundORCID, Inc
Ā 

Similar to An Introduction to OAuth2 (20)

The Current State of OAuth 2
The Current State of OAuth 2The Current State of OAuth 2
The Current State of OAuth 2
Ā 
OAuth 2 at Webvisions
OAuth 2 at WebvisionsOAuth 2 at Webvisions
OAuth 2 at Webvisions
Ā 
UC2013 Speed Geeking: Intro to OAuth2
UC2013 Speed Geeking: Intro to OAuth2UC2013 Speed Geeking: Intro to OAuth2
UC2013 Speed Geeking: Intro to OAuth2
Ā 
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Ā 
Api security with OAuth
Api security with OAuthApi security with OAuth
Api security with OAuth
Ā 
INTERFACE by apidays - The State of OAuth by Aaron Parecki,
INTERFACE by apidays - The State of OAuth by Aaron Parecki,INTERFACE by apidays - The State of OAuth by Aaron Parecki,
INTERFACE by apidays - The State of OAuth by Aaron Parecki,
Ā 
OAuth Introduction
OAuth IntroductionOAuth Introduction
OAuth Introduction
Ā 
UserCentric Identity based Service Invocation
UserCentric Identity based Service InvocationUserCentric Identity based Service Invocation
UserCentric Identity based Service Invocation
Ā 
OAuth and OEmbed
OAuth and OEmbedOAuth and OEmbed
OAuth and OEmbed
Ā 
ć‚¢ćƒ—ćƒŖ開ē™ŗ恧ēŸ„ć£ć¦ćŠććŸć„čŖčØ¼ęŠ€č”“ - OAuth 1.0 + OAuth 2.0 + OpenID Connect -
ć‚¢ćƒ—ćƒŖ開ē™ŗ恧ēŸ„ć£ć¦ćŠććŸć„čŖčØ¼ęŠ€č”“ - OAuth 1.0 + OAuth 2.0 + OpenID Connect -ć‚¢ćƒ—ćƒŖ開ē™ŗ恧ēŸ„ć£ć¦ćŠććŸć„čŖčØ¼ęŠ€č”“ - OAuth 1.0 + OAuth 2.0 + OpenID Connect -
ć‚¢ćƒ—ćƒŖ開ē™ŗ恧ēŸ„ć£ć¦ćŠććŸć„čŖčØ¼ęŠ€č”“ - OAuth 1.0 + OAuth 2.0 + OpenID Connect -
Ā 
OAuth and Open-id
OAuth and Open-idOAuth and Open-id
OAuth and Open-id
Ā 
Devteach 2017 OAuth and Open id connect demystified
Devteach 2017 OAuth and Open id connect demystifiedDevteach 2017 OAuth and Open id connect demystified
Devteach 2017 OAuth and Open id connect demystified
Ā 
Introduction to OAuth
Introduction to OAuthIntroduction to OAuth
Introduction to OAuth
Ā 
OAuth 2.0 and Library
OAuth 2.0 and LibraryOAuth 2.0 and Library
OAuth 2.0 and Library
Ā 
iMasters Intercon 2016 - Identity within Microservices
iMasters Intercon 2016 - Identity within MicroservicesiMasters Intercon 2016 - Identity within Microservices
iMasters Intercon 2016 - Identity within Microservices
Ā 
InterCon 2016 - SeguranƧa de identidade digital levando em consideraĆ§Ć£o uma a...
InterCon 2016 - SeguranƧa de identidade digital levando em consideraĆ§Ć£o uma a...InterCon 2016 - SeguranƧa de identidade digital levando em consideraĆ§Ć£o uma a...
InterCon 2016 - SeguranƧa de identidade digital levando em consideraĆ§Ć£o uma a...
Ā 
What the Heck is OAuth and OIDC - UberConf 2018
What the Heck is OAuth and OIDC - UberConf 2018What the Heck is OAuth and OIDC - UberConf 2018
What the Heck is OAuth and OIDC - UberConf 2018
Ā 
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
Ā 
ORCID OAuth Dance with google playground
ORCID OAuth Dance with google playgroundORCID OAuth Dance with google playground
ORCID OAuth Dance with google playground
Ā 
Some OAuth love
Some OAuth loveSome OAuth love
Some OAuth love
Ā 

More from Aaron Parecki

Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013Aaron Parecki
Ā 
Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013
Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013
Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013Aaron Parecki
Ā 
Rule Your Geometry with the Terraformer Toolkit
Rule Your Geometry with the Terraformer ToolkitRule Your Geometry with the Terraformer Toolkit
Rule Your Geometry with the Terraformer ToolkitAaron Parecki
Ā 
Intro to the ArcGIS Geotrigger Service
Intro to the ArcGIS Geotrigger ServiceIntro to the ArcGIS Geotrigger Service
Intro to the ArcGIS Geotrigger ServiceAaron Parecki
Ā 
Low Friction Personal Data Collection - Quantified Self Global Conference 2013
Low Friction Personal Data Collection - Quantified Self Global Conference 2013Low Friction Personal Data Collection - Quantified Self Global Conference 2013
Low Friction Personal Data Collection - Quantified Self Global Conference 2013Aaron Parecki
Ā 
Low Friction Personal Data Collection - QS Portland
Low Friction Personal Data Collection - QS PortlandLow Friction Personal Data Collection - QS Portland
Low Friction Personal Data Collection - QS PortlandAaron Parecki
Ā 
Done Reports - Open Source Bridge
Done Reports - Open Source BridgeDone Reports - Open Source Bridge
Done Reports - Open Source BridgeAaron Parecki
Ā 
Esri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGIS
Esri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGISEsri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGIS
Esri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGISAaron Parecki
Ā 
Low Friction Personal Data Collection - Open Source Bridge
Low Friction Personal Data Collection - Open Source BridgeLow Friction Personal Data Collection - Open Source Bridge
Low Friction Personal Data Collection - Open Source BridgeAaron Parecki
Ā 
Low Friction Personal Data Collection - CyborgCamp 2012
Low Friction Personal Data Collection - CyborgCamp 2012Low Friction Personal Data Collection - CyborgCamp 2012
Low Friction Personal Data Collection - CyborgCamp 2012Aaron Parecki
Ā 
Personal Data Collection Breakout Session Notes
Personal Data Collection Breakout Session NotesPersonal Data Collection Breakout Session Notes
Personal Data Collection Breakout Session NotesAaron Parecki
Ā 
Home Automation with SMS and GPS
Home Automation with SMS and GPSHome Automation with SMS and GPS
Home Automation with SMS and GPSAaron Parecki
Ā 
Ambient Discovery - Augmented Reality Event 2011
Ambient Discovery - Augmented Reality Event 2011Ambient Discovery - Augmented Reality Event 2011
Ambient Discovery - Augmented Reality Event 2011Aaron Parecki
Ā 
Geolocation in Web and Native Mobile Apps
Geolocation in Web and Native Mobile AppsGeolocation in Web and Native Mobile Apps
Geolocation in Web and Native Mobile AppsAaron Parecki
Ā 
Ambient Location Apps and Geoloqi
Ambient Location Apps and GeoloqiAmbient Location Apps and Geoloqi
Ambient Location Apps and GeoloqiAaron Parecki
Ā 
Geoloqi iPhone App Tour
Geoloqi iPhone App TourGeoloqi iPhone App Tour
Geoloqi iPhone App TourAaron Parecki
Ā 
The Vowel R - Ignite Portland 9
The Vowel R - Ignite Portland 9The Vowel R - Ignite Portland 9
The Vowel R - Ignite Portland 9Aaron Parecki
Ā 
Geoloqi: Non-visual augmented reality Open Source Bridge
Geoloqi: Non-visual augmented reality Open Source BridgeGeoloqi: Non-visual augmented reality Open Source Bridge
Geoloqi: Non-visual augmented reality Open Source BridgeAaron Parecki
Ā 

More from Aaron Parecki (18)

Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
Ā 
Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013
Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013
Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013
Ā 
Rule Your Geometry with the Terraformer Toolkit
Rule Your Geometry with the Terraformer ToolkitRule Your Geometry with the Terraformer Toolkit
Rule Your Geometry with the Terraformer Toolkit
Ā 
Intro to the ArcGIS Geotrigger Service
Intro to the ArcGIS Geotrigger ServiceIntro to the ArcGIS Geotrigger Service
Intro to the ArcGIS Geotrigger Service
Ā 
Low Friction Personal Data Collection - Quantified Self Global Conference 2013
Low Friction Personal Data Collection - Quantified Self Global Conference 2013Low Friction Personal Data Collection - Quantified Self Global Conference 2013
Low Friction Personal Data Collection - Quantified Self Global Conference 2013
Ā 
Low Friction Personal Data Collection - QS Portland
Low Friction Personal Data Collection - QS PortlandLow Friction Personal Data Collection - QS Portland
Low Friction Personal Data Collection - QS Portland
Ā 
Done Reports - Open Source Bridge
Done Reports - Open Source BridgeDone Reports - Open Source Bridge
Done Reports - Open Source Bridge
Ā 
Esri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGIS
Esri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGISEsri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGIS
Esri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGIS
Ā 
Low Friction Personal Data Collection - Open Source Bridge
Low Friction Personal Data Collection - Open Source BridgeLow Friction Personal Data Collection - Open Source Bridge
Low Friction Personal Data Collection - Open Source Bridge
Ā 
Low Friction Personal Data Collection - CyborgCamp 2012
Low Friction Personal Data Collection - CyborgCamp 2012Low Friction Personal Data Collection - CyborgCamp 2012
Low Friction Personal Data Collection - CyborgCamp 2012
Ā 
Personal Data Collection Breakout Session Notes
Personal Data Collection Breakout Session NotesPersonal Data Collection Breakout Session Notes
Personal Data Collection Breakout Session Notes
Ā 
Home Automation with SMS and GPS
Home Automation with SMS and GPSHome Automation with SMS and GPS
Home Automation with SMS and GPS
Ā 
Ambient Discovery - Augmented Reality Event 2011
Ambient Discovery - Augmented Reality Event 2011Ambient Discovery - Augmented Reality Event 2011
Ambient Discovery - Augmented Reality Event 2011
Ā 
Geolocation in Web and Native Mobile Apps
Geolocation in Web and Native Mobile AppsGeolocation in Web and Native Mobile Apps
Geolocation in Web and Native Mobile Apps
Ā 
Ambient Location Apps and Geoloqi
Ambient Location Apps and GeoloqiAmbient Location Apps and Geoloqi
Ambient Location Apps and Geoloqi
Ā 
Geoloqi iPhone App Tour
Geoloqi iPhone App TourGeoloqi iPhone App Tour
Geoloqi iPhone App Tour
Ā 
The Vowel R - Ignite Portland 9
The Vowel R - Ignite Portland 9The Vowel R - Ignite Portland 9
The Vowel R - Ignite Portland 9
Ā 
Geoloqi: Non-visual augmented reality Open Source Bridge
Geoloqi: Non-visual augmented reality Open Source BridgeGeoloqi: Non-visual augmented reality Open Source Bridge
Geoloqi: Non-visual augmented reality Open Source Bridge
Ā 

Recently uploaded

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
Ā 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
Ā 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
Ā 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
Ā 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
Ā 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
Ā 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
Ā 
Elevate Developer Efficiency & build GenAI Application with Amazon Qā€‹
Elevate Developer Efficiency & build GenAI Application with Amazon Qā€‹Elevate Developer Efficiency & build GenAI Application with Amazon Qā€‹
Elevate Developer Efficiency & build GenAI Application with Amazon Qā€‹Bhuvaneswari Subramani
Ā 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
Ā 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
Ā 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
Ā 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
Ā 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Christopher Logan Kennedy
Ā 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
Ā 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
Ā 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
Ā 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
Ā 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
Ā 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
Ā 

Recently uploaded (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
Ā 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
Ā 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
Ā 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
Ā 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Ā 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
Ā 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
Ā 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Ā 
Elevate Developer Efficiency & build GenAI Application with Amazon Qā€‹
Elevate Developer Efficiency & build GenAI Application with Amazon Qā€‹Elevate Developer Efficiency & build GenAI Application with Amazon Qā€‹
Elevate Developer Efficiency & build GenAI Application with Amazon Qā€‹
Ā 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
Ā 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Ā 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Ā 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Ā 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
Ā 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
Ā 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
Ā 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Ā 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
Ā 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Ā 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Ā 

An Introduction to OAuth2

  • 1. An Introduction to OAuth 2 Aaron Parecki ā€¢ @aaronpk Oā€™Reilly Webcast ā€¢ July 2012
  • 3. Before OAuth aka the Dark Ages If a third party wanted access to an account, youā€™d give them your password. aaron.pk/oauth2 @aaronpk
  • 4. Several Problems and Limitations ļ‚” Apps store the userā€™s password ļ‚” Apps get complete access to a userā€™s account ļ‚” Users canā€™t revoke access to an app except by changing their password ļ‚” Compromised apps expose the userā€™s password aaron.pk/oauth2 @aaronpk
  • 5. Before OAuth 1.0 ļ‚” Services recognized the problems with password authentication ļ‚” Many services implemented things similar to OAuth 1.0 ļ‚” Each implementation was slightly different, certainly not compatible with each other aaron.pk/oauth2 @aaronpk
  • 6. Before OAuth 1.0 ļ‚” Flickr: ā€œFlickrAuthā€ frobs and tokens ļ‚” Google: ā€œAuthSubā€ ļ‚” Facebook: requests signed with MD5 hashes ļ‚” Yahoo: BBAuth (ā€œBrowser-Based Authā€) aaron.pk/oauth2 @aaronpk
  • 7. ā€œWe want something like Flickr Auth / Google AuthSub / Yahoo! BBAuth, but published as an open standard, with common server and client libraries.ā€ Blaine Cook, April 5th, 2007 aaron.pk/oauth2 @aaronpk
  • 9. aaron.pk/oauth2 @aaronpk
  • 10. aaron.pk/oauth2 @aaronpk
  • 11. OAuth 1.0 Signatures The signature base string is often the most difficult part of OAuth for newcomers to construct. The signature base string is composed of the HTTP method being used, followed by an ampersand ("&") and then the URL-encoded base URL being accessed, complete with path (but not query parameters), followed by an ampersand ("&"). Then, you take all query parameters and POST body parameters (when the POST body is of the URL-encoded type, otherwise the POST body is ignored), including the OAuth parameters necessary for negotiation with the request at hand, and sort them in lexicographical order by first parameter name and oauth_nonce="QP70eNmVz8jvdPevU3oJD2AfF7R7o then parameter value (for duplicate parameters), all the dC2XJcn4XlZJqk", while ensuring that both the key and the value for each parameter are URL encoded in isolation. Instead of using oauth_callback="http%3A%2F%2Flocalhost%3A300 the equals ("=") sign to mark the key/value relationship, you 5%2Fthe_dance%2Fprocess_callback%3Fservice_pr use the URL-encoded form of "%3D". Each parameter is then ovider_id%3D11", joined by the URL-escaped ampersand sign, "%26". oauth_signature_method="HMAC-SHA1", oauth_timestamp="1272323042", oauth_consumer_key="GDdmIQH6jhtmLUypg82g", oauth_signature="8wUi7m5HFQy76nowoCThusfgB% aaron.pk/oauth2 2BQ%3D", oauth_version="1.0" @aaronpk
  • 12. aaron.pk/oauth2 @aaronpk
  • 13. OAuth 2: signatures replaced by https HMAC aaron.pk/oauth2 @aaronpk
  • 15. The OAuth 2 Spec http://oauth.net/2/
  • 16. OAuth 2?! There are 29 versions! aaron.pk/oauth2 @aaronpk
  • 17. Currently Implemented Drafts Provider Draft Reference Foursquare -10 http://aaron.pk/2YS http://code.google.com/apis/accounts/do Google -10 cs/OAuth2.html https://developers.facebook.com/docs/aut Facebook -10 (ish) hentication/oauth2_updates/ Windows -10 http://aaron.pk/2YV Live Salesforce -10 http://aaron.pk/2YW Github -07 http://develop.github.com/p/oauth.html Geoloqi -10 http://developers.geoloqi.com/api @aaronpk
  • 18. So how does it work? aaron.pk/oauth2 @aaronpk
  • 19. Definitions ļ‚”Resource Owner: The User ļ‚”Resource Server: The API ļ‚”Authorization Server: Often the same as the API server ļ‚”Client: The Third-Party Application aaron.pk/oauth2 @aaronpk
  • 20. Use Cases ļ‚”Web-server apps ļ‚”Browser-based apps ļ‚”Username/password access ļ‚”Application access ļ‚”Mobile apps aaron.pk/oauth2 @aaronpk
  • 21. Facebookā€™s OAuth Flow Source: https://developers.facebook.com/docs/authentication/ @aaronpk
  • 22. Web Server Apps Authorization Code Grant aaron.pk/oauth2 @aaronpk
  • 23. Create a ā€œLog Inā€ link Link to: https://facebook.com/dialog/oauth?response_ type=code&client_id=YOUR_CLIENT_ID&redirect _uri=REDIRECT_URI&scope=email aaron.pk/oauth2 @aaronpk
  • 24. Create a ā€œLog Inā€ link Link to: https://facebook.com/dialog/oauth?response_ type=code&client_id=YOUR_CLIENT_ID&redirect _uri=REDIRECT_URI&scope=email aaron.pk/oauth2 @aaronpk
  • 25. Create a ā€œLog Inā€ link Link to: https://facebook.com/dialog/oauth?response_ type=code&client_id=YOUR_CLIENT_ID&redirect _uri=REDIRECT_URI&scope=email aaron.pk/oauth2 @aaronpk
  • 26. Create a ā€œLog Inā€ link Link to: https://facebook.com/dialog/oauth?response_ type=code&client_id=YOUR_CLIENT_ID&redirect _uri=REDIRECT_URI&scope=email aaron.pk/oauth2 @aaronpk
  • 27. Create a ā€œLog Inā€ link Link to: https://facebook.com/dialog/oauth?response_ type=code&client_id=YOUR_CLIENT_ID&redirect _uri=REDIRECT_URI&scope=email aaron.pk/oauth2 @aaronpk
  • 28. User visits the authorization page https://facebook.com/dialog/oauth?response_ type=code&client_id=28653682475872&redirect _uri=everydaycity.com&scope=email aaron.pk/oauth2 @aaronpk
  • 29. On success, user is redirected back to your site with auth code https://example.com/auth?code=AUTH_CODE_HERE On error, user is redirected back to your site with error code https://example.com/auth?error=access_denied aaron.pk/oauth2 @aaronpk
  • 30. Server exchanges auth code for an access token Your server makes the following request POST https://graph.facebook.com/oauth/access_to ken Post Body: grant_type=authorization_code &code=CODE_FROM_QUERY_STRING &redirect_uri=REDIRECT_URI &client_id=YOUR_CLIENT_ID &client_secret=YOUR_CLIENT_SECRET aaron.pk/oauth2 @aaronpk
  • 31. Server exchanges auth code for an access token Your server gets a response like the following { "access_token":"RsT5OjbzRn430zqMLgV3Ia", "token_type":"bearer", "expires_in":3600, "refresh_token":"e1qoXg7Ik2RRua48lXIV" } or if there was an error { "error":"invalid_request" } aaron.pk/oauth2 @aaronpk
  • 32. Browser-Based Apps Implicit Grant aaron.pk/oauth2 @aaronpk
  • 33. Create a ā€œLog Inā€ link Link to: https://facebook.com/dialog/oauth?response_ type=token&client_id=CLIENT_ID &redirect_uri=REDIRECT_URI&scope=email aaron.pk/oauth2 @aaronpk
  • 34. User visits the authorization page https://facebook.com/dialog/oauth?response_ type=token&client_id=2865368247587&redirect _uri=everydaycity.com&scope=email aaron.pk/oauth2 @aaronpk
  • 35. On success, user is redirected back to your site with the access token in the fragment https://example.com/auth#token=ACCESS_TOKEN On error, user is redirected back to your site with error code https://example.com/auth#error=access_denied aaron.pk/oauth2 @aaronpk
  • 36. Browser-Based Apps ļ‚” Use the ā€œImplicitā€ grant type ļ‚” No server-side code needed ļ‚” Client secret not used ļ‚” Browser makes API requests directly aaron.pk/oauth2 @aaronpk
  • 37. Username/Password Password Grant aaron.pk/oauth2 @aaronpk
  • 38. Password Grant Password grant is only appropriate for trusted clients, most likely first-party apps only. If you build your own website as a client of your API, then this is a great way to handle logging in. aaron.pk/oauth2 @aaronpk
  • 39. Password Grant Type Only appropriate for your serviceā€™s website or your serviceā€™s mobile apps. aaron.pk/oauth2
  • 40. Password Grant POST https://api.example.com/oauth/token Post Body: grant_type=password &username=USERNAME &password=PASSWORD &client_id=YOUR_CLIENT_ID &client_secret=YOUR_CLIENT_SECRET Response: { "access_token":"RsT5OjbzRn430zqMLgV3Ia", "token_type":"bearer", "expires_in":3600, "refresh_token":"e1qoXg7Ik2RRua48lXIV" } aaron.pk/oauth2 @aaronpk
  • 41. Application Access Client Credentials Grant aaron.pk/oauth2 @aaronpk
  • 42. Client Credentials Grant POST https://api.example.com/1/oauth/token Post Body: grant_type=client_credentials &client_id=YOUR_CLIENT_ID &client_secret=YOUR_CLIENT_SECRET Response: { "access_token":"RsT5OjbzRn430zqMLgV3Ia", "token_type":"bearer", "expires_in":3600, "refresh_token":"e1qoXg7Ik2RRua48lXIV" } aaron.pk/oauth2 @aaronpk
  • 43. Mobile Apps Implicit Grant aaron.pk/oauth2 @aaronpk
  • 44. aaron.pk/oauth2 @aaronpk
  • 45. aaron.pk/oauth2 @aaronpk
  • 46. Redirect back to your app Facebook app redirects back to your app using a custom URI scheme. Access token is included in the redirect, just like browser-based apps. fb2865://authorize/#access_token=BAAEEmo2nocQBAFFOeRTd aaron.pk/oauth2 @aaronpk
  • 47. aaron.pk/oauth2 @aaronpk
  • 48. Mobile Apps ļ‚” Use the ā€œImplicitā€ grant type ļ‚” No server-side code needed ļ‚” Client secret not used ļ‚” Mobile app makes API requests directly aaron.pk/oauth2 @aaronpk
  • 49. Grant Type Summary ļ‚”authorization_code: Web-server apps ļ‚”implicit: Mobile and browser-based apps ļ‚”password: Username/password access ļ‚”client_credentials: Application access aaron.pk/oauth2 @aaronpk
  • 50. Accessing Resources So you have an access token. Now what? aaron.pk/oauth2 @aaronpk
  • 51. Use the access token to make requests Now you can make requests using the access token. GET https://api.example.com/me Authorization: Bearer RsT5OjbzRn430zqMLgV3Ia Access token can be in an HTTP header or a query string parameter https://api.example.com/me?access_token=RsT5Ojb zRn430zqMLgV3Ia aaron.pk/oauth2 @aaronpk
  • 52. Eventually the access token will expire When you make a request with an expired token, you will get this response { "error":"expired_token" } Now you need to get a new access token! aaron.pk/oauth2 @aaronpk
  • 53. Get a new access token using a refresh token Your server makes the following request POST https://api.example.com/oauth/token grant_type=refresh_token &reresh_token=e1qoXg7Ik2RRua48lXIV &client_id=YOUR_CLIENT_ID &client_secret=YOUR_CLIENT_SECRET Your server gets a similar response as the original call to oauth/token with new tokens. { "access_token":"RsT5OjbzRn430zqMLgV3Ia", "expires_in":3600, "refresh_token":"e1qoXg7Ik2RRua48lXIV" } aaron.pk/oauth2 @aaronpk
  • 54. Moving access into separate specs Bearer tokens vs MAC authentication aaron.pk/oauth2 @aaronpk
  • 55. Bearer Tokens GET /1/profile HTTP/1.1 Host: api.example.com Authorization: Bearer B2mpLsHWhuVFw3YeLFW3f2 Bearer tokens are a cryptography-free way to access protected resources. Relies on the security present in the HTTPS connection, since the request itself is not signed. aaron.pk/oauth2 @aaronpk
  • 56. Security Recommendations for Clients Using Bearer Tokens ļ‚” Safeguard bearer tokens ļ‚” Validate SSL certificates ļ‚” Always use https ļ‚” Donā€™t store bearer tokens in plaintext cookies ļ‚” Issue short-lived bearer tokens ļ‚” Donā€™t pass bearer tokens in page URLs aaron.pk/oauth2 @aaronpk
  • 57. MAC Tokens GET /1/profile HTTP/1.1 Host: api.example.com Authorization: MAC id="jd93dh9dh39D", nonce="273156:di3hvdf8", bodyhash="k9kbtCIyI3/FEfpS/oIDjk6k=", mac="W7bdMZbv9UWOTadASIQHagZyirA=" MAC tokens provide a way to make authenticated requests with cryptographic verification of the request. Similar to the original OAuth 1.0 method of using signatures. @aaronpk
  • 58. OAuth 2 Clients Client libraries should handle refreshing the token automatically behind the scenes. aaron.pk/oauth2 @aaronpk
  • 59. Scope Limiting access to resouces aaron.pk/oauth2 @aaronpk
  • 60. Limiting Access to Third Parties aaron.pk/oauth2 @aaronpk
  • 61. Limiting Access to Third Parties aaron.pk/oauth2 @aaronpk
  • 62. Limiting Access to Third Parties aaron.pk/oauth2 @aaronpk
  • 63. OAuth 2 scope ļ‚” Created to limit access to the third party. ļ‚” The scope of the access request expressed as a list of space- delimited strings. ļ‚” In practice, many people use comma-separators instead. ļ‚” The spec does not define any values, itā€™s left up to the implementor. ļ‚” If the value contains multiple strings, their order does not matter, and each string adds an additional access range to the requested scope. aaron.pk/oauth2 @aaronpk
  • 64. OAuth 2 scope on Facebook https://www.facebook.com/dialog/oauth? client_id=YOUR_APP_ID&redirect_uri=YOUR_URL &scope=email,read_stream aaron.pk/oauth2 @aaronpk
  • 65. OAuth 2 scope on Facebook aaron.pk/oauth2 @aaronpk
  • 66. OAuth 2 scope on Github https://github.com/login/oauth/authorize? client_id=...&scope=user,public_repo user ā€¢ Read/write access to profile info only. public_repo ā€¢ Read/write access to public repos and organizations. repo ā€¢ Read/write access to public and private repos and organizations. delete_repo ā€¢ Delete access to adminable repositories. gist ā€¢ write access to gists. aaron.pk/oauth2 @aaronpk
  • 67. Proposed New UI for Twitter by Ben Ward http://blog.benward.me/post/968515729
  • 69. Implementing an OAuth Server ļ‚” Find a server library already written: ļ‚” A short list available here: http://oauth.net/2/ ļ‚” Read the spec of your chosen draft, in its entirety. ļ‚” These people didnā€™t write the spec for you to ignore it. ļ‚” Each word is chosen carefully. ļ‚” Ultimately, each implementation is somewhat different, since in many cases the spec says SHOULD and leaves the choice up to the implementer. ļ‚” Understand the security implications of the implementation choices you make. aaron.pk/oauth2 @aaronpk
  • 70. Implementing an OAuth Server ļ‚” Choose which grant types you want to support ļ‚” Authorization Code ā€“ for traditional web apps ļ‚” Implicit ā€“ for browser-based apps and mobile apps ļ‚” Password ā€“ for your own website or mobile apps ļ‚” Client Credentials ā€“ if applications can access resources on their own ļ‚” Choose whether to support Bearer tokens, MAC or both ļ‚” Define appropriate scopes for your service aaron.pk/oauth2 @aaronpk
  • 71. OAuth 2 scope on your service ļ‚” Think about what scopes you might offer ļ‚” Donā€™t over-complicate it for your users ļ‚” Read vs write is a good start aaron.pk/oauth2 @aaronpk
  • 72. Mobile Applications ļ‚” External user agents are best ļ‚” Use the serviceā€™s primary app for authentication, like Facebook ļ‚” Or open native Safari on iPhone rather than use an embedded browser ļ‚” Auth code or implicit grant type ļ‚” In both cases, the client secret should never be used, since it is possible to decompile the app which would reveal the secret aaron.pk/oauth2 @aaronpk
  • 74. Join the Mailing List! ļ‚” https://www.ietf.org/mailman/listinfo/oauth ļ‚” People talk about OAuth ļ‚” Keep up to date on changes ļ‚” People argue about OAuth ļ‚” Itā€™s fun! aaron.pk/oauth2 @aaronpk
  • 76. oauth.net Website ļ‚” http://oauth.net ļ‚” Source code available on Github ļ‚” github.com/aaronpk/oauth.net ļ‚” Please feel free to contribute to the website ļ‚” Contribute new lists of libraries, or help update information ļ‚” OAuth is community-driven! aaron.pk/oauth2 @aaronpk
  • 78. More Info, Slides & Code Samples: aaron.pk/oauth2 Thanks. Aaron Parecki @aaronpk aaronparecki.com github.com/aaronpk

Editor's Notes

  1. It was common to see third party sites asking for your Twitter or Email passwords to log you in. Obviously you should be reluctant to hand over your login information to some other site.
  2. Problem is itā€™s really hard to get the signatures right as a third party, and you have to have a real solid understanding of it if youā€™re going to implement it on your server.
  3. This led to a lot of confusion by developers both on the client and server side.
  4. OAuth 2 recognizes the challenges of requiring signatures and nonces, and moves to a model where all data is transferred using the built-in encryption of HTTPS.
  5. Many sites are adopting the new OAuth 2 spec.http://windowsteamblog.com/windows_live/b/developer/archive/2011/05/04/announcing-support-for-oauth-2-0.aspxhttp://googlecode.blogspot.com/2011/03/making-auth-easier-oauth-20-for-google.html
  6. Make sure to keep the refresh token around
  7. Now the Javascript code can read the access token in the fragment and begin making API requests
  8. Now the Javascript code can read the access token in the fragment and begin making API requests
  9. Now the Javascript code can read the access token in the fragment and begin making API requests