login

package
v0.0.0-...-4c45443 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToken

func CreateToken(j jwt.JWT, data ClientJWTDTO, exp time.Duration) (string, error)

Types

type ClientClaims

type ClientClaims struct {
	jwtGo.StandardClaims
	Data ClientJWTDTO `json:"data"`
}

type ClientJWTDTO

type ClientJWTDTO struct {
	ID       uint64 `json:"id"`
	Username string `json:"username"`
}

func DecodeToken

func DecodeToken(j jwt.JWT, token string) (ClientJWTDTO, error)

func GetCurrentLogin

func GetCurrentLogin(ctx echo.Context) (ClientJWTDTO, error)

Jump to

Keyboard shortcuts

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