operation

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 51 Imported by: 2

Documentation

Index

Constants

View Source
const (
	OIDCCallbackEndpoint = "/callback"
)

API endpoints.

Variables

This section is empty.

Functions

This section is empty.

Types

type AriesContextProvider

type AriesContextProvider interface {
	StorageProvider() storage.Provider
	ProtocolStateStorageProvider() storage.Provider
	VDRegistry() vdrapi.Registry
	KMS() kms.KeyManager
	Crypto() ariescrypto.Crypto
	Service(id string) (interface{}, error)
	ServiceEndpoint() string
	Messenger() service.Messenger
	JSONLDDocumentLoader() ld.DocumentLoader
	KeyAgreementType() kms.KeyType
	KeyType() kms.KeyType
	MediaTypeProfiles() []string
}

AriesContextProvider is the dependency interface for the connection.Recorder.

type Config

type Config struct {
	PresentationExProvider presentationExProvider
	Hydra                  Hydra
	OIDC                   func(string, context.Context) (*oidc.IDToken, error)
	OAuth2Config           OAuth2Config
	UIEndpoint             string
	OOBClient              OOBClient
	OOBV2Client            OOBV2Client
	DIDExchClient          DIDClient
	PublicDIDCreator       PublicDIDCreator
	AriesContextProvider   AriesContextProvider
	PresentProofClient     PresentProofClient
	Storage                *Storage
	AriesMessenger         service.Messenger
	MsgRegistrar           *msghandler.Registrar
	WalletBridgeAppURL     string
	JSONLDDocumentLoader   ld.DocumentLoader
	DidDomain              string
	ExternalURL            string
}

Config defines configuration for rp operations.

type CreateRPTenantRequest

type CreateRPTenantRequest struct {
	Label                string   `json:"label"`
	Callback             string   `json:"callback"`
	Scopes               []string `json:"scopes"`
	RequiresBlindedRoute bool     `json:"requiresBlindedRoute"`
	SupportsWACI         bool     `json:"supportsWACI"`
	LinkedWalletURL      string   `json:"linkedWalletURL"`
	IsDIDCommV1          bool     `json:"isDIDCommV1"`
}

CreateRPTenantRequest API request body to register an RP tenant.

type CreateRPTenantResponse

type CreateRPTenantResponse struct {
	ClientID             string   `json:"clientID"`
	ClientSecret         string   `json:"clientSecret"`
	PublicDID            string   `json:"publicDID"`
	Scopes               []string `json:"scopes"`
	RequiresBlindedRoute bool     `json:"requiresBlindedRoute"`
	SupportsWACI         bool     `json:"supportsWACI"`
	LinkedWalletURL      string   `json:"linkedWalletURL"`
	IsDIDCommV1          bool     `json:"isDIDCommV1"`
}

CreateRPTenantResponse API response body to register an RP tenant.

type DIDClient

type DIDClient interface {
	RegisterActionEvent(chan<- service.DIDCommAction) error
	RegisterMsgEvent(chan<- service.StateMsg) error
	CreateConnection(string, *did.Doc, ...didexchange.ConnectionOption) (string, error)
}

DIDClient is the didexchange Client.

type DIDDocReq added in v0.1.5

type DIDDocReq struct {
	ID   string `json:"@id,omitempty"`
	Type string `json:"@type,omitempty"`
}

DIDDocReq model.

type DIDDocResp added in v0.1.5

type DIDDocResp struct {
	ID   string          `json:"@id,omitempty"`
	Type string          `json:"@type,omitempty"`
	Data *DIDDocRespData `json:"data,omitempty"`
}

DIDDocResp model.

type DIDDocRespData added in v0.1.5

type DIDDocRespData struct {
	ErrorMsg string          `json:"errorMsg,omitempty"`
	DIDDoc   json.RawMessage `json:"didDoc,omitempty"`
}

DIDDocRespData model for error data in DIDDocResp.

type ErrorResp added in v0.1.5

type ErrorResp struct {
	ID   string         `json:"@id,omitempty"`
	Type string         `json:"@type,omitempty"`
	Data *ErrorRespData `json:"data,omitempty"`
}

ErrorResp model.

type ErrorRespData added in v0.1.5

type ErrorRespData struct {
	ErrorMsg string `json:"errorMsg,omitempty"`
}

ErrorRespData model for error data in ErrorResp.

type GetPresentationRequestResponse

type GetPresentationRequestResponse struct {
	PD             *presexch.PresentationDefinition `json:"pd,omitempty"`
	Inv            *wallet.GenericInvitation        `json:"invitation"`
	Credentials    []json.RawMessage                `json:"credentials,omitempty"`
	WACI           bool                             `json:"waci,omitempty"`
	WalletRedirect string                           `json:"walletRedirect,omitempty"`
}

GetPresentationRequestResponse API response of getPresentationRequest.

type HandleCHAPIResponse

type HandleCHAPIResponse struct {
	InvitationID           string          `json:"invID"`
	VerifiablePresentation json.RawMessage `json:"vp"`
}

HandleCHAPIResponse is the input message to the chapiResponseHandler handler.

type HandleCHAPIResponseResult

type HandleCHAPIResponseResult struct {
	RedirectURL string `json:"redirectURL"`
}

HandleCHAPIResponseResult is the body of the response to a HandleCHAPIResponse request.

type Hydra

Hydra is the client used to interface with the Hydra service.

type OAuth2Config

type OAuth2Config interface {
	ClientID() string
	AuthCodeURL(string) string
}

OAuth2Config is an OAuth2 client.

type OOBClient

type OOBClient interface {
	CreateInvitation([]interface{}, ...outofband.MessageOption) (*outofband.Invitation, error)
}

OOBClient is the aries framework OutOfBand client.

type OOBV2Client added in v0.1.8

type OOBV2Client interface {
	CreateInvitation(opts ...outofbandv2.MessageOption) (*oobv2svc.Invitation, error)
}

OOBV2Client is the aries framework OutOfBand V2 client.

type Operation

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

Operation defines handlers for rp operations.

func New

func New(config *Config) (*Operation, error)

New returns CreateCredential instance.

func (*Operation) GetRESTHandlers

func (o *Operation) GetRESTHandlers() []restapi.Handler

GetRESTHandlers get all controller API handler available for this service.

type PresentProofClient

type PresentProofClient interface {
	service.Event
	SendRequestPresentation(*presentproof.RequestPresentation, *connection.Record) (string, error)
}

PresentProofClient is the aries framework's presentproof.Client.

type PublicDIDCreator

type PublicDIDCreator interface {
	Create() (*did.Doc, error)
	CreateV2() (*did.Doc, error)
}

PublicDIDCreator creates public DIDs.

type Storage

type Storage struct {
	Persistent storage.Provider
	Transient  storage.Provider
}

Storage config.

Jump to

Keyboard shortcuts

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