auth

package
v0.0.0-...-3545448 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TokenKey = "token"
	UserKey  = "user"
)

Variables

View Source
var (
	ErrMissing = &fiber.Error{
		Code:    401000,
		Message: "Missing token",
	}
	ErrInvalid = &fiber.Error{
		Code:    401001,
		Message: "Invalid token",
	}
)

Functions

func GetTokenFromCtx

func GetTokenFromCtx(ctx *fiber.Ctx) string

func GetUserFromCtx

func GetUserFromCtx(ctx *fiber.Ctx) *model.User

todo: base64 decode ID

Types

This section is empty.

Jump to

Keyboard shortcuts

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