authrouter

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthRouter

type AuthRouter interface {
	AuthHandler(method, path, required string, handler http.Handler)
}

AuthRouter is an interface to support defining routes that require auth

func NewAuthRouter

func NewAuthRouter(router httpserver.Router, checkAuth CheckAuth) AuthRouter

NewAuthRouter returns a AuthRouter

type CheckAuth

type CheckAuth interface {
	HasAuth(req *http.Request, required string) bool
}

Jump to

Keyboard shortcuts

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