Documentation
¶
Index ¶
- func ParseSameSite(s string) http.SameSite
- type EnableResponse
- type EnableResult
- type GenerateBackupCodesResponse
- type GetTOTPURIResponse
- type TOTPPluginConfig
- type TOTPRecord
- type TOTPRedirectResponse
- type TrustedDevice
- type VerifyBackupCodeRequest
- type VerifyBackupCodeResponse
- type VerifyResult
- type VerifyTOTPRequest
- type VerifyTOTPResponse
- type ViewBackupCodesResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseSameSite ¶
Types ¶
type EnableResponse ¶
type EnableResponse struct {
TotpURI string `json:"totp_uri"`
BackupCodes []string `json:"backup_codes"`
}
Response payloads
type EnableResult ¶
Internal result types
type GenerateBackupCodesResponse ¶
type GenerateBackupCodesResponse struct {
BackupCodes []string `json:"backup_codes"`
}
type GetTOTPURIResponse ¶
type GetTOTPURIResponse struct {
TotpURI string `json:"totp_uri"`
}
type TOTPPluginConfig ¶
type TOTPPluginConfig struct {
Enabled bool `json:"enabled" toml:"enabled"`
SkipVerificationOnEnable bool `json:"skip_verification_on_enable" toml:"skip_verification_on_enable"`
BackupCodeCount int `json:"backup_code_count" toml:"backup_code_count"`
TrustedDeviceDuration time.Duration `json:"trusted_device_duration" toml:"trusted_device_duration"`
TrustedDevicesAutoCleanup bool `json:"trusted_devices_auto_cleanup" toml:"trusted_devices_auto_cleanup"`
TrustedDevicesCleanupInterval time.Duration `json:"trusted_devices_cleanup_interval" toml:"trusted_devices_cleanup_interval"`
PendingTokenExpiry time.Duration `json:"pending_token_expiry" toml:"pending_token_expiry"`
SecureCookie bool `json:"secure_cookie" toml:"secure_cookie"`
SameSite string `json:"same_site" toml:"same_site"`
}
func (*TOTPPluginConfig) ApplyDefaults ¶
func (c *TOTPPluginConfig) ApplyDefaults()
type TOTPRecord ¶
type TOTPRecord struct {
bun.BaseModel `bun:"table:totp"`
ID string `bun:"column:id,pk"`
UserID string `bun:"column:user_id"`
Secret string `bun:"column:secret"`
BackupCodes string `bun:"column:backup_codes"`
Enabled bool `bun:"column:enabled"`
CreatedAt time.Time `bun:"column:created_at,default:current_timestamp"`
UpdatedAt time.Time `bun:"column:updated_at,default:current_timestamp"`
}
type TOTPRedirectResponse ¶
type TOTPRedirectResponse struct {
TOTPRedirect bool `json:"totp_redirect"`
}
type TrustedDevice ¶
type TrustedDevice struct {
bun.BaseModel `bun:"table:trusted_devices"`
ID string `bun:"column:id,pk"`
UserID string `bun:"column:user_id"`
Token string `bun:"column:token"`
UserAgent string `bun:"column:user_agent"`
ExpiresAt time.Time `bun:"column:expires_at"`
CreatedAt time.Time `bun:"column:created_at,default:current_timestamp"`
}
type VerifyBackupCodeRequest ¶
type VerifyResult ¶
type VerifyTOTPRequest ¶
type VerifyTOTPResponse ¶
type ViewBackupCodesResponse ¶
type ViewBackupCodesResponse struct {
RemainingCount int `json:"remaining_count"`
}
Click to show internal directories.
Click to hide internal directories.