auth

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 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 Authorizer

type Authorizer interface {
	IsAuthorized(r *http.Request) bool
}

type HeaderAuthorizer

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

func NewHeaderAuthorizer

func NewHeaderAuthorizer(headerName string, headerValues []string) *HeaderAuthorizer

func (HeaderAuthorizer) IsAuthorized

func (h HeaderAuthorizer) IsAuthorized(r *http.Request) bool

type NoOp

type NoOp struct {
}

func NewNoOpAuthorizer

func NewNoOpAuthorizer() *NoOp

func (NoOp) IsAuthorized

func (a NoOp) IsAuthorized(_ *http.Request) bool

type UserAgentAuthorizer

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

func NewUserAgentAuthorizer

func NewUserAgentAuthorizer(userAgents []string) *UserAgentAuthorizer

func (UserAgentAuthorizer) IsAuthorized

func (u UserAgentAuthorizer) IsAuthorized(r *http.Request) bool

Jump to

Keyboard shortcuts

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