Documentation ¶ Index ¶ func Authenticator(next http.Handler) http.Handler func CreateToken(claim JWTClaim) string func GetAuth() *jwtauth.JWTAuth func GetJwtClaim(r *http.Request, key string) (interface{}, error) func Init(secret string) type JWTClaim 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 } Source Files ¶ View all Source files auth.go Click to show internal directories. Click to hide internal directories.