auth

package
v0.0.0-...-397b8aa Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JWTGenerate

func JWTGenerate(c *fiber.Ctx) error

func JWTVerify

func JWTVerify(c *fiber.Ctx) error

func RoutesUp

func RoutesUp(api fiber.Router)

Types

type AccessTokenResponse

type AccessTokenResponse struct {
	AccesToken   string `json:"acces_token"`
	TokenType    string `json:"token_type"`
	ExpiresIn    int64  `json:"expires_in"`
	RefreshToken string `json:"refresh_token,omitempty"`
	Scope        string `json:"scope,omitempty"`
}

func NewAccesTokenResponse

func NewAccesTokenResponse(subject string) AccessTokenResponse

type UserCredentials

type UserCredentials struct {
	// Reprecents the subject: username, email, identification, etc.
	Subject  string `json:"subject"`
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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