Documentation ¶
Overview ¶
Package otp contains the implementation of the issuance of verification codes. Codes can be configured by creating an Request.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateAlphanumericCode ¶ added in v0.4.0
GenerateAlphanumericCode will generate an alpha numberic code. It uses the length to estimate how many bytes of randomness will base64 encode to that length string. For example 16 character string requires 12 bytes.
func GenerateCode ¶
GenerateCode creates a new OTP code.
Types ¶
type Request ¶
type Request struct { DB *database.Database RealmID uint ShortLength uint ShortExpiresAt time.Time LongLength uint LongExpiresAt time.Time TestType string SymptomDate *time.Time TestDate *time.Time MaxSymptomAge time.Duration UUID string // Issuing includes information about the issuer. IssuingUser *database.User IssuingApp *database.AuthorizedApp IssuingExternalID string }
Request represents the parameters of a verification code request.
Click to show internal directories.
Click to hide internal directories.