verifycredential

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	VCStatusProcessorGetter vc.StatusProcessorGetter
	StatusListVCResolver    statusListVCURIResolver
	DocumentLoader          ld.DocumentLoader
	VDR                     vdrapi.Registry
	HTTPClient              httpClient
}

type CredentialsVerificationCheckResult

type CredentialsVerificationCheckResult struct {
	Check              string
	Error              string
	VerificationMethod string
}

CredentialsVerificationCheckResult resp containing failure check details.

type Options

type Options struct {
	// Challenge is added to the proof.
	Challenge string

	// Domain is added to the proof.
	Domain string
}

Options represents options for verify credential.

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(config *Config) *Service

func (*Service) ValidateCredentialProof

func (s *Service) ValidateCredentialProof(_ context.Context, credential *verifiable.Credential, proofChallenge,
	proofDomain string, vcInVPValidation, strictValidation bool) error

ValidateCredentialProof validate credential proof.

func (*Service) ValidateLinkedDomain

func (s *Service) ValidateLinkedDomain(_ context.Context, signingDID string) error

func (*Service) ValidateVCStatus

func (s *Service) ValidateVCStatus(ctx context.Context, vcStatus *verifiable.TypedID,
	issuer *verifiable.Issuer) error

func (*Service) VerifyCredential

func (s *Service) VerifyCredential(ctx context.Context, credential *verifiable.Credential, opts *Options,
	profile *profileapi.Verifier) ([]CredentialsVerificationCheckResult, error)

type ServiceInterface

type ServiceInterface interface {
	VerifyCredential(
		ctx context.Context,
		credential *verifiable.Credential,
		opts *Options,
		profile *profileapi.Verifier,
	) ([]CredentialsVerificationCheckResult, error)

	ValidateCredentialProof(
		ctx context.Context,
		credential *verifiable.Credential,
		proofChallenge, proofDomain string,
		vcInVPValidation bool,
		strictValidation bool,
	) error

	ValidateVCStatus(ctx context.Context, vcStatus *verifiable.TypedID, issuer *verifiable.Issuer) error

	ValidateLinkedDomain(ctx context.Context, signingDID string) error
}

Jump to

Keyboard shortcuts

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