-
Notifications
You must be signed in to change notification settings - Fork 0
Widget configuration
Thibaud B edited this page Mar 12, 2020
·
4 revisions
Conf needs to be like the following:
{
"whatever": "whatever",
"foo": "bar",
"data": {
"route": "/auth/{test}/{api-key}",
"method" : "post",
"token": "{string}",
"username": "{string}",
"password": "{int}"
}
}- "data" is always needed.
- "route" is always needed.
- "method" is always needed, possible values are get or post.
- {api-key} will always be replaced by the API with the API key corresponding to the provider of the widget.
- {test}, {string} and {int} is to replace when the conf is created.
- Everything contained in {}, apart {api-key} is to replace in the conf.
- If "method" or "route" are not present, the conf is not valid.
- The rest of the data section, apart "route" and "method" will be used as a form if post method is specified, else it will be ignored.
- "token" is optionnal. If specified it will pass the value of the field in the authorization header field.
A typical widget param will look like this :
{
"data": {
"route": "/auth/{test}/{api-key}",
"method" : "post",
"username": "{string}",
"password": "{int}"
}
}