jwt

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2018 License: MIT Imports: 4 Imported by: 0

README

jwt

go get github.com/codemodus/jwt

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	Issuer    string
	Audience  string
	Subject   string
	IssuedAt  time.Time
	ExpiresAt time.Time
	Auth      interface{}
}

Claims ...

type JWT

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

JWT ...

func New

func New(issuer, audience, key string, expiry time.Duration) (*JWT, error)

New ...

func (*JWT) Generate

func (j *JWT) Generate(subject string, auth interface{}) (string, error)

Generate ...

func (*JWT) Parse

func (j *JWT) Parse(token string, auth interface{}) error

Parse ...

func (*JWT) ParseWithClaims

func (j *JWT) ParseWithClaims(token string, auth interface{}) (*Claims, error)

ParseWithClaims ...

Jump to

Keyboard shortcuts

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