Download sdk/auth/refresh_registry.go from shimen/ShinAPI: direct link, hf CLI and curl.
- Browser
- Download file 1.04 kB
-
https://huggingface.co/spaces/shimen/ShinAPI/resolve/main/sdk/auth/refresh_registry.go
- Command line
-
hf download hf://spaces/shimen/ShinAPI/sdk/auth/refresh_registry.go
-
curl -L -o refresh_registry.go https://huggingface.co/spaces/shimen/ShinAPI/resolve/main/sdk/auth/refresh_registry.go
1.04 kB
| 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("qwen", func() Authenticator { return NewQwenAuthenticator() }) | |
| registerRefreshLead("iflow", func() Authenticator { return NewIFlowAuthenticator() }) | |
| registerRefreshLead("gemini", func() Authenticator { return NewGeminiAuthenticator() }) | |
| registerRefreshLead("gemini-cli", func() Authenticator { return NewGeminiAuthenticator() }) | |
| registerRefreshLead("antigravity", func() Authenticator { return NewAntigravityAuthenticator() }) | |
| } | |
| 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() | |
| }) | |
| } | |