Documentation ¶
Index ¶
Constants ¶
View Source
const PINDigits = 4
PINDigits is the number of digits in the PIN code.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PIN ¶
type PIN int
PIN describes a PIN code.
const InvalidPIN PIN = 0000
InvalidPIN is an invalid PIN to be used as a placeholder.
type PINStore ¶
type PINStore interface { io.Closer acmregister.ContainsContext // GeneratePIN generates a new PIN that's assigned to the given email. // // TODO: invalidate the old PIN if there's already an existing one. GeneratePIN(discord.GuildID, discord.UserID) (PIN, error) // ValidatePIN validates the email associated with the given PIN. PINStores // should use its underlying SubmissionStore for this. ValidatePIN(discord.GuildID, discord.UserID, PIN) (*acmregister.MemberMetadata, error) }
PINStore describes an interface that stores the state for verifying PINs over email.
type SMTPVerifier ¶
type SMTPVerifier struct {
// contains filtered or unexported fields
}
func NewSMTPVerifier ¶
func NewSMTPVerifier(info SMTPInfo, store PINStore) (*SMTPVerifier, error)
func (*SMTPVerifier) SendConfirmationEmail ¶
func (v *SMTPVerifier) SendConfirmationEmail(ctx context.Context, member acmregister.Member) error
SendConfirmationEmail sends a confirmation email to the recipient with the email address.
type ShibbolethVerifier ¶
type ShibbolethVerifier struct { // URL is a Shibboleth URL that redirects to the SSO portal. URL string }
ShibbolethVerifier implements VerifyEmail.
func (ShibbolethVerifier) VerifyEmail ¶
func (v ShibbolethVerifier) VerifyEmail(ctx context.Context, email acmregister.Email) error
VerifyEmail implements acmregister.EmailVerifier.
Click to show internal directories.
Click to hide internal directories.