jws

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyUsageMytokenSigning = KeyUsage("MT signing")
	KeyUsageFederation     = KeyUsage("oidfed")
	KeyUsageOIDCSigning    = KeyUsage("oidc comm")
)

Predefined KeyUsage strings

Variables

This section is empty.

Functions

func ExportPrivateKeyAsPemStr

func ExportPrivateKeyAsPemStr(sk crypto.Signer) string

ExportPrivateKeyAsPemStr exports the private key

func GenerateFederationSigningKeyPair added in v0.10.0

func GenerateFederationSigningKeyPair() (sk crypto.Signer, pk crypto.PublicKey, err error)

GenerateFederationSigningKeyPair generates a cryptographic key pair for federation signing with the algorithm specified in the config.

func GenerateMytokenSigningKeyPair added in v0.10.0

func GenerateMytokenSigningKeyPair() (sk crypto.Signer, pk crypto.PublicKey, err error)

GenerateMytokenSigningKeyPair generates a cryptographic key pair for mytoken signing with the algorithm specified in the mytoken config.

func GetJWKS

func GetJWKS(usage KeyUsage) (jwks jwx.JWKS)

GetJWKS returns the jwks

func GetPublicKey

func GetPublicKey(usage KeyUsage) (pk crypto.PublicKey)

GetPublicKey returns the public key

func GetSigningKey added in v0.10.0

func GetSigningKey(usage KeyUsage) (sk crypto.Signer)

GetSigningKey returns the private key

func GetVersatileSigner added in v0.11.0

func GetVersatileSigner(usage KeyUsage) jwx.VersatileSigner

GetVersatileSigner returns a VersatileSigner for the given key usage

func LoadFederationKey added in v0.10.0

func LoadFederationKey()

LoadFederationKey loads the private and public key for signing federation statements

func LoadMytokenSigningKey added in v0.10.0

func LoadMytokenSigningKey()

LoadMytokenSigningKey loads the private and public key for signing mytokens

func LoadOIDCSigningKey added in v0.10.0

func LoadOIDCSigningKey() error

LoadOIDCSigningKey loads the private and public key(s) for signing operations within OIDC communication

Types

type KeyUsage added in v0.10.0

type KeyUsage string

KeyUsage is a type indicating the usage purpose of a key

Jump to

Keyboard shortcuts

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