signer

package
v0.0.0-...-f4d4031 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SigningAlg = jose.RS256
)

Variables

This section is empty.

Functions

func NewKmsSigner

func NewKmsSigner(ctx context.Context, kmsKeyPath string, pemChain []byte) (jose.Signer, error)

Types

type ByteSigner

type ByteSigner interface {
	SignBytes(payload []byte) ([]byte, error)
}

type ConfigurableSigner

type ConfigurableSigner struct {
	SignerOptions *jose.SignerOptions
	ByteSigner    ByteSigner
}

func (ConfigurableSigner) Options

func (s ConfigurableSigner) Options() jose.SignerOptions

func (ConfigurableSigner) Sign

func (s ConfigurableSigner) Sign(payload []byte) (*jose.JSONWebSignature, error)

type KmsByteSigner

type KmsByteSigner struct {
	Client     *kms.KeyManagementClient
	KmsKeyPath string
}

func (KmsByteSigner) SignBytes

func (k KmsByteSigner) SignBytes(payload []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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