auth

package
v0.0.0-...-8be21fa Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUserHandler

func GetUserHandler(c *fiber.Ctx) error

func JWTMiddleWare

func JWTMiddleWare() func(*fiber.Ctx) error

Bearer Token Authorization Middleware (JWT)

func SignInHandler

func SignInHandler(c *fiber.Ctx) error

func SignUpHandler

func SignUpHandler(c *fiber.Ctx) error

Types

type SignInSuccessResponse

type SignInSuccessResponse struct {
	AccessToken string `json:"access_token"`
	UserID      uint   `json:"user_id"`
}

type UserAccountSignUpBody

type UserAccountSignUpBody struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type UserSchemaResponse

type UserSchemaResponse struct {
	ID       uint   `json:"id"`
	Username string `json:"username"`
	Money    int    `json:"money"`
}

Jump to

Keyboard shortcuts

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