jwk

package
v2.20.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KeySetURL string

KeySetURL is used to configure which URL to fetch JWKs from. Deprecated: Use Configure(Config{Stage: "..."}) instead.

Functions

func Configure added in v2.1.1

func Configure(conf Config)

func RefreshKeySets

func RefreshKeySets() (err error)

Types

type Config added in v2.1.1

type Config struct {
	Stage string
}

type JWKeySet

type JWKeySet struct {
	Algorithm string `json:"alg"`
	Exp       string `json:"e"`
	KeyID     string `json:"kid"`
	KeyType   string `json:"kty"`
	Mod       string `json:"n"`
	Use       string `json:"use"`
}

func (JWKeySet) GetPublicKey

func (ks JWKeySet) GetPublicKey() (_ *rsa.PublicKey, err error)

type JWKeySets

type JWKeySets []JWKeySet

func GetKeySets

func GetKeySets() (_ JWKeySets, err error)

func (JWKeySets) LookupKeyID

func (kss JWKeySets) LookupKeyID(keyID string) (ks JWKeySet, err error)

Jump to

Keyboard shortcuts

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