auth

package
v0.0.0-...-39ee276 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptionPassword

func DecryptionPassword(hashed, password string) bool

func EncryptionPassword

func EncryptionPassword(password string) string

func GetToken

func GetToken(credential Credential) (string, error)

Types

type Claims

type Claims struct {
	Credential
	jwt.RegisteredClaims
}

func VerifyToken

func VerifyToken(token string) (Claims, error)

type Credential

type Credential struct {
	UserID   int    `json:"user_id"`
	Username string `json:"username"`
}

type UserAuth

type UserAuth struct{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳