authhttp

package
v0.0.0-...-1f1dc5f Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package authhttp adapts authentication HTTP requests to the auth usecase.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(group *echo.Group, handler *Handler)

Register mounts authentication routes on group.

Types

type Handler

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

Handler adapts auth HTTP requests to the auth usecase.

func New

func New(uc *usecase.Usecase, secureCookies bool) *Handler

New creates an auth HTTP handler.

func (*Handler) ChangePassword

func (h *Handler) ChangePassword(c *echo.Context) error

ChangePassword updates the current administrator password and revokes other login sessions for the same administrator.

func (*Handler) Login

func (h *Handler) Login(c *echo.Context) error

Login handles administrator login.

func (*Handler) Logout

func (h *Handler) Logout(c *echo.Context) error

Logout revokes the current login session on the server.

func (*Handler) LogoutOthers

func (h *Handler) LogoutOthers(c *echo.Context) error

LogoutOthers revokes the current administrator's other login sessions.

func (*Handler) Me

func (h *Handler) Me(c *echo.Context) error

Me returns the authenticated administrator profile.

func (*Handler) SwitchRole

func (h *Handler) SwitchRole(c *echo.Context) error

SwitchRole changes the active role for the current administrator.

func (*Handler) UpdateProfile

func (h *Handler) UpdateProfile(c *echo.Context) error

UpdateProfile updates the current administrator's profile fields.

Jump to

Keyboard shortcuts

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