jwkx

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(pub *rsa.PublicKey) (string, error)

Types

type JWK

type JWK struct {
	E   string `json:"e"`
	Kty string `json:"kty"`
	N   string `json:"n"`
	Kid string `json:"kid"`
}

func (*JWK) ToPEM

func (j *JWK) ToPEM() (string, error)

func (*JWK) ToPublicKey

func (j *JWK) ToPublicKey() (*rsa.PublicKey, error)

type KeyStore

type KeyStore struct {
	Keys []JWK `json:"keys"`
}

func NewFromUrl

func NewFromUrl(url string) (*KeyStore, error)

func (*KeyStore) FindKey

func (s *KeyStore) FindKey(keyID string) (JWK, error)

Jump to

Keyboard shortcuts

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