f7a720204a
- 移除 GovAI, nomifun-tauri, 算力盒子 的 submodule 引用 - 添加所有子项目的完整源代码 - 保留原始 .git 为 .git.bak 备份
22 lines
571 B
Go
22 lines
571 B
Go
package auth
|
|
|
|
import "context"
|
|
|
|
// SSOProvider defines the interface for SSO authentication providers.
|
|
// Implementations will be added for LDAP, OAuth2, and SAML.
|
|
type SSOProvider interface {
|
|
// Authenticate validates credentials and returns user information.
|
|
Authenticate(ctx context.Context, credentials map[string]string) (*SSOUser, error)
|
|
// Name returns the provider name (e.g., "ldap", "oauth2", "saml").
|
|
Name() string
|
|
}
|
|
|
|
type SSOUser struct {
|
|
ExternalID string
|
|
Name string
|
|
Email string
|
|
Phone string
|
|
Department string
|
|
AvatarURL string
|
|
}
|