Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker interface {
// RequiresEmail returns true if email-based authorization is required
// If false, authentication alone is sufficient (no whitelist configured)
RequiresEmail() bool
// IsAllowed checks if an email address is authorized
// If RequiresEmail() is false, this always returns true
IsAllowed(email string) bool
}
Checker is an interface for authorization checking
type EmailChecker ¶
type EmailChecker struct {
// contains filtered or unexported fields
}
EmailChecker checks authorization based on email whitelist
func NewEmailChecker ¶
func NewEmailChecker(cfg config.AccessControlConfig) *EmailChecker
NewEmailChecker creates a new EmailChecker from configuration
func (*EmailChecker) IsAllowed ¶
func (c *EmailChecker) IsAllowed(email string) bool
IsAllowed checks if an email address is authorized If no whitelist is configured, always returns true
func (*EmailChecker) RequiresEmail ¶
func (c *EmailChecker) RequiresEmail() bool
RequiresEmail returns true if email-based authorization is required Returns false if no whitelist is configured (authentication alone is sufficient)
Click to show internal directories.
Click to hide internal directories.