Documentation ¶
Index ¶
- Constants
- type CreateDIDConfigurationRequest
- type CreateDIDConfigurationResponse
- type DIDConfiguration
- type DIDConfigurationService
- func (s DIDConfigurationService) CreateDIDConfiguration(ctx context.Context, req *CreateDIDConfigurationRequest) (*CreateDIDConfigurationResponse, error)
- func (s DIDConfigurationService) Status() svcframework.Status
- func (s DIDConfigurationService) Type() svcframework.Type
- func (s DIDConfigurationService) VerifyDIDConfiguration(ctx context.Context, req *VerifyDIDConfigurationRequest) (*VerifyDIDConfigurationResponse, error)
- type VerifyDIDConfigurationRequest
- type VerifyDIDConfigurationResponse
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 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 (s DIDConfigurationService) CreateDIDConfiguration(ctx context.Context, req *CreateDIDConfigurationRequest) (*CreateDIDConfigurationResponse, error)
func (DIDConfigurationService) Status ¶
func (s DIDConfigurationService) Status() svcframework.Status
func (DIDConfigurationService) Type ¶
func (s DIDConfigurationService) Type() svcframework.Type
func (DIDConfigurationService) VerifyDIDConfiguration ¶
func (s DIDConfigurationService) VerifyDIDConfiguration(ctx context.Context, req *VerifyDIDConfigurationRequest) (*VerifyDIDConfigurationResponse, error)
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"` }
Click to show internal directories.
Click to hide internal directories.