jwk

package
v0.0.0-...-f7d5a40 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KID_NOT_FOUND          = errors.New("Key not found to verify the token")
	EXPONENT_NOT_SUPPORTED = errors.New("The exponent for key is not supported yet")
)

Functions

This section is empty.

Types

type IbmJWK

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

type IbmJWKS

type IbmJWKS struct {
	Keys []IbmJWK `json:"keys"`
}

type IbmJwksManager

type IbmJwksManager struct {
	IbmJWKS

	sync.RWMutex
	// contains filtered or unexported fields
}

func NewIbmJwksManager

func NewIbmJwksManager() IbmJwksManager

func (*IbmJwksManager) Init

func (manager *IbmJwksManager) Init()

func (*IbmJwksManager) Stop

func (manager *IbmJwksManager) Stop()

func (*IbmJwksManager) VerifySig

func (manager *IbmJwksManager) VerifySig(kid, content, signature string) error

kid: key identifier; content: hash input string; signature: the signature of the hash of content Return error if signature verification fails

Jump to

Keyboard shortcuts

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