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 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 SignParameters ¶
type SignParameters struct { KeyID string CWTAlg cose.Algorithm }
SignParameters contains parameters of signing for cwt vc.
Click to show internal directories.
Click to hide internal directories.