handler

package
v0.0.0-...-9d4acdc Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthHandler

type HealthHandler struct{}

func NewHealthHandler

func NewHealthHandler() *HealthHandler

func (*HealthHandler) Alive

func (handler *HealthHandler) Alive(c echo.Context) error

func (*HealthHandler) Ready

func (handler *HealthHandler) Ready(c echo.Context) error

type PasscodeHandler

type PasscodeHandler struct {
	TTL int
	// contains filtered or unexported fields
}

func NewPasscodeHandler

func NewPasscodeHandler(config config.Passcode, serviceConfig config.Service, persister persistence.Persister, sessionManager session.Manager, mailer mail.Mailer) (*PasscodeHandler, error)

func (*PasscodeHandler) Finish

func (h *PasscodeHandler) Finish(c echo.Context) error

func (*PasscodeHandler) Init

func (h *PasscodeHandler) Init(c echo.Context) error

type PasswordHandler

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

func NewPasswordHandler

func NewPasswordHandler(persister persistence.Persister, sessionManager session.Manager) *PasswordHandler

func (*PasswordHandler) Login

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

func (*PasswordHandler) Set

func (h *PasswordHandler) Set(c echo.Context) error

type PasswordLoginBody

type PasswordLoginBody struct {
	UserId   string `json:"user_id" validate:"required,uuid4"`
	Password string `json:"password" validate:"required"`
}

type PasswordSetBody

type PasswordSetBody struct {
	UserID   string `json:"user_id" validate:"required,uuid4"`
	Password string `json:"password" validate:"required"`
}

type UserCreateBody

type UserCreateBody struct {
	Email string `json:"email" validate:"required,email"`
}

type UserGetByEmailBody

type UserGetByEmailBody struct {
	Email string `json:"email" validate:"required,email"`
}

type UserHandler

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

func NewUserHandler

func NewUserHandler(persister persistence.Persister) *UserHandler

func (*UserHandler) Create

func (h *UserHandler) Create(c echo.Context) error

func (*UserHandler) Get

func (h *UserHandler) Get(c echo.Context) error

func (*UserHandler) GetUserIdByEmail

func (h *UserHandler) GetUserIdByEmail(c echo.Context) error

func (*UserHandler) Me

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

type UserHandlerAdmin

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

func NewUserHandlerAdmin

func NewUserHandlerAdmin(persister persistence.Persister) *UserHandlerAdmin

func (*UserHandlerAdmin) Delete

func (h *UserHandlerAdmin) Delete(c echo.Context) error

func (*UserHandlerAdmin) List

func (h *UserHandlerAdmin) List(c echo.Context) error

func (*UserHandlerAdmin) Patch

func (h *UserHandlerAdmin) Patch(c echo.Context) error

type UserListRequest

type UserListRequest struct {
	PerPage int `query:"per_page"`
	Page    int `query:"page"`
}

type UserPatchRequest

type UserPatchRequest struct {
	UserId   string `param:"id" validate:"required,uuid4"`
	Email    string `json:"email" validate:"omitempty,email"`
	Verified *bool  `json:"verified"`
}

type WebauthnHandler

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

func NewWebauthnHandler

func NewWebauthnHandler(cfg config.WebauthnSettings, persister persistence.Persister, sessionManager session.Manager) (*WebauthnHandler, error)

NewWebauthnHandler creates a new handler which handles all webauthn related routes

func (*WebauthnHandler) BeginAuthentication

func (h *WebauthnHandler) BeginAuthentication(c echo.Context) error

BeginAuthentication returns credential assertion options for the WebAuthnAPI.

func (*WebauthnHandler) BeginRegistration

func (h *WebauthnHandler) BeginRegistration(c echo.Context) error

BeginRegistration returns credential creation options for the WebAuthnAPI. It expects a valid session JWT in the request.

func (*WebauthnHandler) FinishAuthentication

func (h *WebauthnHandler) FinishAuthentication(c echo.Context) error

FinishAuthentication validates the WebAuthnAPI response and on success it returns a new session JWT.

func (*WebauthnHandler) FinishRegistration

func (h *WebauthnHandler) FinishRegistration(c echo.Context) error

FinishRegistration validates the WebAuthnAPI response and associates the credential with the user. It expects a valid session JWT in the request. The session JWT must be associated to the same user who requested the credential creation options.

type WellKnownHandler

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

func NewWellKnownHandler

func NewWellKnownHandler(config config.Config, jwkManager hankoJwk.Manager) (*WellKnownHandler, error)

func (*WellKnownHandler) GetConfig

func (h *WellKnownHandler) GetConfig(c echo.Context) error

func (*WellKnownHandler) GetPublicKeys

func (h *WellKnownHandler) GetPublicKeys(c echo.Context) error

Jump to

Keyboard shortcuts

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