jwt

package
v0.0.0-...-4d778f5 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

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

Auth stores peer as a jwt token in cookies.

func New

func New(
	log *logger.Logger,
	secret string,
) *Auth

New is a mock auth constructor.

func (*Auth) Get

func (a *Auth) Get(r *http.Request) (*peers.Peer, error)

Get implements Authorizer.

func (*Auth) Store

func (a *Auth) Store(w http.ResponseWriter, p *peers.Peer) error

Store implements Authorizer.

Jump to

Keyboard shortcuts

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