auth

package
v0.0.0-...-f3113ea Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type AuthController

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

func NewAuthController

func NewAuthController(authService *AuthService) *AuthController

func (*AuthController) HandleRoutes

func (ac *AuthController) HandleRoutes(router *mux.Router)

func (*AuthController) Login

func (ac *AuthController) Login(w http.ResponseWriter, r *http.Request)

func (*AuthController) Logout

func (ac *AuthController) Logout(w http.ResponseWriter, r *http.Request)

type AuthService

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

func NewAuthService

func NewAuthService(usersService *users.UsersService) *AuthService

func (*AuthService) Login

func (as *AuthService) Login(dto LoginAuthDto) (*users.UsersEntity, error)

func (*AuthService) Logout

func (as *AuthService) Logout(dto LogoutAuthDto) error

type LoginAuthDto

type LoginAuthDto struct {
	Username string `json:"username"`
}

type LogoutAuthDto

type LogoutAuthDto struct {
	Id int `json:"id"`
}

Jump to

Keyboard shortcuts

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