plain_login_service

package
v0.0.0-...-8122643 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginCmd

type LoginCmd struct {
	Username string `json:"username" validate:"required,alphanum_" vmessage:"Invalid login"`
	Password string `json:"password" validate:"omitempty,max=64" vmessage:"Password too big"`
}

type LoginEndpoint

type LoginEndpoint struct {
	api_server.ResourceEndpoint
	// contains filtered or unexported fields
}

func NewLoginEndpoint

func NewLoginEndpoint(service *PlainLoginService) *LoginEndpoint

func (*LoginEndpoint) HandleRequest

func (e *LoginEndpoint) HandleRequest(request api_server.Request) error

type LoginResponse

type LoginResponse struct {
	api.ResponseStub
	Token string `json:"token"`
}

type LogoutEndpoint

type LogoutEndpoint struct {
	api_server.ResourceEndpoint
	api_server.EndpointNoHandler
}

Logout endpoint is derived from no handler endpoint because all processing in performed in auth preprocessing.

func NewLogoutEndpoint

func NewLogoutEndpoint() *LogoutEndpoint

type PlainLoginService

type PlainLoginService struct {
	api_server.ServiceBase
	// contains filtered or unexported fields
}

func (*PlainLoginService) Init

func (p *PlainLoginService) Init(cfg config.Config, log logger.Logger, vld validator.Validator, configPath ...string) error

type RefreshEndpoint

type RefreshEndpoint struct {
	api_server.ResourceEndpoint
	api_server.EndpointNoHandler
}

Refresh endpoint is derived from no handler endpoint because all processing in performed in auth preprocessing.

func NewRefreshEndpoint

func NewRefreshEndpoint() *RefreshEndpoint

type UserWithPlainPassword

type UserWithPlainPassword interface {
	PlainPassword() string
}

Jump to

Keyboard shortcuts

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