bitjws

package
v0.0.0-...-a671ffc Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OnError

func OnError(w http.ResponseWriter, r *http.Request, err string)

A function called whenever an error is encountered

Types

type DSAAdapter

type DSAAdapter interface {
	// Implement registration of a pubkey
	Register(pubkey *ecdsa.PublicKey) (interface{}, error)
	// Implement fetch a registered key
	GetRegisteredKey(pubkey *ecdsa.PublicKey) (interface{}, error)
}

DSA adapter interface

type SigningMiddleware

type SigningMiddleware struct {
	// The DSA configuration
	DSA *DSAAdapter
}

The state stored within this handler

func New

func New(db *DSAAdapter) *SigningMiddleware

func (*SigningMiddleware) Handler

func (m *SigningMiddleware) Handler(h http.Handler) http.Handler

net.http middleware handler

func (*SigningMiddleware) HandlerWithNext

func (m *SigningMiddleware) HandlerWithNext(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)

Negroni specific middleware handler

func (*SigningMiddleware) Verify

Verify the JWS message

Jump to

Keyboard shortcuts

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