jwt

package
v2.33.17 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	jwt.RegisteredClaims
	CognitoClaims
	EnlightClaims
}

func (Claims) Validate added in v2.33.11

func (c Claims) Validate() error

type CognitoClaims

type CognitoClaims struct {
	Username      string   `json:"username"`
	TokenUse      string   `json:"token_use"`
	CognitoGroups []string `json:"cognito:groups"`
}

type EnlightClaims

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

type ErrNotValidNow added in v2.28.0

type ErrNotValidNow struct {
	// contains filtered or unexported fields
}

func (ErrNotValidNow) Error added in v2.33.11

func (e ErrNotValidNow) Error() string

func (ErrNotValidNow) Is added in v2.33.11

func (e ErrNotValidNow) Is(target error) bool

func (ErrNotValidNow) Unwrap added in v2.33.11

func (e ErrNotValidNow) Unwrap() error

type Token

type Token jwt.Token

func Parse

func Parse(jwtToken string) (Token, 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