ToolJet/plugins/packages/restapi/lib/manifest.json
Muhsin Shah C P 638fcf7223
[Feature] Now multiple users can login through RestAPI-Oauth 🚀 (#4052)
* Implemented multiple access token feature
- working on refresh token case

* worked on refresh token flow

* added multiple token ability to openapi plugin too
- fixed some bugs

* changed tokenData to token_data
- fixed some issues

* added user type with user id

* changed user type

* Rewrote some function
- added switch for enabling and disable multi auth
- fixed some bugs
- refactored the code

* fixed view app issue

* Fixed public app issue

* cleaning some code

* (public_app) add a check to avoid oauth login redirect when there is no access token

* reverted all changes of openapi (temporary)
- will add multi token functionality once done with restapi

* fixed a bug

* fixed a bug

* refactored some code

* changed the switch text

* pr changes

* changed token_data back to tokenData

* cleaning code

* removed token data from datasources query

* removed some lines

* added a comment
2022-09-19 20:27:37 +05:30

144 lines
2.8 KiB
JSON

{
"$schema": "https://raw.githubusercontent.com/ToolJet/ToolJet/develop/plugins/schemas/manifest.schema.json",
"title": "Restapi datasource",
"description": "A schema defining restapi datasource",
"type": "api",
"source": {
"name": "Rest API",
"kind": "restapi",
"options": {
"url": {
"type": "string"
},
"auth_type": {
"type": "string"
},
"grant_type": {
"type": "string"
},
"add_token_to": {
"type": "string"
},
"header_prefix": {
"type": "string"
},
"access_token_url": {
"type": "string"
},
"client_id": {
"type": "string"
},
"client_secret": {
"type": "string",
"encrypted": true
},
"password": {
"encrypted": true
},
"bearer_token": {
"encrypted": true
},
"scopes": {
"type": "string"
},
"auth_url": {
"type": "string"
},
"client_auth": {
"type": "string"
},
"headers": {
"type": "array"
},
"custom_auth_params": {
"type": "array"
}
},
"exposedVariables": {
"isLoading": false,
"data": {},
"rawData": {}
},
"customTesting": true
},
"defaults": {
"url": {
"value": ""
},
"auth_type": {
"value": "none"
},
"grant_type": {
"value": "authorization_code"
},
"add_token_to": {
"value": "header"
},
"header_prefix": {
"value": "Bearer "
},
"access_token_url": {
"value": ""
},
"client_id": {
"value": ""
},
"client_secret": {
"value": ""
},
"scopes": {
"value": "read, write"
},
"username": {
"value": ""
},
"password": {
"value": ""
},
"bearer_token": {
"value": ""
},
"auth_url": {
"value": ""
},
"client_auth": {
"value": "header"
},
"headers": {
"value": [["", ""]]
},
"custom_query_params": {
"value": [["", ""]]
},
"custom_auth_params": {
"value": [["", ""]]
},
"access_token_custom_headers": {
"value": [["", ""]]
},
"multiple_auth_enabled": {
"value": false
}
},
"properties": {
"url": {
"label": "Base URL",
"key": "url",
"type": "text",
"description": "https://api.example.com/v1/"
},
"headers": {
"label": "Headers",
"key": "headers",
"type": "react-component-headers",
"description": "key-value pair headers for rest api"
},
"auth_type": {
"label": "Authentication Type",
"key": "auth_type",
"type": "react-component-oauth-authentication",
"description": "key-value pair headers for rest api"
}
},
"required": ["url"]
}