-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient_credentials_client.yml.tmp
38 lines (38 loc) · 1.53 KB
/
client_credentials_client.yml.tmp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# `oauth` sets the clients data.
# These clients send requests to the API in parallel.
oauth:
- name: client1
# `env` is a flag that whether `client_id` and `client_credential` use environment variables.
# When false, `client_id` and `client_secret` is raw value.
env: false
client_id: raw_id
client_secret: raw_secret
- name: client2
# When true, `client_id` and `client_secret` use environment variable.
# The following examples use the values of the CLIENT_ID and CLIENT_SECRET environment variables.
env: true
client_id: CLIENT_ID
client_secret: CLIENT_SECRET
# `token` sets the data when request token end point
token:
# `token_url` is a URL that can get access token.
token_url: http://localhost/oauth/token
scope: scope1 scope2
# `api` describes information at the time of request of API using client credential method
api:
# `api_name` is a label required to identify the API that each client in turn requests
- api_name: post api
# `method` is HTTP METHOD. now this allow `post` and `get`.
method: post
# `content_type` is HTTP CONTENT_TYPE.
content_type: application/json
# `variable` section is setting api endpoint data and body data.
# This section needs to be set for the name section set by `oauth`.
variable:
# this is same as an `oauth` `name`
- name: client1
url: http://localhost/path/to/api
body: "{\"test\":\"client1\"}"
- name: client2
url: http://localhost/path/to/api
body: "{\"test\":\"client2\"}"