service

package
v0.0.0-...-c953c3f Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthTokenGenerator

type AuthTokenGenerator struct {
}

func (AuthTokenGenerator) GenerateToken

func (t AuthTokenGenerator) GenerateToken(userID string) (string, error)

func (AuthTokenGenerator) ParseToken

func (t AuthTokenGenerator) ParseToken(accessToken string) (string, error)

type PasswordEncryptor

type PasswordEncryptor interface {
	EncryptString(s string) (string, error)
	CompareHashAndPassword(hash, password string) bool
}

type PasswordEncryptorBcrypt

type PasswordEncryptorBcrypt struct {
}

func NewPasswordEncryptor

func NewPasswordEncryptor() PasswordEncryptorBcrypt

func (PasswordEncryptorBcrypt) CompareHashAndPassword

func (p PasswordEncryptorBcrypt) CompareHashAndPassword(hash, password string) bool

CompareWithHash ...

func (PasswordEncryptorBcrypt) EncryptString

func (p PasswordEncryptorBcrypt) EncryptString(s string) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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