mirror of
https://github.com/zgs225/cliproxy-plugin-commandcode.git
synced 2026-09-26 11:42:48 +08:00
fix: remove auth_provider capability to clean up OAuth page, bump v0.2.1
- Remove AuthProvider capability declaration; keep only management_api - Drop auth.login.start/poll and auth.identifier handlers - Remove unused auth.parse and file-parsing structs - Update QuotaCard version tag to v0.2.1 - Sync User-Agent to use PluginVersion
This commit is contained in:
+2
-53
@@ -55,59 +55,8 @@ type ConfigField struct {
|
||||
|
||||
// RegistrationCapability declares the capabilities implemented by this plugin.
|
||||
type RegistrationCapability struct {
|
||||
AuthProvider bool `json:"auth_provider"`
|
||||
ManagementAPI bool `json:"management_api"`
|
||||
}
|
||||
|
||||
// IdentifierResponse is returned by auth.identifier.
|
||||
type IdentifierResponse struct {
|
||||
Identifier string `json:"identifier"`
|
||||
}
|
||||
|
||||
// AuthData describes a credential record.
|
||||
type AuthData struct {
|
||||
Provider string `json:"Provider"`
|
||||
ID string `json:"ID"`
|
||||
FileName string `json:"FileName"`
|
||||
Label string `json:"Label"`
|
||||
Prefix string `json:"Prefix,omitempty"`
|
||||
ProxyURL string `json:"ProxyURL,omitempty"`
|
||||
Disabled bool `json:"Disabled,omitempty"`
|
||||
StorageJSON []byte `json:"StorageJSON"`
|
||||
Metadata map[string]any `json:"Metadata,omitempty"`
|
||||
Attributes map[string]string `json:"Attributes,omitempty"`
|
||||
NextRefreshAfter time.Time `json:"NextRefreshAfter,omitempty"`
|
||||
}
|
||||
|
||||
// AuthParseRequest is passed to auth.parse.
|
||||
type AuthParseRequest struct {
|
||||
Provider string `json:"Provider"`
|
||||
Path string `json:"Path"`
|
||||
FileName string `json:"FileName"`
|
||||
RawJSON []byte `json:"RawJSON"`
|
||||
Host map[string]any `json:"Host,omitempty"`
|
||||
}
|
||||
|
||||
// AuthParseResponse is returned by auth.parse.
|
||||
type AuthParseResponse struct {
|
||||
Handled bool `json:"Handled"`
|
||||
Auth AuthData `json:"Auth"`
|
||||
Auths []AuthData `json:"Auths,omitempty"`
|
||||
}
|
||||
|
||||
// AuthRefreshRequest is passed to auth.refresh.
|
||||
type AuthRefreshRequest struct {
|
||||
AuthID string `json:"AuthID"`
|
||||
AuthProvider string `json:"AuthProvider"`
|
||||
StorageJSON []byte `json:"StorageJSON"`
|
||||
Metadata map[string]any `json:"Metadata,omitempty"`
|
||||
Attributes map[string]string `json:"Attributes,omitempty"`
|
||||
}
|
||||
|
||||
// AuthRefreshResponse is returned by auth.refresh.
|
||||
type AuthRefreshResponse struct {
|
||||
Auth AuthData `json:"Auth"`
|
||||
NextRefreshAfter time.Time `json:"NextRefreshAfter,omitempty"`
|
||||
AuthProvider bool `json:"auth_provider,omitempty"`
|
||||
ManagementAPI bool `json:"management_api,omitempty"`
|
||||
}
|
||||
|
||||
// ManagementRegistrationResponse is returned by management.register.
|
||||
|
||||
Reference in New Issue
Block a user