Documentation ¶
Index ¶
- func CheckProof(message *cose.Sign1Message, proofChecker ProofChecker, ...) error
- func Parse(cwtSerialized []byte) (*cose.Sign1Message, error)
- func ParseAndCheckProof(cwtSerialized []byte, proofChecker ProofChecker, checkIssuer bool) (*cose.Sign1Message, []byte, error)
- type ProofChecker
- type ProofCreator
- type SignParameters
- type Verifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckProof ¶
func CheckProof( message *cose.Sign1Message, proofChecker ProofChecker, expectedProofIssuer *string, msg []byte, signature []byte, ) error
CheckProof checks that jwt have correct signature.
func ParseAndCheckProof ¶
func ParseAndCheckProof( cwtSerialized []byte, proofChecker ProofChecker, checkIssuer bool, ) (*cose.Sign1Message, []byte, error)
ParseAndCheckProof parses input JWT in serialized form into JSON Web Token and check signature proof. if checkIssuer set to true, will check if issuer set by "iss" own key set by "kid" header.
Types ¶
type ProofChecker ¶
type ProofChecker interface { CheckCWTProof( checkCWTRequest checker.CheckCWTProofRequest, expectedProofIssuer string, msg []byte, signature []byte, ) error }
ProofChecker used to check proof of jwt vc.
type ProofCreator ¶ added in v1.2.0
type ProofCreator interface {
SignCWT(params SignParameters, cborData []byte) ([]byte, error)
}
ProofCreator defines signer interface which is used to sign VC JWT.
type SignParameters ¶
type SignParameters struct { KeyID string CWTAlg cose.Algorithm }
SignParameters contains parameters of signing for cwt vc.
type Verifier ¶
type Verifier struct { ProofChecker ProofChecker // contains filtered or unexported fields }
Verifier verifies CWT proof.
Click to show internal directories.
Click to hide internal directories.