security

package
v0.0.0-rc6 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidJwtToken = errors.New("invalid JWT token")
)

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func DecodeAndValidateJwtToken

func DecodeAndValidateJwtToken(token, secret string) (*jwt.Token, error)

func GenerateTokens

func GenerateTokens(cfg config.JWTConfig, userEntity *model.UserEntity) (string, string, error)

func GetClaimsFromJwtToken

func GetClaimsFromJwtToken(token *jwt.Token) (jwt.MapClaims, error)

func HashPassword

func HashPassword(password string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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