[PR #407] [MERGED] feat/tool oauth cli template #491

Closed
opened 2026-02-16 01:16:08 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-daemon/pull/407
Author: @Mairuis
Created: 7/18/2025
Status: Merged
Merged: 7/21/2025
Merged by: @Yeuoly

Base: mainHead: feat/tool-oauth-cli


📝 Commits (2)

  • 379568e feat(cli): update OAuth handling and requirements for dify_plugin
  • 268673c feat(oauth): update OAuth support and adjust dify_plugin version constraints

📊 Changes

2 files changed (+74 additions, -0 deletions)

View changed files

📝 cmd/commandline/plugin/templates/python/tool_provider.py (+31 -0)
📝 cmd/commandline/plugin/templates/python/tool_provider.yaml (+43 -0)

📄 Description

Description

This pull request introduces changes to enhance OAuth support in the Python tool provider template. It includes updates to the Python implementation and the YAML configuration to provide a foundation for OAuth integration, though the relevant code is currently commented out for optional use.

OAuth-related changes:

  • Python Implementation (tool_provider.py):

    • Added placeholder methods _oauth_get_authorization_url and _oauth_get_credentials to support OAuth functionality, with instructions for implementation. These methods are commented out by default.
    • Imported the Request interface from dify_plugin.interfaces.tool to support OAuth request handling.
  • YAML Configuration (tool_provider.yaml):

    • Added a commented-out oauth_schema section, which defines the client and credential schemas for OAuth integration, including fields for client_id, client_secret, and access_token, with multi-language support for placeholders, help texts, and labels.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Performance improvement
  • Other

Essential Checklist

Testing

  • I have tested the changes locally and confirmed they work as expected
  • I have added unit tests where necessary and they pass successfully

Additional Information

Please provide any additional context that would help reviewers understand the changes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugin-daemon/pull/407 **Author:** [@Mairuis](https://github.com/Mairuis) **Created:** 7/18/2025 **Status:** ✅ Merged **Merged:** 7/21/2025 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `main` ← **Head:** `feat/tool-oauth-cli` --- ### 📝 Commits (2) - [`379568e`](https://github.com/langgenius/dify-plugin-daemon/commit/379568e0d15ebb0dd220fdc26ebf3eb6cfbdbe2b) feat(cli): update OAuth handling and requirements for dify_plugin - [`268673c`](https://github.com/langgenius/dify-plugin-daemon/commit/268673c60a249bbc5489376f6f61c94ea6ee3c3c) feat(oauth): update OAuth support and adjust dify_plugin version constraints ### 📊 Changes **2 files changed** (+74 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `cmd/commandline/plugin/templates/python/tool_provider.py` (+31 -0) 📝 `cmd/commandline/plugin/templates/python/tool_provider.yaml` (+43 -0) </details> ### 📄 Description ## Description This pull request introduces changes to enhance OAuth support in the Python tool provider template. It includes updates to the Python implementation and the YAML configuration to provide a foundation for OAuth integration, though the relevant code is currently commented out for optional use. ### OAuth-related changes: * **Python Implementation (`tool_provider.py`)**: - Added placeholder methods `_oauth_get_authorization_url` and `_oauth_get_credentials` to support OAuth functionality, with instructions for implementation. These methods are commented out by default. - Imported the `Request` interface from `dify_plugin.interfaces.tool` to support OAuth request handling. * **YAML Configuration (`tool_provider.yaml`)**: - Added a commented-out `oauth_schema` section, which defines the client and credential schemas for OAuth integration, including fields for `client_id`, `client_secret`, and `access_token`, with multi-language support for placeholders, help texts, and labels. ## Type of Change - [ ] Bug fix - [ ] New feature - [ ] Refactor - [ ] Performance improvement - [x] Other ## Essential Checklist ### Testing - [ ] I have tested the changes locally and confirmed they work as expected - [ ] I have added unit tests where necessary and they pass successfully ## Additional Information Please provide any additional context that would help reviewers understand the changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 01:16:08 -05:00
yindo closed this issue 2026-02-16 01:16:08 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#491