auth

package
v0.0.0-...-33029d4 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JWTService

type JWTService struct {
	SigninKey SignInKey
	TokenTTL  time.Duration
}

func (*JWTService) GenerateToken

func (s *JWTService) GenerateToken(id string) (string, error)

func (*JWTService) ParseToken

func (s *JWTService) ParseToken(accessToken string) (string, error)

type PasswordManager

type PasswordManager struct {
	Salt Salt
}

func (*PasswordManager) HashPassword

func (mgr *PasswordManager) HashPassword(password string) string

func (*PasswordManager) VerifyHashedPassword

func (mgr *PasswordManager) VerifyHashedPassword(password, expectedHash string) bool

type Salt

type Salt string

type SignInKey

type SignInKey string

Jump to

Keyboard shortcuts

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