userapi

package
v1.0.44 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 29 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) 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) 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) 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.

Jump to

Keyboard shortcuts

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