code

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	UserID                     string
	CreationUTC, ExpirationUTC int64
	jwt.StandardClaims
}

Claims is used to store the claims

type Code

type Code struct{}

Code is used to create and validate verification code

func (Code) Create

func (code Code) Create(userID string) string

Create is used to create a jwt for verification token

func (Code) Validate

func (code Code) Validate(tokenString string) (bool, string)

Validate is used to validate a jwt

Jump to

Keyboard shortcuts

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