test

package
v6.2.12 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateJSONLDPresentation

func CreateJSONLDPresentation(t *testing.T, subjectDID did.DID, visitor func(presentation *vc.VerifiablePresentation), verifiableCredential ...vc.VerifiableCredential) vc.VerifiablePresentation

CreateJSONLDPresentation creates a JSON-LD presentation with the given subject DID and credentials. The presentation is not actually signed.

func CreateJWTPresentation

func CreateJWTPresentation(t *testing.T, subjectDID did.DID, tokenVisitor func(token jwt.Token), credentials ...vc.VerifiableCredential) (vc.VerifiablePresentation, crypto.PublicKey)

CreateJWTPresentation creates a JWT presentation with the given subject DID and credentials.

func JWTNutsOrganizationCredential

func JWTNutsOrganizationCredential(t *testing.T, subjectID did.DID) vc.VerifiableCredential

func LDProofVisitor

func LDProofVisitor(visitor func(proof *proof.LDProof)) func(*vc.VerifiablePresentation)

LDProofVisitor is a util function that creates a visitor for CreateJSONLDPresentation to easily modify the LinkedData proof.

func ParsePresentation

func ParsePresentation(t *testing.T, presentation vc.VerifiablePresentation) vc.VerifiablePresentation

ParsePresentation marshals the given presentation and parses it again, to make sure the format property is set correctly.

func ValidNutsAuthorizationCredential

func ValidNutsAuthorizationCredential(t testing.TB) vc.VerifiableCredential

func ValidNutsOrganizationCredential

func ValidNutsOrganizationCredential(t *testing.T) vc.VerifiableCredential

func ValidStatusList2021Credential

func ValidStatusList2021Credential(t testing.TB) vc.VerifiableCredential

func ValidX509Credential

func ValidX509Credential(t *testing.T, options ...credentialOption) vc.VerifiableCredential

Types

This section is empty.

Jump to

Keyboard shortcuts

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