jwk

package
v0.0.0-...-c0251f4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct{}

Cache is a cache for JWKs.

type JWK

type JWK struct {
	KeyID   string `json:"kid"`
	KeyType string `json:"kty"`
	Use     string `json:"sig"`
	PublicKey
}

func New

func New(keyID string, publicKey ecdsa.PublicKey) JWK

func (*JWK) GetPublicKey

func (jwk *JWK) GetPublicKey() (*ecdsa.PublicKey, error)

type JWKSet

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

func (*JWKSet) Get

func (j *JWKSet) Get(kid string) (*JWK, error)

type PublicKey

type PublicKey struct {
	Curve string `json:"crv"`
	X     string `json:"x"`
	Y     string `json:"y"`
}

Jump to

Keyboard shortcuts

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