signingkeys

package
v0.0.0-testrgm6 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSigningKeyNotFound      = errutil.NewBase(errutil.StatusNotFound, "signingkeys.keyNotFound")
	ErrSigningKeyAlreadyExists = errutil.NewBase(errutil.StatusBadRequest, "signingkeys.keyAlreadyExists")
	ErrKeyGenerationFailed     = errutil.NewBase(errutil.StatusInternal, "signingkeys.keyGenerationFailed")
)

Functions

This section is empty.

Types

type Service

type Service interface {
	// GetJWKS returns the JSON Web Key Set (JWKS) with all the keys that can be used to verify tokens (public keys)
	GetJWKS() jose.JSONWebKeySet
	// GetJWK returns the JSON Web Key (JWK) with the specified key ID which can be used to verify tokens (public key)
	GetJWK(keyID string) (jose.JSONWebKey, error)
	// GetPublicKey returns the public key with the specified key ID
	GetPublicKey(keyID string) (crypto.PublicKey, error)
	// GetPrivateKey returns the private key with the specified key ID
	GetPrivateKey(keyID string) (crypto.PrivateKey, error)
	// GetServerPrivateKey returns the private key used to sign tokens
	GetServerPrivateKey() crypto.PrivateKey
	// GetServerPublicKey returns the public key used to verify tokens
	GetServerPublicKey() crypto.PublicKey
	// AddPrivateKey adds a private key to the service
	AddPrivateKey(keyID string, privateKey crypto.PrivateKey) error
}

Service provides functionality for managing signing keys used to sign and verify JWT tokens.

The service is under active development and is not yet ready for production use.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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