Skip to content

Instantly share code, notes, and snippets.

@benschw
Last active December 23, 2015 22:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benschw/6705736 to your computer and use it in GitHub Desktop.
Save benschw/6705736 to your computer and use it in GitHub Desktop.

Roles

Client (The Third-Party Application)

The client is the application that is attempting to get access to the user's account. It needs to get permission from the user before it can do so.

Resource Server (The API)

The resource server is the API server used to access the user's information.

Resource Owner (The User)

The resource owner is the person who is giving access to some portion of their account.

Access Token Scope

ietf

The client specifies the scope of the access request (which the access token should provide access to)

Grant Types

Authorization Code (oauth 1 'ish)

An authorization code is returned to the client through a browser redirect after the resource owner gives consent to the OAuth AS. The client subsequently exchanges the authorization code for an access (and often a refresh) token. Resource owner credentials are never exposed to the client.

Implicit (browser app)

An access token is returned to the client through a browser redirect in response to the resource owner authorization request (rather than an intermediate authorization code). This grant type is suitable for clients incapable of keeping client credentials confidential (for use in authenticating with the OAuth AS) such as client applications implemented in a browser using a scripting language like Javascript.

Resource Owner Credentials (trusted client)

The resource owner password credentials grant type is suitable in cases where the resource owner has a trust relationship with the client, such as the device operating system or a highly privileged application. The authorization server should take special care when enabling this grant type, and only allow it when other flows are not viable.

The grant type is suitable for clients capable of obtaining the resource owner's credentials (username and password, typically using an interactive form). It is also used to migrate existing clients using direct authentication schemes such as HTTP Basic or Digest authentication to OAuth by converting the stored credentials to an access token.

Client Credentials (application access)

ietf

The client can request an access token using only its client credentials (or other supported means of authentication) when the client is requesting access to the protected resources under its control, or those of another resource owner that have been previously arranged with the authorization server (the method of which is beyond the scope of this specification). The client credentials grant type MUST only be used by confidential clients.

Tokens

Access Token

ietf

  • Access tokens are credentials used to access protected resources
  • Tokens represent specific scopes and durations of access, granted by the resource owner, and enforced by the resource server and authorization server.

Refresh Token

ietf

  • Refresh tokens are credentials used to obtain access tokens
  • used to obtain a new access token when the current access token becomes invalid or expires, or to obtain additional access tokens with identical or narrower scope
  • If the authorization server issues a refresh token, it is included when issuing an access token

other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment