Initial commit: GovAI 政务AI平台
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user