Obtaining Access Token
To access a resource after discovering from the catalogue, a consumer should obtain Access Token using GSX Authorisation Servers Create Token APIs.
A consumer can use the clientID and clientSecret obtained through Registration
Note: There are two types of resources in GSX:
- Public or Open: Tokens for such resources can be generated by providing the resource_server ID as the item type.
- Restricted or Secure: These resources require some kind of policy for access.
Obtaining token for an OPEN resource
After discovering an Open resource from the Catalogue, a consumer can obtain a token using the Create Token APIs with the following request body. Ensure to use the appropriate resource server id as itemId to obtain a token.
{
"itemId": "geoserver.dx.gsx.org.in",
"itemType": "resource_server",
"role": "consumer"
}
Obtaining token for a SECURE resource
After discovering a Secure resource from the Catalogue, a consumer can obtain a token using the Create Token APIs with the following request body. Ensure to use the appropriate resource id as itemId to obtain a token.
{
"itemId": "6d9c471a-1613-4d13-b3e3-835dceccc2e3",
"itemType": "resource",
"role": "consumer"
}