app

package
v0.0.0-...-a9a9e39 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Filestore filestore.Filestore
	Datastore datastore.Datastore
)

Functions

func GetTokenUserID

func GetTokenUserID(token *jwt.Token) string

func Login

func Login(c context.Context, username, password string) (*models.LoginPayload, error)

func NewToken

func NewToken(user *models.User) *jwt.Token

func SignToken

func SignToken(token *jwt.Token) (string, error)

func UpdatePassword

func UpdatePassword(c context.Context, userID, password string) error

func ValidateToken

func ValidateToken(tokenString string) (*jwt.Token, error)

Types

type Claims

type Claims struct {
	jwt.StandardClaims
}

Jump to

Keyboard shortcuts

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