wellknown

package
v0.0.0-...-e11dbd8 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2022 License: Apache-2.0, Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONTEXT_DID_WELL_KNOWN_CONFIG     = "https://identity.foundation/.well-known/did-configuration/v1"
	CONTEXT_DOMAIN_LINKAGE_CREDENTIAL = "https://www.w3.org/2018/credentials/v1"
)

Variables

This section is empty.

Functions

func Start

func Start()

Types

type CredentialSubject

type CredentialSubject struct {
	ID     string `json:"id"`
	Origin string `json:"origin"`
}

type DIDWellKnownConfiguration

type DIDWellKnownConfiguration struct {
	Context    string                    `json:"@context"`
	LinkedDIDs []DomainLinkageCredential `json:"linked_dids"`
}

type DomainLinkageCredential

type DomainLinkageCredential struct {
	Context        []string          `json:"@context"`
	Issuer         string            `json:"issuer"`
	IssuanceDate   string            `json:"issuanceDate"`
	ExpirationDate string            `json:"expirationDate"`
	Type           []string          `json:"type"`
	Subject        CredentialSubject `json:"credentialSubject"`
	Proof          Proof             `json:"proof"`
}

type FairXWellKnownConfiguration

type FairXWellKnownConfiguration struct {
	DecentralizedWebNodes []string `json:"dwn_nodes"`
	DIDService            []string `json:"did_service"`
	Proof                 Proof    `json:"proof"`
}

type HTTPService

type HTTPService struct {
	ListenAddr string
	ListenPort int
	Router     *mux.Router
	Domain     string
}

func CreateHTTPService

func CreateHTTPService(addr string, port int, jwtKey string) *HTTPService

func (*HTTPService) ListenAndServe

func (svc *HTTPService) ListenAndServe() error

func (*HTTPService) ServeDIDWellKnownConfig

func (svc *HTTPService) ServeDIDWellKnownConfig(w http.ResponseWriter, r *http.Request)

func (*HTTPService) ServeFairXWellKnownConfig

func (svc *HTTPService) ServeFairXWellKnownConfig(w http.ResponseWriter, r *http.Request)

type Proof

type Proof struct {
	Type               string `json:"type"`
	Created            string `json:"created"`
	JWS                string `json:"jws"`
	ProofPurpose       string `json:"proofPurpose"`
	VerificationMethod string `json:"verificationMethod"`
}

Jump to

Keyboard shortcuts

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