Documentation ¶
Index ¶
- func GenerateJWT(exp int64, secret []byte, userId int32, authLevel AuthLevel) (string, error)
- func IsAuthorized(ctx context.Context, requiredLevel AuthLevel) (bool, error)
- func ParseJWT(key *[]byte, msg string) (*jwt.Token, error)
- func SetAuth(ctx context.Context, authToken string, jwtSecret *[]byte) context.Context
- type AuthLevel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateJWT ¶
func IsAuthorized ¶
IsAuthorized is a auth helper for resolvers
Types ¶
Click to show internal directories.
Click to hide internal directories.