token

package
v0.0.0-...-47b4a58 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package token offers a basic jwt token validation method

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

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

func NewClaims

func NewClaims() *Claims

func (*Claims) UnmarshalJSON

func (c *Claims) UnmarshalJSON(b []byte) error

func (*Claims) Valid

func (c *Claims) Valid() error

func (*Claims) VerifyExp

func (c *Claims) VerifyExp() error

func (*Claims) VerifyPermissions

func (c *Claims) VerifyPermissions() error

type JWT

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

func NewJWT

func NewJWT(key *rsa.PublicKey) *JWT

func (*JWT) Verify

func (j *JWT) Verify(r *http.Request) (map[string]interface{}, error)

Jump to

Keyboard shortcuts

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