Documentation ¶
Index ¶
- Variables
- func GetEnvWithDefault(key string, fallback string) string
- func ParseToken(tokenString string) (jwt.MapClaims, error)
- func PassJwtContext(next http.Handler) http.Handler
- func RequireAuth(jwt string, callback func() (interface{}, error)) (interface{}, error)
- func ValidateJWT(jwtToken string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var JwtSecret = []byte("secret")
Functions ¶
func GetEnvWithDefault ¶
func RequireAuth ¶
Helper middleware func for wrapping certain queries in auth verification E.g: RequireAuth(jwt, someQuery)
func ValidateJWT ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.