Documentation ¶
Index ¶
- func AuthenticatorIsAdmin(next http.Handler) http.Handler
- func AuthenticatorIsLoggedIn(next http.Handler) http.Handler
- func GetUserID(context context.Context) int
- func GetUsername(context context.Context) (string, error)
- func SetJWTTimeClaims(claims *map[string]interface{}, expireIn time.Duration)
- type JWTObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticatorIsAdmin ¶
AuthenticatorIsAdmin is a middleware for checking user's admin privilege.
func GetUsername ¶
TODO verify if this ever returns any error, it shouldnt
func SetJWTTimeClaims ¶
SetJWTTimeClaims is a workaround for setting exp and iat (that should be done at creation time).
Types ¶
Click to show internal directories.
Click to hide internal directories.