jwt

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SigningKey = []byte("todo: randomize this key")

Functions

func CreateJwtWithIdRole

func CreateJwtWithIdRole(id string, role string, secondsToExpiration int64) (string, error)

Types

type CustomClaims

type CustomClaims struct {
	Id   string `json:"id"`
	Role string `json:"role"`
	jwtgo.StandardClaims
}

func ParseJwt

func ParseJwt(tokenStr string) (*jwtgo.Token, *CustomClaims, error)

Jump to

Keyboard shortcuts

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