jwk

package
v2.33.17 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 9 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() 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, error)

type JWKeySets

type JWKeySets []JWKeySet

func GetKeySets

func GetKeySets() (JWKeySets, error)

func (JWKeySets) LookupKeyID

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

Jump to

Keyboard shortcuts

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