...
Property Name | Description |
---|---|
clientId | The Client ID provided by the service when you register your application. |
clientSecret | The Client Secret provided by the service when you register your application. |
refreshToken | The Refresh Token obtained from the service while using the Authorization Grant. |
tokenUrl | The token endpoint URL given by the service to obtain the access tokens. |
...
An example is shown below.
Code Block |
---|
<endpoint name="FoodEP" xmlns="http://ws.apache.org/ns/synapse">
<http method="get" uri-template="http://localhost:9192/service/foodservice">
<authentication>
<oauth>
<authorizationCode>
<clientId>K2RbnGP7VS</clientId>
<clientSecret>9zLrZAYR5b</clientSecret>
<refreshToken>y2Ne4Fccrj</refreshToken>
<tokenUrl>http://localhost:8678/token</tokenUrl>
</authorizationCode>
</oauth>
</authentication>
</http>
</endpoint> |
Client credentials grant type
The clientCredentials
element contains the following parameters that are used to configure OAuth for the endpoint. All of the following attributes are required.
Property Name | Description |
---|---|
clientId | The Client ID provided by the service when you register your application. |
clientSecret | The Client Secret provided by the service when you register your application. |
tokenUrl | The token endpoint URL given by the service to obtain the access tokens. |
An example is shown below.
Code Block |
---|
<endpoint name="FoodEP" xmlns="http://ws.apache.org/ns/synapse">
<http method="get" uri-template="http://localhost:9192/service/foodservice">
<authentication>
<oauth>
<clientCredentials>
<clientId>K2RbnGP7VS</clientId>
<clientSecret>9zLrZAYR5b</clientSecret>
<tokenUrl>http://localhost:8678/token</tokenUrl>
</clientCredentials>
</oauth>
</authentication>
</http>
</endpoint> |
Password grant type
The passwordCredentials
element contains the following parameters that are used to configure OAuth for the endpoint. All of the following attributes are required.