jwt

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: Apache-2.0 Imports: 8 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifyToken

func VerifyToken(ctx context.Context, tokenString string, certURL string, cache *Cache) (*jwt.Token, error)

Types

type Cache

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

Cache Represents public key cache

func NewCache

func NewCache() *Cache

func (*Cache) Fetch

func (c *Cache) Fetch(ctx context.Context, certURL string) (jwk.Set, error)

type Claims

type Claims struct {
	Email         string `json:"email,omitempty"`
	Scope         string `json:"scope,omitempty"`
	Cognito       string `json:"cognito,omitempty"`
	VerifiedEmail bool   `json:"verified_email,omitempty"`
	jwt.RegisteredClaims
}

Claims represents JWT claim

func NewClaim

func NewClaim(token *jwt.Token) (*Claims, error)

NewClaim returns jwt claim from token

Jump to

Keyboard shortcuts

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