wellknown

package
v0.0.0-...-0fc66b4 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DIDConfigurationContext        = "https://identity.foundation/.well-known/did-configuration/v1"
	DIDConfigurationLocationSuffix = "/.well-known/did-configuration.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateDIDConfigurationRequest

type CreateDIDConfigurationRequest struct {
	IssuerDID            string
	VerificationMethodID string
	Origin               string

	ExpirationDate string

	// When empty, now will be used.
	IssuanceDate string
}

type CreateDIDConfigurationResponse

type CreateDIDConfigurationResponse struct {
	// The DID Configuration Resource value to host.
	DIDConfiguration DIDConfiguration `json:"didConfiguration"`

	// URL where the `didConfiguration` value should be hosted at.
	WellKnownLocation string `json:"wellKnownLocation"`
}

type DIDConfiguration

type DIDConfiguration struct {
	Context    any                    `json:"@context" validate:"required"`
	LinkedDIDs []credential.Container `json:"linked_dids" validate:"required"`
}

func (*DIDConfiguration) UnmarshalJSON

func (c *DIDConfiguration) UnmarshalJSON(data []byte) error

type DIDConfigurationService

type DIDConfigurationService struct {
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

func NewDIDConfigurationService

func NewDIDConfigurationService(keyStoreService *keystore.Service, didResolver resolution.Resolver, schema *schema.Service) (*DIDConfigurationService, error)

func (DIDConfigurationService) CreateDIDConfiguration

func (DIDConfigurationService) Status

func (DIDConfigurationService) Type

func (DIDConfigurationService) VerifyDIDConfiguration

type VerifyDIDConfigurationRequest

type VerifyDIDConfigurationRequest struct {
	// Represents an origin to fetch the DID Configuration Resource from. Must be serialized as described in https://html.spec.whatwg.org/multipage/browsers.html#origin.
	// The `scheme` MUST be `https`.
	Origin string `json:"origin" validate:"required" example:"https://example.com"`
}

type VerifyDIDConfigurationResponse

type VerifyDIDConfigurationResponse struct {
	// Whether the DIDConfiguration was verified.
	Verified bool `json:"verified"`

	// The configuration that was fetched from the origin's well known location.
	DIDConfiguration string `json:"didConfiguration"`

	// When Verified == false, the reason why it wasn't verified.
	Reason string `json:"reason,omitempty"`
}

Jump to

Keyboard shortcuts

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