Change log:
Date: | Author: | Version: | Changes: | Completed | Ext. | Int. | Is in Core | Jira Ref. |
---|---|---|---|---|---|---|---|---|
19 November 2018 | Emil Ion Ifrim | 1.0 | Doc. created | Yes |
| x | N/A |
|
The purpose of this section is to describe how to configure brand access.
Overview
This article applies to rator-rest-api-3.x and rator-rest-api-auth-1.x. With those versions, brand_key parameter is mandatory.
Token Endpoint (Authentication)
In order to obtain an access token, every request has to contain the brand_key parameter. This parameter is of type QUERY.
Example:curl -v -X POST -u myclientid:myclientsecret http:
//host:port/appcontext/oauth/token?username=#myusername&password=#mypassword&grant_type=password&brand_key={mybrandkey}
REST API Endpoint (Resources)
Every request for any resource has to contain the X-RATOR-brand-key parameter. This parameter is of type HEADER.
$ curl -X GET 'http://host:port/appcontext/api/billing-groups/201506171857210002/balance'
-H 'Accept-Language: it'
-H 'Authorization: Bearer 2acda61f-cf4f-42be-8561-563b5db7840f'
-H 'X-RATOR-brand-key: BRAND1'