Initial commit: GovAI 政务AI平台

This commit is contained in:
freedakgmail
2026-06-15 23:48:37 +08:00
commit 0f490f72a9
245 changed files with 51669 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
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
}