-
Notifications
You must be signed in to change notification settings - Fork 363
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
Add basic structure for GDrive OAuth tool #269
Conversation
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 theManagedTool
model to indicate whether a tool requires authentication.auth_url
, to theManagedTool
model to store the authentication URL for a tool.list_tools
function to include theis_auth_required
andauth_url
fields for each tool.BaseAuth
, for tool authentication.get_auth_url
,is_auth_required
, andprocess_auth_token
, to theBaseAuth
class for tool authentication.GoogleDriveAuth
, which inherits fromBaseAuth
and implements authentication for the Google Drive tool.