jws

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyUsageMytokenSigning = KeyUsage("MT signing")
	KeyUsageFederation     = KeyUsage("oidcfed")
	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 GenerateOIDCSigningKeyPair added in v0.10.0

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

GenerateOIDCSigningKeyPair generates a cryptographic key pair for jwt signing within oidc communication with the algorithm specified in the mytoken config.

func GetJWKS

func GetJWKS(usage KeyUsage) (jwks jwk.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 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()

LoadOIDCSigningKey loads the private and public key for signing operations within oidc communcation

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