Nutrition OAuth 2.0 Provider is authorization provider for Nutrition Mulesoft APIs. It is dedicated for Machine To Machine (M2M) integrations. To do that need to send a proper request according to below specification: Method: POST Endpoint: http://digital-security-authservice-regression.frankfurt.rbdigitalcloud.com/oauth/authorize URI Params: where: green is 3-party client_Id orange is the state, in the form: Client_Id + "_"+ randomly generated, min lenght: 10, max length=15 (above example has Client_Id= rbclientid and randomly generated part = rtsdek1i51xcv5058935) Headers: In the success scenario the REST request returns 302 status and the "Location" header as follows: Location: http://www.rb.com/?code=d1c82ed4-da4a-4675-81e7-5f9b0e295568&state=vx-web-test1515058935The access code should be extracted from the "code" request parameter: d1c82ed4-da4a-4675-81e7-5f9b0e295568 To do that need to send a proper request according to below specification: Method: POST Endpoint: http://digital-security-authservice-regression.frankfurt.rbdigitalcloud.com/oauth/token URI params: where: green is 3-party client_Id blue is code from the first request orange is the state - the same as in the first request red is the client_secret - generated as a required precondition Headers: In the success scenario the request returns 200 status with the following JSON structure in the response body: After that need to extract "access_token" from the above JSON in order to get the access token: cacd5cda-08f8-47fa-8431-82d7a82184a6 REMARKS:Overview
This page describes a fast example of security integration in a 3rd-party service.
The example is based on the current state of the regression environment.Required precondition:
Proper authorization:
The steps are:Get access code
REMARKS:
"curl" - a command line tool which does not follow redirects by default, but please use "-v" key in order to see the detailed HTTP response in the terminal window.Get access token
{"access_token":"cacd5cda-08f8-47fa-8431-82d7a82184a6","token_type":"bearer","refresh_token":"92c437ba-e6ac-4ae2-84ce-ec7338b506b6","expires_in":60}
General
Content
Integrations
Add Comment