jwk

package
v5.3.7 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: Apache-2.0 Imports: 10 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 WithAthenzJwksURL

func WithAthenzJwksURL(url string) Option

WithAthenzJwksURL returns an Athenz JWK URL path functional option

func WithHTTPClient

func WithHTTPClient(cl *http.Client) Option

WithHTTPClient returns a HTTPClient functional option

func WithRefreshPeriod

func WithRefreshPeriod(t string) Option

WithRefreshPeriod returns a RefreshPeriod functional option

func WithRetryDelay

func WithRetryDelay(i string) Option

WithRetryDelay returns an RetryDelay functional option

func WithURLs

func WithURLs(urls []string) Option

WithURLs returns an JwkUrls functional option

type Provider

type Provider func(keyID string, jwkSetURL string) interface{}

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

Jump to

Keyboard shortcuts

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