jwks

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2018 License: MIT Imports: 9 Imported by: 0

README

jwks

JSON Web Key client for Go

Documentation

Overview

Package jwks is just like github.com/upgear/go-jwks, but with vendored dependencies for reproducible builds

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client fetchs and maintains a cache of keys from a public endpoint.

func NewClient

func NewClient(endpoint string) (*Client, error)

NewClient returns a Client which is used to fetch keys from a supplied endpoint. It will attempt to cache the keys returned before returning. If an error occurs, it will return an error (with the instantiated Client).

func (*Client) GetKey

func (c *Client) GetKey(kid string) (interface{}, error)

GetKey returns a key for a given key id. It first looks in the Client's cache and if it can not find a key it will attempt fetch the key from the endpoint directly.

Jump to

Keyboard shortcuts

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