apikey

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKey

func GenerateKey() (string, string)

Types

type APIKeyProvider

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

func NewProvider

func NewProvider(src DataSource) *APIKeyProvider

func (APIKeyProvider) String

func (p APIKeyProvider) String() string

func (APIKeyProvider) Validate

func (p APIKeyProvider) Validate(req *http.Request) error

type DataSource

type DataSource interface {
	AuthorizationForKeyAndSecret(key, secret string) (*acl.Authorization, error)
}

Jump to

Keyboard shortcuts

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