userapi

package
v1.0.63 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(group *gin.RouterGroup, handler *Handler)

Register wires user API routes.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(repo *cluster.Repository, runtime *home.Runtime) *Handler

NewHandler creates a user API handler.

func (*Handler) BeginPasskeyLogin

func (h *Handler) BeginPasskeyLogin(c *gin.Context)

BeginPasskeyLogin returns WebAuthn assertion options for passkey login.

func (*Handler) BeginPasskeyRegistration

func (h *Handler) BeginPasskeyRegistration(c *gin.Context)

BeginPasskeyRegistration returns WebAuthn creation options for the authenticated user.

func (*Handler) BindTOTP

func (h *Handler) BindTOTP(c *gin.Context)

BindTOTP verifies and stores a TOTP secret for the authenticated user.

func (*Handler) ChangePassword

func (h *Handler) ChangePassword(c *gin.Context)

ChangePassword updates the authenticated user's password.

func (*Handler) ClearEmail added in v1.0.63

func (h *Handler) ClearEmail(c *gin.Context)

ClearEmail removes the authenticated user's email and invalidates email-bound security state.

func (*Handler) CreateAPIKey

func (h *Handler) CreateAPIKey(c *gin.Context)

CreateAPIKey creates an API key owned by the authenticated user.

func (*Handler) CreatePasskey

func (h *Handler) CreatePasskey(c *gin.Context)

CreatePasskey creates a passkey entry for the authenticated user.

func (*Handler) CurrentUser

func (h *Handler) CurrentUser(c *gin.Context)

CurrentUser returns the authenticated user profile.

func (*Handler) CurrentUserBillingOverview

func (h *Handler) CurrentUserBillingOverview(c *gin.Context)

CurrentUserBillingOverview returns the billing overview for the authenticated user.

func (*Handler) DeleteAPIKey

func (h *Handler) DeleteAPIKey(c *gin.Context)

DeleteAPIKey deletes an API key owned by the authenticated user.

func (*Handler) DeletePasskey

func (h *Handler) DeletePasskey(c *gin.Context)

DeletePasskey deletes a passkey entry for the authenticated user.

func (*Handler) DeleteTOTP

func (h *Handler) DeleteTOTP(c *gin.Context)

DeleteTOTP removes the authenticated user's TOTP configuration.

func (*Handler) ForgotPassword added in v1.0.63

func (h *Handler) ForgotPassword(c *gin.Context)

ForgotPassword accepts recovery requests without revealing account state.

func (*Handler) GetCapabilities added in v1.0.63

func (h *Handler) GetCapabilities(c *gin.Context)

GetCapabilities reports optional User API features without exposing mail configuration.

func (*Handler) ListAPIKeys

func (h *Handler) ListAPIKeys(c *gin.Context)

ListAPIKeys lists API keys owned by the authenticated user.

func (*Handler) ListCurrentUserBillingCharges

func (h *Handler) ListCurrentUserBillingCharges(c *gin.Context)

ListCurrentUserBillingCharges returns billing charges for the authenticated user.

func (*Handler) Login

func (h *Handler) Login(c *gin.Context)

Login handles password login without TOTP verification.

func (*Handler) LoginPasskey

func (h *Handler) LoginPasskey(c *gin.Context)

LoginPasskey handles passkey login.

func (*Handler) LoginTOTP

func (h *Handler) LoginTOTP(c *gin.Context)

LoginTOTP handles password login with TOTP verification.

func (*Handler) RegisterUser

func (h *Handler) RegisterUser(c *gin.Context)

RegisterUser creates a user account.

func (*Handler) RequestEmailVerification added in v1.0.63

func (h *Handler) RequestEmailVerification(c *gin.Context)

RequestEmailVerification queues a verification message for the current unverified email.

func (*Handler) ResetPassword added in v1.0.63

func (h *Handler) ResetPassword(c *gin.Context)

ResetPassword consumes a reset token and sets a new password without bypassing MFA or Passkeys.

func (*Handler) ShowTOTP

func (h *Handler) ShowTOTP(c *gin.Context)

ShowTOTP returns a TOTP setup secret and otpauth URL.

func (*Handler) UpdateAPIKey

func (h *Handler) UpdateAPIKey(c *gin.Context)

UpdateAPIKey updates an API key owned by the authenticated user.

func (*Handler) UpdateEmail added in v1.0.63

func (h *Handler) UpdateEmail(c *gin.Context)

UpdateEmail adds or replaces the authenticated user's optional email.

func (*Handler) VerifyEmail added in v1.0.63

func (h *Handler) VerifyEmail(c *gin.Context)

VerifyEmail consumes a single-use email-verification token.

Jump to

Keyboard shortcuts

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