[PR #408] [MERGED] feat(oauth): implement refresh credentials functionality #490

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/408
Author: @Yeuoly
Created: 7/21/2025
Status: Merged
Merged: 7/23/2025
Merged by: @Yeuoly

Base: mainHead: feat/oauth-refresh-token


📝 Commits (2)

  • c2e15b2 feat(oauth): implement refresh credentials functionality
  • ecc068c feat(oauth): add metadata field to OAuthGetCredentialsResult

📊 Changes

9 files changed (+80 additions, -1 deletions)

View changed files

📝 cmd/commandline/plugin/templates/python/tool_provider.py (+9 -1)
📝 internal/core/plugin_daemon/access_types/access.go (+2 -0)
📝 internal/core/plugin_daemon/oauth.gen.go (+13 -0)
📝 internal/server/controllers/definitions/definitions.go (+11 -0)
📝 internal/server/controllers/oauth.gen.go (+13 -0)
📝 internal/server/http_server.gen.go (+1 -0)
📝 internal/service/oauth.gen.go (+17 -0)
📝 pkg/entities/oauth_entities/oauth.go (+7 -0)
📝 pkg/entities/requests/oauth.go (+7 -0)

📄 Description

  • Added RefreshCredentials endpoint to handle OAuth credential refresh requests.
  • Introduced RequestOAuthRefreshCredentials structure for request validation.
  • Updated access types and actions to include refresh credentials.
  • Enhanced server routing and controller logic to support the new functionality.
  • Updated OAuth entities to include expiration handling for refreshed credentials.

Description

Please provide a brief description of the changes made in this pull request.
Please also include the issue number if this is related to an issue using the format Fixes #123 or Closes #123.

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

Bug Fix (if applicable)

  • I have used GitHub syntax to close the related issue (e.g., Fixes #123 or Closes #123)

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/408 **Author:** [@Yeuoly](https://github.com/Yeuoly) **Created:** 7/21/2025 **Status:** ✅ Merged **Merged:** 7/23/2025 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `main` ← **Head:** `feat/oauth-refresh-token` --- ### 📝 Commits (2) - [`c2e15b2`](https://github.com/langgenius/dify-plugin-daemon/commit/c2e15b29a27ce3574b7e9f9bcf933a712640c59f) feat(oauth): implement refresh credentials functionality - [`ecc068c`](https://github.com/langgenius/dify-plugin-daemon/commit/ecc068c32bedb37f77ac58120a5742f590b97a51) feat(oauth): add metadata field to OAuthGetCredentialsResult ### 📊 Changes **9 files changed** (+80 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `cmd/commandline/plugin/templates/python/tool_provider.py` (+9 -1) 📝 `internal/core/plugin_daemon/access_types/access.go` (+2 -0) 📝 `internal/core/plugin_daemon/oauth.gen.go` (+13 -0) 📝 `internal/server/controllers/definitions/definitions.go` (+11 -0) 📝 `internal/server/controllers/oauth.gen.go` (+13 -0) 📝 `internal/server/http_server.gen.go` (+1 -0) 📝 `internal/service/oauth.gen.go` (+17 -0) 📝 `pkg/entities/oauth_entities/oauth.go` (+7 -0) 📝 `pkg/entities/requests/oauth.go` (+7 -0) </details> ### 📄 Description - Added RefreshCredentials endpoint to handle OAuth credential refresh requests. - Introduced RequestOAuthRefreshCredentials structure for request validation. - Updated access types and actions to include refresh credentials. - Enhanced server routing and controller logic to support the new functionality. - Updated OAuth entities to include expiration handling for refreshed credentials. ## Description Please provide a brief description of the changes made in this pull request. Please also include the issue number if this is related to an issue using the format `Fixes #123` or `Closes #123`. ## Type of Change - [ ] Bug fix - [x] 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 ### Bug Fix (if applicable) - [ ] I have used GitHub syntax to close the related issue (e.g., `Fixes #123` or `Closes #123`) ## 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#490