didconfiguration

package
v0.0.0-...-1a43f7c Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Overview

Package didconfiguration implement didconfiguration service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDIDConfiguration

func CreateDIDConfiguration(domain, didValue string, expiryTime int64,
	signingKeys ...*jose.SigningKey) (*models.DIDConfiguration, error)

CreateDIDConfiguration creates a DID Configuration asserting a given DID's ownership over a given domain

using the given signing keys (which are assumed to belong to the DID)

Implements https://identity.foundation/specs/did-configuration/.

func ValidateDomainLinkageAssertion

func ValidateDomainLinkageAssertion(domain string, assertion models.DomainLinkageAssertion, doc *did.Doc) error

ValidateDomainLinkageAssertion validates a domain linkage assertion, using the given VDRI to resolve the DID.

func VerifyDIDConfiguration

func VerifyDIDConfiguration(domain string, configuration *models.DIDConfiguration, doc *did.Doc) ([]string, error)

VerifyDIDConfiguration verifies a DID configuration, using the given VDRI to resolve the DID.

returns a list of the DIDs that were successfully authenticated to this domain.

func VerifyDIDSignature

func VerifyDIDSignature(jws *jose.JSONWebSignature, doc *did.Doc) ([]byte, error)

VerifyDIDSignature verify a signature using a DID doc.

Types

type Option

type Option func(opts *Service)

Option is a didconfiguration service instance option.

func WithTLSConfig

func WithTLSConfig(tlsConfig *tls.Config) Option

WithTLSConfig option is for definition of secured HTTP transport using a tls.Config instance.

type Service

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

Service fetches and verifies DID-configurations.

func NewService

func NewService(opts ...Option) *Service

NewService create new didconfiguration Service.

func (*Service) VerifyStakeholder

func (s *Service) VerifyStakeholder(domain string, doc *did.Doc) error

VerifyStakeholder verify the DID configuration on a stakeholder server.

Jump to

Keyboard shortcuts

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