auth

package
v0.0.0-...-39205ac Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthHandler

func AuthHandler(c *fiber.Ctx) error

Middleware to protect the Routes with JWT Token

func LogOutUser

func LogOutUser(c *fiber.Ctx) error

Logs out the current User

func LoginUser

func LoginUser(c *fiber.Ctx, user models.User) (string, error)

Types

type AuthJWTClaims

type AuthJWTClaims struct {
	jwt.StandardClaims
	Name    string `json:"name"`
	Email   string `json:"email"`
	IsAdmin bool   `json:"is_admin"`
}

Custom defined Claims I like to use this but i coudn;t figured out how

Jump to

Keyboard shortcuts

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