security

package module
v0.0.0-...-6330d4c Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetToken

func GetToken(c *fiber.Ctx) error

GetToken request token @Summary Get token @Description Get token based on username and password @Tags Token @Accept json @Produce json @Success 201 {string} Jwt @Failure 400 {string} error @Router /Auth/getToken [post]

func Protected

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

Protected protect routes

Types

type UserCredential

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

type UserToken

type UserToken struct {
	User   string `json:"user"`
	Email  string `json:"email"`
	Role   string `json:"role"`
	Rights string `json:"rights"`
	Token  string `json:"token"`
}

Jump to

Keyboard shortcuts

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