auth

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func EncodeJWT

func EncodeJWT(claims KronusTokenClaims, keyPair *key.KeyPair) (string, error)

func HashPassword

func HashPassword(password string) (string, error)

Types

type KronusTokenClaims

type KronusTokenClaims struct {
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	IsAdmin   bool   `json:"is_admin"`
	jwt.StandardClaims
}

func DecodeJWT

func DecodeJWT(tokenString string, keyPair *key.KeyPair) (*KronusTokenClaims, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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