mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-06-20 19:06:12 +08:00
feat(pluginhost): implement host authentication callbacks and add tests
- Introduced `auth_callbacks` for handling host authentication list, get, runtime, and save operations. - Added extensive unit tests to validate functionality, including disk fallback and runtime-specific cases. - Created example implementation in Go to demonstrate host callback integrations.
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/router-for-me/CLIProxyAPI/v7/internal/config"
|
||||
"github.com/router-for-me/CLIProxyAPI/v7/internal/interfaces"
|
||||
"github.com/router-for-me/CLIProxyAPI/v7/sdk/api/handlers"
|
||||
coreauth "github.com/router-for-me/CLIProxyAPI/v7/sdk/cliproxy/auth"
|
||||
"github.com/router-for-me/CLIProxyAPI/v7/sdk/pluginabi"
|
||||
"github.com/router-for-me/CLIProxyAPI/v7/sdk/pluginapi"
|
||||
log "github.com/sirupsen/logrus"
|
||||
@@ -40,6 +41,7 @@ type Host struct {
|
||||
loaded map[string]*loadedPlugin
|
||||
fused map[string]string
|
||||
runtimeConfig *config.Config
|
||||
authManager *coreauth.Manager
|
||||
modelExecutor modelExecutor
|
||||
modelClientIDs map[string]struct{}
|
||||
executorModelClientIDs map[string]struct{}
|
||||
|
||||
Reference in New Issue
Block a user