jwt

package
v2.25.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const TokenUseAccess = "access"
View Source
const TokenUseID = "id"

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	jwt.StandardClaims
	CognitoClaims
	EnlightClaims
}

func (Claims) Valid

func (c Claims) Valid() (err error)

type CognitoClaims

type CognitoClaims struct {
	Username string `json:"username"`
	TokenUse string `json:"token_use"`
}

type EnlightClaims

type EnlightClaims struct {
	EnlightUserID    string `json:"enlightUserId"`
	EnlightCompanyID string `json:"enlightCompanyId"`
	EnlightAccess    string `json:"enlightAccess"`
	EnlightRoles     string `json:"enlightRoles"`
}

type Token

type Token jwt.Token

func Parse

func Parse(jwtToken string) (_ Token, err error)

func (Token) GetClaims

func (t Token) GetClaims() Claims

Jump to

Keyboard shortcuts

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