Documentation
¶
Index ¶
Constants ¶
const (
PrivateKeySecretKey = "private-key"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyPair ¶
func LoadKeyFromPEM ¶
LoadKeyFromPEM loads a private key from a PEM encoded private key.
type KeyPairs ¶
type KeyPairs []*KeyPair
func GenerateECDSAKeyPair ¶
func GenerateECDSAKeyPair() *KeyPairs
GenerateECDSAKeyPair generates a new ECDSA key pair for JWT signing.
func GenerateRSAKeyPair ¶
func GenerateRSAKeyPair() *KeyPairs
func LoadOrGenerateKeyPair ¶
func LoadOrGenerateKeyPair( secrets kdexv1alpha1.Secrets, devMode bool, ) (*KeyPairs, error)
LoadOrGenerateKeyPair loads a key pair from a Kubernetes Secret. If the secret doesn't exist or is invalid, it generates a new key pair.