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)
Click to show internal directories.
Click to hide internal directories.