signingkeystest

package
v0.0.0-kmdagger1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeSigningKeysService

type FakeSigningKeysService struct {
	ExpectedJSONWebKeySet    jose.JSONWebKeySet
	ExpectedJSONWebKey       jose.JSONWebKey
	ExpectedKeys             map[string]crypto.Signer
	ExpectedServerPrivateKey crypto.PrivateKey
	ExpectedServerPublicKey  crypto.PublicKey
	ExpectedError            error
}

func (*FakeSigningKeysService) AddPrivateKey

func (s *FakeSigningKeysService) AddPrivateKey(keyID string, privateKey crypto.PrivateKey) error

AddPrivateKey adds a private key to the service

func (*FakeSigningKeysService) GetJWK

func (s *FakeSigningKeysService) GetJWK(keyID string) (jose.JSONWebKey, error)

GetJWK returns the JSON Web Key (JWK) with the specified key ID which can be used to verify tokens (public key)

func (*FakeSigningKeysService) GetJWKS

func (s *FakeSigningKeysService) GetJWKS() jose.JSONWebKeySet

func (*FakeSigningKeysService) GetPrivateKey

func (s *FakeSigningKeysService) GetPrivateKey(keyID string) (crypto.PrivateKey, error)

GetPrivateKey returns the private key with the specified key ID

func (*FakeSigningKeysService) GetPublicKey

func (s *FakeSigningKeysService) GetPublicKey(keyID string) (crypto.PublicKey, error)

GetPublicKey returns the public key with the specified key ID

func (*FakeSigningKeysService) GetServerPrivateKey

func (s *FakeSigningKeysService) GetServerPrivateKey() crypto.PrivateKey

GetServerPrivateKey returns the private key used to sign tokens

func (*FakeSigningKeysService) GetServerPublicKey

func (s *FakeSigningKeysService) GetServerPublicKey() crypto.PublicKey

GetServerPublicKey returns the public key used to verify tokens

Jump to

Keyboard shortcuts

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