The authentication process

The authentication process seen from a user's viewpoint

OAUTH 2.0 provides a method for clients to access a protected resource/eZ Publish content on behalf of an eZ Publish user. Before an end user can access a protected resource/eZ Publish content, he/she must first obtain authorization from the eZ Publish OAUTH 2.0 module, then exchange the access grant for an access token (representing the grant's scope, duration, and other attributes) and a refresh token that is used when the access token expires. The client accesses the protected resource the first time by presenting the access token to the resource server.

The use cases below have a starting-point with a user who is:

Getting authorization to your client application

The flow illustrated in the figure below includes what goes on when a user (a registered eZ Publish user) wishes to access your newly developed REST API application:

Refreshing the expired access token with a refresh token

The access token is for accessing the back-end, and the refresh token is for refreshing the access token when it is expired. You request a new access token with your refresh token. Then eZ Publish OAuth module will return a new access token, with a new refresh token. Follow the flow in the diagram below:

Authorization is ok and the user is ready to go

Follow the flow in the diagram below:

Note that all use cases above are either fully or partially automated, so in each case the whole process only takes a second or two.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.