-
Notifications
You must be signed in to change notification settings - Fork 425
Add basic structure for GDrive OAuth tool #269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
lusmoura
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
| """ | ||
|
|
||
| @classmethod | ||
| def is_available(cls) -> bool: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance we can check if the user is authenticated here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could but I think it is better to have the error in is_auth_required?
|
Should we add a |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #269 +/- ##
=======================================
Coverage ? 85.65%
=======================================
Files ? 153
Lines ? 5716
Branches ? 0
=======================================
Hits ? 4896
Misses ? 820
Partials ? 0 ☔ View full report in Codecov by Sentry. |
Agreed, won't do here but will follow up with it |
Add basic structure for GDrive OAuth tool
Doesn't include:
AI Description
Summary
This PR adds a new tool to the backend, Google Drive, and its associated authentication. It also updates the tool authentication system to include tool-based authentication.
Changes
tool_auth, to store access tokens for tools that require authentication.is_auth_required, to theManagedToolmodel to indicate whether a tool requires authentication.auth_url, to theManagedToolmodel to store the authentication URL for a tool.list_toolsfunction to include theis_auth_requiredandauth_urlfields for each tool.BaseAuth, for tool authentication.get_auth_url,is_auth_required, andprocess_auth_token, to theBaseAuthclass for tool authentication.GoogleDriveAuth, which inherits fromBaseAuthand implements authentication for the Google Drive tool.