account

package
v1.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2026 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleAddPasskeyBegin

func HandleAddPasskeyBegin(w http.ResponseWriter, r *http.Request)

func HandleAddPasskeyFinish

func HandleAddPasskeyFinish(w http.ResponseWriter, r *http.Request)

func HandleDeleteMfa

func HandleDeleteMfa(w http.ResponseWriter, r *http.Request)

func HandleDeletePasskey

func HandleDeletePasskey(w http.ResponseWriter, r *http.Request)

func HandleDisconnectProvider

func HandleDisconnectProvider(w http.ResponseWriter, r *http.Request)

func HandleGetMfaStatus

func HandleGetMfaStatus(w http.ResponseWriter, r *http.Request)

func HandleGetProfile

func HandleGetProfile(w http.ResponseWriter, r *http.Request)

func HandleGetSettings

func HandleGetSettings(w http.ResponseWriter, r *http.Request)

func HandleListConnectedProviders

func HandleListConnectedProviders(w http.ResponseWriter, r *http.Request)

func HandleListPasskeys

func HandleListPasskeys(w http.ResponseWriter, r *http.Request)

func HandleListSessions

func HandleListSessions(w http.ResponseWriter, r *http.Request)

func HandleListTrustedDevices

func HandleListTrustedDevices(w http.ResponseWriter, r *http.Request)

func HandleRenamePasskey

func HandleRenamePasskey(w http.ResponseWriter, r *http.Request)

func HandleRevokeSession

func HandleRevokeSession(w http.ResponseWriter, r *http.Request)

func HandleRevokeTrustedDevice

func HandleRevokeTrustedDevice(w http.ResponseWriter, r *http.Request)

func HandleSetupTotp

func HandleSetupTotp(w http.ResponseWriter, r *http.Request)

func HandleUpdatePassword

func HandleUpdatePassword(w http.ResponseWriter, r *http.Request)

func HandleUpdateProfile

func HandleUpdateProfile(w http.ResponseWriter, r *http.Request)

func HandleVerifyTotp

func HandleVerifyTotp(w http.ResponseWriter, r *http.Request)

func Handler

func Handler() http.Handler

Handler returns an http.Handler that serves the account SPA. Static files are served directly; all other paths fall back to index.html so that client-side routing works.

Types

type ConnectedProviderResponse

type ConnectedProviderResponse struct {
	ID           string    `json:"id"`
	ProviderID   string    `json:"provider_id"`
	ProviderName string    `json:"provider_name"`
	Email        string    `json:"email,omitempty"`
	CreatedAt    time.Time `json:"created_at"`
}

type DisableMfaRequest

type DisableMfaRequest struct {
	CurrentPassword string `json:"current_password"`
}

type MfaStatusResponse

type MfaStatusResponse struct {
	TotpEnabled bool `json:"totp_enabled"`
}

type PasskeyRenameRequest

type PasskeyRenameRequest struct {
	Name string `json:"name"`
}

type PasskeyResponse

type PasskeyResponse struct {
	ID         string     `json:"id"`
	Name       string     `json:"name"`
	CreatedAt  time.Time  `json:"created_at"`
	LastUsedAt *time.Time `json:"last_used_at,omitempty"`
}

type SessionResponse

type SessionResponse struct {
	ID             string     `json:"id"`
	UserAgent      string     `json:"user_agent"`
	IPAddress      string     `json:"ip_address"`
	LastActivityAt *time.Time `json:"last_activity_at"`
	CreatedAt      time.Time  `json:"created_at"`
	IsCurrent      bool       `json:"is_current"`
}

type TotpSetupResponse

type TotpSetupResponse struct {
	Secret     string `json:"secret"`
	QrCodeData string `json:"qr_code_data"`
}

type TotpVerifyRequest

type TotpVerifyRequest struct {
	Code string `json:"code"`
}

type TrustedDeviceResponse

type TrustedDeviceResponse struct {
	ID         string    `json:"id"`
	DeviceName string    `json:"device_name"`
	CreatedAt  time.Time `json:"created_at"`
	LastUsedAt time.Time `json:"last_used_at"`
	ExpiresAt  time.Time `json:"expires_at"`
}

type UpdatePasswordRequest

type UpdatePasswordRequest struct {
	CurrentPassword string `json:"current_password"`
	NewPassword     string `json:"new_password"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL