key

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadAuth = errors.New("permission denied")

Functions

This section is empty.

Types

type APIKeyRequest

type APIKeyRequest struct {
	APIKey string `json:"apiKey"`
}

APIKeyRequest is the request to Apigee's verifyAPIKey API

type APIKeyResponse

type APIKeyResponse struct {
	Token string `json:"token"`
}

APIKeyResponse is the response from Apigee's verifyAPIKey API

type Verifier

type Verifier interface {
	Verify(ctx context.Context, apiKey string) (map[string]interface{}, error)
}

keyVerifier encapsulates API key verification logic.

func NewVerifier

func NewVerifier(opts VerifierOpts) Verifier

type VerifierOpts

type VerifierOpts struct {
	JwtVerifier           jwt.Verifier
	CacheTTL              time.Duration
	CacheEvictionInterval time.Duration
	MaxCachedEntries      int
	Client                *http.Client
	Org                   string
}

Jump to

Keyboard shortcuts

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