authservice

package
v0.0.0-...-8aa74fd Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComparePassowrds

func ComparePassowrds(hashedBytes []byte, pw string) bool

func HashPassword

func HashPassword(pwBytes []byte) ([]byte, error)

Types

type SessionService

type SessionService struct{}

func (*SessionService) Init

func (s *SessionService) Init()

func (*SessionService) IsAuthenticated

func (s *SessionService) IsAuthenticated(c echo.Context) UserSession

func (*SessionService) Login

func (s *SessionService) Login(c echo.Context, q *models.Queries) error

func (*SessionService) Logout

func (s *SessionService) Logout(c echo.Context) error

type UserSession

type UserSession struct {
	IsAuthenticated bool
	Username        string
}

Jump to

Keyboard shortcuts

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