mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-09-03 06:35:00 +08:00
feat(access, pluginhost): add support for exclusive frontend auth providers
- Introduced `FrontendAuthProviderExclusive` capability to restrict authentication to a single selected provider. - Added `SetExclusiveProvider` and `ClearExclusiveProvider` methods for managing exclusive providers in the access registry. - Updated `pluginhost` to prioritize and enforce exclusive providers based on plugin priority and ID. - Enhanced RPC capabilities schema to include `FrontendAuthProviderExclusive` field. - Added example plugin and tests for exclusive frontend auth behavior.
This commit is contained in:
@@ -74,6 +74,8 @@ type Capabilities struct {
|
||||
AuthProvider AuthProvider
|
||||
// FrontendAuthProvider authenticates frontend requests before proxy handling.
|
||||
FrontendAuthProvider FrontendAuthProvider
|
||||
// FrontendAuthProviderExclusive makes this frontend auth provider the only active request auth provider when selected.
|
||||
FrontendAuthProviderExclusive bool
|
||||
// Executor sends requests to an upstream provider or local backend.
|
||||
Executor ProviderExecutor
|
||||
// ExecutorModelScope declares whether Executor serves static models, OAuth auth models, or both.
|
||||
|
||||
Reference in New Issue
Block a user