service

package
v0.0.0-...-46352cc Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2022 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CheckIds          = "matchingIds"
	CheckSubject      = "uniqueSubject"
	CheckSubmission   = "submission"
	CheckConstraints  = "constraints"
	CheckRequirements = "submissionRequirements"
	CheckPresentation = "presentationProof"
	CheckCredential   = "credentialProof"
	CheckStatus       = "credentialStatus"
	CheckContext      = "context"
	CheckSchema       = "credentialSchema"
	CheckIssuer       = "issuer"
	CheckIdentity     = "identityVerification"
)
View Source
const RouteResolver = "/identifiers/"

Variables

This section is empty.

Functions

func ValidateJSONSchema

func ValidateJSONSchema(maybeSchema models.JSONSchemaMap) error

Types

type DidService

type DidService interface {
	GetDID(ctx echo.Context, did string) (*models.DIDDocument, error)
	CreateDID(ctx echo.Context, did *models.DIDDocument) error
	UpdateDID(ctx echo.Context, did *models.DIDDocument) error
	RevokeDID(ctx echo.Context, did *models.DIDDocument) error
}

func NewUniversalDidService

func NewUniversalDidService(timeout time.Duration, universalUrl string) DidService

NewDidService

type GovernanceService

type GovernanceService interface {
	GetTrustedIssuersForSchemas(ctx echo.Context, credentialType string, schemasOrContexts []string) ([]models.TrustedIssuer, error)
}

type JSONValidator

type JSONValidator interface {
	Validate(document models.JSONSchema) error
	ValidateWithRef(document models.JSONSchema, ref string) error
	ValidateStrings(schema, document string) error
}

type SSIService

type SSIService interface {
	ValidateLdContext(ctx echo.Context, ldv models.LdContext) (string, error)

	SignCredential(ctx echo.Context, vc *models.VerifiableCredential, vm string, proofType string) error
	SignQualifiedCredential(ctx echo.Context, vc *models.VerifiableCredential, vm string) error
	VerifyCredential(ctx echo.Context, vc *models.VerifiableCredential, requester string, sbx bool) (int, error)

	SignPresentation(ctx echo.Context, vc *models.VerifiablePresentation, vmethod string) error
	VerifyPresentation(ctx echo.Context, fc *models.VerifiablePresentation, requester string) error

	SignDataAgreement(ctx echo.Context, da *models.DataAgreement, vmethod string) error
	VerifyDataAgreement(ctx echo.Context, da *models.DataAgreement, requester string) error

	SignPresentationDefinition(ctx echo.Context, pd *models.PresentationDefinition, vmethod string) error
	VerifyPresentationDefinition(ctx echo.Context, pd *models.PresentationDefinition, requester string) error

	VerifyDIDDocument(ctx echo.Context, fc *models.DIDDocument, vmethods []*models.PublicKey) error
	SignDIDDocument(ctx echo.Context, fc *models.DIDDocument, vmethod string) error
}

type Validator

type Validator interface {
	ValidatePresentationResponse(ctx echo.Context, pr models.ExchangeRequest, resp models.ExchangeResponse, requesterVMethod string) (*models.VerificationResult, error)
}

func NewDIFValidatorService

func NewDIFValidatorService(ssiService SSIService) Validator

TODO Parallelize processment

type ValidatorServiceDIF

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

func (*ValidatorServiceDIF) ValidatePresentationResponse

func (vs *ValidatorServiceDIF) ValidatePresentationResponse(ctx echo.Context, preq models.ExchangeRequest, presp models.ExchangeResponse, requesterVMethod string) (*models.VerificationResult, error)

Jump to

Keyboard shortcuts

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