scripts

package
v0.0.0-...-095d0c8 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComparePassword

func ComparePassword(hashedPassword string, candidatePassword string) error

func ExtractToken

func ExtractToken(c *gin.Context) string

func ExtractTokenID

func ExtractTokenID(c *gin.Context) (string, error)

func GenerateToken

func GenerateToken(user_id string) (string, error)

func HashPassword

func HashPassword(password string) string

func Login

func Login(c *gin.Context)

func LoginCheck

func LoginCheck(username string, password string) (string, error)

func TokenValid

func TokenValid(c *gin.Context) error

Types

type LoginInput

type LoginInput struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
}

Jump to

Keyboard shortcuts

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