xkeyset

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	UserAgent        string
	URL              string
	Client           *http.Client
	MinCacheDuration time.Duration
	MaxCacheDuration time.Duration
	RefreshWarning   func(err error)
	// RefreshContext is used during background refreshing of the Keyset. If unset, context.Background() is used.
	RefreshContext context.Context
}

type RemoteKeyset

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

func New

func New(initCtx context.Context, opts Options) (*RemoteKeyset, error)

New creates a JSON Keyset that is cached in memory.

On creation, it will do a block HTTP request to load the initial keyset.

After initial load, it will refresh the cached keyset, any consumers may see older versions of the cache until the refresh is complete.

New emits opentracing spans on the supplied context when fetching the keyset.

func (*RemoteKeyset) Close

func (rk *RemoteKeyset) Close()

func (*RemoteKeyset) Get

func (rk *RemoteKeyset) Get() (*jose.JSONWebKeySet, error)

Jump to

Keyboard shortcuts

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