feat: support personal tokens (#116)
Description
Support personal tokens:
- add the Platform API client to ensure that personal token has proper permissions.
- update configuration and add flag to enable personal tokens
- update the authorization middleware
Related issue
#116
Examples
...
# Postgres.ai Platform integration.
platform:
# API URL.
url: "https://postgres.ai/api/general"
# Token for authorization in Platform API. This token can be obtained in Postgres.ai Console.
accessToken: "platform_access_token"
# Enable authorization with personal tokens of the organization's members.
enablePersonalTokens: false
...
Checklist
-
the MR description has been reviewed -
this MR contains text changes and they have been reviewed OR there are no texts changes -
this MR contains GUI/CLI changes and they have been reviewed OR there are no GUI/CLI changes -
this MR contains API changes, specifications reflect those changes and they have been reviewed OR there are no API changes
Closes #116
Edited by Artyom Kartasov