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
|
|
}
|