mirror of
https://github.com/router-for-me/CLIProxyAPIPlus.git
synced 2026-05-13 21:22:14 +00:00
- Deleted `iflow` provider implementation, including thinking configuration (`apply.go`) and authentication modules. - Removed iFlow-specific tests, executors, and helpers across SDK and internal components. - Updated all references to exclude iFlow functionality.
30 lines
949 B
Go
30 lines
949 B
Go
package auth
|
|
|
|
import (
|
|
"time"
|
|
|
|
cliproxyauth "github.com/router-for-me/CLIProxyAPI/v6/sdk/cliproxy/auth"
|
|
)
|
|
|
|
func init() {
|
|
registerRefreshLead("codex", func() Authenticator { return NewCodexAuthenticator() })
|
|
registerRefreshLead("claude", func() Authenticator { return NewClaudeAuthenticator() })
|
|
registerRefreshLead("gemini", func() Authenticator { return NewGeminiAuthenticator() })
|
|
registerRefreshLead("gemini-cli", func() Authenticator { return NewGeminiAuthenticator() })
|
|
registerRefreshLead("antigravity", func() Authenticator { return NewAntigravityAuthenticator() })
|
|
registerRefreshLead("kimi", func() Authenticator { return NewKimiAuthenticator() })
|
|
}
|
|
|
|
func registerRefreshLead(provider string, factory func() Authenticator) {
|
|
cliproxyauth.RegisterRefreshLeadProvider(provider, func() *time.Duration {
|
|
if factory == nil {
|
|
return nil
|
|
}
|
|
auth := factory()
|
|
if auth == nil {
|
|
return nil
|
|
}
|
|
return auth.RefreshLead()
|
|
})
|
|
}
|