auth

package
v0.0.0-...-a214acc Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateJWT

func GenerateJWT(user models.User) (string, error)

func IsAuthorized

func IsAuthorized(endpoint func(http.ResponseWriter, *http.Request)) http.Handler

func VerifyToken

func VerifyToken(w http.ResponseWriter, token1 string) error

Types

type ResponseBody

type ResponseBody struct {
	Success bool   `json:"success"`
	Msg     string `json:"msg"`
	Data    string `json:"data"`
}

type UsersClaim

type UsersClaim struct {
	models.User
	jwt.StandardClaims
}

Jump to

Keyboard shortcuts

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