Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved


Chapter 13 OAuth Server : Authorization API

Authorization API
The OAuth server provides the following API to authorize a request.
Name
/authorize
Description
Process an authorization request.
Authorization Request
Use the following parameters to send an authorization request. The parameters can be added to the query component of the authorization endpoint URI using the "application/x-www-form-urlencoded" format.
Authorization Request Example
The client directs the user-agent to make the following HTTP request using TLS:

 
GET /asg/oauth2/authorize?response_type=code&client_id=s6BhdRkqt3&state=xyz
&redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb HTTP/1.1
Host: server.example.com

 
Authorization Response
The authorization server processes the authorize request from client as follows:
Refers to the exact state parameter value as received from the client. This is required if the state parameter was present in the client authorization request.
Authorization Response Example
The authorization server redirects the user-agent by sending the following HTTP response:

 
HTTP/1.1 302 Found
Location: https://client.example.com/cb?code=SplxlOBeZQQYbYS6WxSbIA

 
Authorization Error
The authorization server returns an error response if the request processing fails. The processing of the request fails due to one of the following reasons:
For this case, the authorization server informs the resource owner of the error and does not automatically redirect the user-agent to the invalid redirection URI.
For this case, the authorization server informs the resource owner of the error and does not automatically redirect the user-agent to the invalid redirection URI.
The authorization server informs the client by adding the following parameters to the query component of the redirection URI using the application/x-www-form-urlencoded format.
Refer to Authorize Request Error Codes table for the error codes.
Refers to the exact state parameter value as received from the client. This is required if the state parameter was present in the client authorization request.
 
The authorization server encountered an unexpected condition that prevented it from fulfilling the request. This error code is needed because a 500 Internal Server Error HTTP status code cannot be returned to the client via an HTTP redirect.
Authorization Error Example
The authorization server redirects the user-agent by sending the following HTTP response:

 
HTTP/1.1 302 Found
Location: https://client.example.com/cb?error=access_denied

 

Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved