mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-06-24 00:47:04 +08:00
- 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.
20 lines
586 B
Markdown
20 lines
586 B
Markdown
# Frontend Auth Exclusive Plugin Example
|
|
|
|
This example registers a frontend auth provider with `frontend_auth_provider_exclusive: true`.
|
|
|
|
When enabled and selected, this provider becomes the only request authentication provider. Built-in config API keys and other frontend auth providers do not authenticate requests while this provider is active.
|
|
|
|
The example accepts requests that include:
|
|
|
|
```http
|
|
X-Example-Frontend-Auth: exclusive
|
|
```
|
|
|
|
Build:
|
|
|
|
```bash
|
|
cd examples/plugin/frontend-auth-exclusive/go
|
|
go build -buildmode=c-shared -o /tmp/cliproxy-frontend-auth-exclusive.dylib .
|
|
```
|
|
|