jwk

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package jwk represents the jwk daemon fetching logic and the interface

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrFetchAthenzJWK "Fetch athenz json web key error"
	ErrFetchAthenzJWK = errors.New("Fetch athenz json web key error")
)

Functions

This section is empty.

Types

type Daemon

type Daemon interface {
	Start(ctx context.Context) <-chan error
	Update(context.Context) error
	GetProvider() Provider
}

Daemon represents the daemon to retrieve jwk from Athenz.

func New

func New(opts ...Option) (Daemon, error)

New represent the constructor of Policyd

type Option

type Option func(*jwkd) error

Option represents a functional option

func WithAthenzURL

func WithAthenzURL(url string) Option

WithAthenzURL returns an AthenzURL functional option

func WithErrRetryInterval

func WithErrRetryInterval(i string) Option

WithErrRetryInterval returns an ErrRetryInterval functional option

func WithHTTPClient

func WithHTTPClient(cl *http.Client) Option

WithHTTPClient returns a HTTPClient functional option

func WithRefreshDuration

func WithRefreshDuration(t string) Option

WithRefreshDuration returns a RefreshDuration functional option

type Provider

type Provider func(keyID string) interface{}

Provider represent the jwk provider to retrive the json web key.

Jump to

Keyboard shortcuts

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