jwt

package
v0.0.0-...-f327fb9 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serialized

func Serialized(auth Auth, key []byte, method authmodule.SigningMethod) ([]byte, error)

function to generate JWT encoded string see https://tools.ietf.org/html/rfc7519

Types

type Auth

type Auth struct {
	Issuer     string
	IssueAt    time.Time
	Expiration time.Time
	NotBefore  time.Time
	Subject    string
	JwtId      string
	Kid        interface{}
	Claims     map[string]interface{}
}

func Parse

func Parse(authToken []byte, key []byte, method authmodule.SigningMethod,
	expLeeway time.Duration, nbfLeeway time.Duration) (Auth, error)

parse auth token with leeway for validating expired and/or not before duration

Jump to

Keyboard shortcuts

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