operation

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 39 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() ariesstorage.Provider
	ProtocolStateStorageProvider() ariesstorage.Provider
	VDRIRegistry() vdri.Registry
	KMS() kms.KeyManager
	Crypto() ariescrypto.Crypto
}

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
	DIDExchClient          DIDClient
	PublicDIDCreator       PublicDIDCreator
	AriesContextProvider   AriesContextProvider
	PresentProofClient     PresentProofClient
	Storage                *Storage
	GovernanceProvider     GovernanceProvider
}

Config defines configuration for rp operations.

type CreateRPTenantRequest

type CreateRPTenantRequest struct {
	Label    string   `json:"label"`
	Callback string   `json:"callback"`
	Scopes   []string `json:"scopes"`
}

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"`
}

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 GetPresentationRequestResponse

type GetPresentationRequestResponse struct {
	PD                   *presexch.PresentationDefinitions `json:"pd"`
	Inv                  *outofband.Invitation             `json:"invitation"`
	Credentials          []json.RawMessage                 `json:"credentials,omitempty"`
	CredentialGovernance json.RawMessage                   `json:"credentialGovernance,omitempty"`
}

GetPresentationRequestResponse API response of getPresentationRequest.

type GovernanceProvider

type GovernanceProvider interface {
	IssueCredential(didID, profileID string) ([]byte, error)
	GetCredential(profileID string) ([]byte, error)
}

GovernanceProvider governance provider.

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 Handler

type Handler interface {
	Path() string
	Method() string
	Handle() http.HandlerFunc
}

Handler http handler for each controller API endpoint.

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([]string, ...outofband.MessageOption) (*outofband.Invitation, error)
}

OOBClient is the aries framework OutOfBand 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() []Handler

GetRESTHandlers get all controller API handler available for this service.

type PresentProofClient

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

PresentProofClient is the aries framework's presentproof.Client.

type PublicDIDCreator

type PublicDIDCreator interface {
	Create() (*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