auth

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

templ: version: v0.3.1001

templ: version: v0.3.1001

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OTPRequest

func OTPRequest(props OTPRequestProps) templ.Component

func OTPRequestForm

func OTPRequestForm(props OTPRequestProps) templ.Component

func OTPVerify

func OTPVerify(props OTPVerifyProps) templ.Component

func OTPVerifyForm

func OTPVerifyForm(props OTPVerifyProps) templ.Component

Types

type AuthHandler

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

func NewAuthHandler

func NewAuthHandler(
	authService domain.AuthService,
	isDev bool,
) *AuthHandler

func (*AuthHandler) Login

func (h *AuthHandler) Login(w http.ResponseWriter, r *http.Request)

Login renders the OTP request page.

func (*AuthHandler) Logout

func (h *AuthHandler) Logout(w http.ResponseWriter, r *http.Request)

Logout clears the session cookie.

func (*AuthHandler) RequestOTP

func (h *AuthHandler) RequestOTP(w http.ResponseWriter, r *http.Request)

RequestOTP handles the form submission to request a new OTP.

func (*AuthHandler) VerifyOTP

func (h *AuthHandler) VerifyOTP(w http.ResponseWriter, r *http.Request)

VerifyOTP handles the form submission to verify the OTP and sign in.

type OTPRequestProps

type OTPRequestProps struct {
	Email string
	Error string
}

type OTPVerifyProps

type OTPVerifyProps struct {
	Email string
	Error string
}

Jump to

Keyboard shortcuts

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