jwtx

package
v0.0.238 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: Apache-2.0 Imports: 3 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	// Audience identifies the recipients that the JWT is intended for.
	Audience []string `json:"aud"`

	// Issuer identifies the principal that issued the JWT.
	Issuer string `json:"iss"`

	// Subject identifies the principal that is the subject of the JWT.
	Subject string `json:"sub"`

	// ExpiresAt identifies the expiration time on or after which the JWT most not be accepted for processing.
	ExpiresAt time.Time `json:"exp"`

	// IssuedAt identifies the time at which the JWT was issued.
	IssuedAt time.Time `json:"iat"`

	// NotBefore identifies the time before which the JWT must not be accepted for processing.
	NotBefore time.Time `json:"nbf"`

	// JTI provides a unique identifier for the JWT.
	JTI string `json:"jti"`
}

Claims represents a JSON Web Token's standard claims.

func ParseMapInterfaceInterfaceClaims

func ParseMapInterfaceInterfaceClaims(claims map[interface{}]interface{}) *Claims

ParseMapInterfaceInterfaceClaims converts map[interface{}]interface{} to *Claims.

func ParseMapStringInterfaceClaims

func ParseMapStringInterfaceClaims(claims map[string]interface{}) *Claims

ParseMapStringInterfaceClaims converts map[string]interface{} to *Claims.

Jump to

Keyboard shortcuts

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