Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Speaking about the OAuth flow it is important to clearly define some of the common terms. The terms used throughout this document are defined below.

Terma.k.aDefinition

Example

Resource The protected data or service.Mary's Facebook Account.

Resource Owner

UserThe entity that grants permission to use a Resource.  Often also the user of the application.Mary

Resource Server

API ServerThe server that hosts the Resource.Facebook's Data Server

Client

ApplicationThe application that wants to use the Resource.GreetingCardMaker
Authorization ServerToken Manager

The server responsible for authenticating the Resource Owner and determining their concent.

The Resource Server trusts the Authorization Server and they are almost always run by the same organization.

Often the Resource Server and Authorization Server are the same thing.

Facebook's OAuth Server
Client ID & SecretApp Username/Password

The credentials that a Client application uses to authenticate with the Authorization Server.

These are usually generated when the Client is registered with the Authorization Server.

 

Username & Password The credentials that the Resource Owner uses to authenticate with the Authorization Server.

Mary's Facebook

username and password.

OAuth TokenBearer Token

A short lived token that is issued to the Client by the Authorization Server after authenticating and getting permission from the Resource Owner.

A short random string.
Authorization GrantGrant Code

A representation of the Resource Owner's consent for the Resource to be released to a Client.

The Authorization Grant is provided by the Client to the Authorization Server (along with the Client ID & Secret) in exchange for an OAuth Token.

Each Authorization Grant is limited to a specific Client, Resource Owner and Scope.

A short random string.
Scope A subset of the Resource.

Facebook Photo's,

Contacts, Status etc.

Authorization Code - Trusted Application

...

  1. The Client ID & Secret are compiled into the application. 
  2. Users of the application are sent to the Authorization Server to provide their consent.  The Client ID and requested Scope are encoded in the url.
  3. The Authorization Server returns a Authorization Grant to the Client.
  4. The Client gives they the Authorization Grant and Client ID & Secret to the Authorization Server.
  5. The Authorization Server returns a OAuth Token.
  6. The Client invokes api on the Resource Server, passing along the OAuth Token.

...