auth

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticator

func Authenticator(next http.Handler) http.Handler

func CreateToken

func CreateToken(claim JWTClaim) string

func GetAuth

func GetAuth() *jwtauth.JWTAuth

func GetJwtClaim

func GetJwtClaim(r *http.Request, key string) (interface{}, error)

func Init

func Init(secret string)

Types

type JWTClaim

type JWTClaim struct {
	UserId   string
	Username string
	Role     string
	Email    string
	SchoolId string
}

Jump to

Keyboard shortcuts

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