jwt

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims jwt.Claims

Claims is an alias of jwt.Claims.

func (*Claims) GenerateID

func (c *Claims) GenerateID() *Claims

func (*Claims) WithAudience

func (c *Claims) WithAudience(aud ...string) *Claims

func (*Claims) WithExpiry

func (c *Claims) WithExpiry(exp time.Time) *Claims

func (*Claims) WithExpiryInFuture

func (c *Claims) WithExpiryInFuture(seconds int64) *Claims

func (*Claims) WithIssuedAt

func (c *Claims) WithIssuedAt(iat time.Time) *Claims

func (*Claims) WithIssuedAtNow

func (c *Claims) WithIssuedAtNow() *Claims

func (*Claims) WithIssuer

func (c *Claims) WithIssuer(iss string) *Claims

func (*Claims) WithNotBefore

func (c *Claims) WithNotBefore(nbf time.Time) *Claims

func (*Claims) WithSubject

func (c *Claims) WithSubject(sub string) *Claims

type Flatten

type Flatten interface {
	// Flatten returns a list of objects, which will be supplied to JWT builder in sequence.
	Flatten() []interface{}
}

Flatten is a voluntary interface to implement, so that the claim object can be flattened and supplied to JWT builder in pieces. This is useful when the custom JWT claim object has a hierarchical structure, but wishes to be encoded as a flat JWT claim.

Jump to

Keyboard shortcuts

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