authn

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2021 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator struct {
	Type         string
	Authenticate func(*http.Request) bool
	Forbidden    http.Handler
}

Authenticator middleware

func (Authenticator) ServeHandler

func (m Authenticator) ServeHandler(h http.Handler) http.Handler

ServeHandler implements middleware interface

type BasicAuthenticator

type BasicAuthenticator struct {
	Realm        string
	Authenticate func(username, password string) bool
}

BasicAuthenticator middleware

func Basic

func Basic(username, password string) *BasicAuthenticator

Basic creates new basic auth middleware

func (BasicAuthenticator) ServeHandler

func (m BasicAuthenticator) ServeHandler(h http.Handler) http.Handler

ServeHandler implements middleware interface

Jump to

Keyboard shortcuts

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