services

package
v0.0.0-...-7955d73 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBcryptService

func NewBcryptService(salt int) services.CryptoService

func NewJWTService

func NewJWTService(
	symmetricKey string,
	logger services.LoggerService,
) (services.JWTService, error)

Types

type BcryptService

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

func (BcryptService) Hash

func (bs BcryptService) Hash(password string) (string, error)

func (BcryptService) Verify

func (bs BcryptService) Verify(password, hashedPassword string) error

type PasetoService

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

func (*PasetoService) Generate

func (ps *PasetoService) Generate(user *entity.User) (string, error)

func (*PasetoService) Verify

func (ps *PasetoService) Verify(token string) (*entity.Token, error)

Jump to

Keyboard shortcuts

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