jwk

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultManager

type DefaultManager struct {
	// contains filtered or unexported fields
}

func NewDefaultManager

func NewDefaultManager(keys []string, persister persistence.JwkPersister) (*DefaultManager, error)

Returns a DefaultManager that reads and persists the jwks to database and generates jwks if a new secret gets added to the config.

func (*DefaultManager) GenerateKey

func (m *DefaultManager) GenerateKey() (jwk.Key, error)

func (*DefaultManager) GetPublicKeys

func (m *DefaultManager) GetPublicKeys() (jwk.Set, error)

func (*DefaultManager) GetSigningKey

func (m *DefaultManager) GetSigningKey() (jwk.Key, error)

type KeyGenerator

type KeyGenerator interface {
	// Generate a new JWK with a given id
	Generate(id string) (jwk.Key, error)
}

KeyGenerator Interface for JSON Web Key Generation

type Manager

type Manager interface {
	// GenerateKey is used to generate a jwk Key
	GenerateKey() (jwk.Key, error)
	// GetPublicKeys returns all Public keys that are persisted
	GetPublicKeys() (jwk.Set, error)
	// GetSigningKey returns the last added private key that is used for signing
	GetSigningKey() (jwk.Key, error)
}

type RSAKeyGenerator

type RSAKeyGenerator struct {
}

RSAKeyGenerator

func (*RSAKeyGenerator) Generate

func (g *RSAKeyGenerator) Generate(id string) (jwk.Key, error)

Jump to

Keyboard shortcuts

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