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


Chapter 13 OAuth Server : Token Validation API

Token Validation API
To validate an access token issued by the authorization server of TIBCO API Exchange Gateway, use the following API:
Name
/access_token
Description
Validates the access token and returns the token information.
Token Validation Request
To send a validate access token request, use the following parameters to the query component of the authorization endpoint URI using the "application/x-www-form-urlencoded" format in the HTTP GET request:
Token Validation Request Example
To validate an access token issued by the authorization server, send an HTTP GET request using TLS with the following parameter:
Send the following HTTP request using TLS:

 
GET /asg/oauth2/access_token/2YotnFZFEjr1zCsicMWpAA HTTP/1.1
Host: server.example.com

 
Token Validation Response
If the access token request is valid and authorized, the resource server returns the data associated with the access token, which can be used to query the resources.
Token Validation Response Example
The successful response is as follows:

 
 
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: no-store
Pragma: no-cache
{
"access_token":"2YotnFZFEjr1zCsicMWpAA",
"expires_in":3600,
"resource_uri":"https://fairlawn.bookclub.org/member/friend",
"scope":"friends"
}

 
 
Token Validation Error
The authorization server responds with an HTTP 400 (Bad Request) status code (unless specified otherwise) and includes the following parameters with the response:
 
 
Values for the invalid_grant, error_description, and error_uri, parameters must not include characters outside the set %x20-21 / %x23-5B / %x5D-7E.
Token Validation Error Example
The error response is a HTTP response using the "application/json" media type as follows:

 
HTTP/1.1 400 Bad Request
    Content-Type: application/json;charset=UTF-8
    Cache-Control: no-store
    Pragma: no-cache
{
        "error":"invalid_grant"
}

 
 
 

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