refresh

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ServiceComponent = "RefreshService"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	VcsAPIURL              string
	TxStore                transactionStore1
	ClaimsStore            claimDataStore
	DataProtector          dataProtector
	PresentationVerifier   presentationVerifier
	CredentialIssuer       credentialIssuer
	IssueCredentialService IssueCredService
	EventPublisher         EventPublisher
	EventTopic             string
}

type CreateRefreshStateRequest

type CreateRefreshStateRequest struct {
	CredentialID string
	Issuer       profile.Issuer
	Claims       map[string]interface{}

	CredentialName        *string
	CredentialDescription *string
}

type Event

type Event struct {
	WebHook        string `json:"webHook,omitempty"`
	ProfileID      string `json:"profileID,omitempty"`
	ProfileVersion string `json:"profileVersion,omitempty"`
	OrgID          string `json:"orgID,omitempty"`

	Error          string `json:"error,omitempty"`
	ErrorCode      string `json:"errorCode,omitempty"`
	ErrorComponent string `json:"errorComponent,omitempty"`
}

type EventPublisher

type EventPublisher interface {
	Publish(ctx context.Context, topic string, messages ...*spi.Event) error
}

type GetRefreshStateResponse

type GetRefreshStateResponse struct {
	VerifiablePresentationRequest VerifiablePresentationRequest `json:"verifiablePresentationRequest"`
	Challenge                     string                        `json:"challenge"`
	Domain                        string                        `json:"domain"`
	RefreshServiceType            ServiceType                   `json:"refreshServiceType"`
}

type GetRefreshedCredentialResponse

type GetRefreshedCredentialResponse struct {
	Credential *verifiable.Credential
	IssuerURL  string
}

type Interact

type Interact struct {
	Interact []InteractService `json:"interact"`
}

type InteractService

type InteractService struct {
	Type            string `json:"type"`
	ServiceEndpoint string `json:"serviceEndpoint"`
}

type IssueCredService

type IssueCredService interface {
	IssueCredential(
		ctx context.Context,
		credential *verifiable.Credential,
		profile *profileapi.Issuer,
		opts ...issuecredential.Opts,
	) (*verifiable.Credential, error)
}

type Service

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

func NewRefreshService

func NewRefreshService(cfg *Config) *Service

func (*Service) CreateRefreshState

func (s *Service) CreateRefreshState(
	ctx context.Context,
	req *CreateRefreshStateRequest,
) (string, error)

func (*Service) GetRefreshedCredential

func (s *Service) GetRefreshedCredential(
	ctx context.Context,
	presentation *verifiable.Presentation,
	issuer profile.Issuer,
) (*GetRefreshedCredentialResponse, error)

func (*Service) RequestRefreshStatus

func (s *Service) RequestRefreshStatus(
	ctx context.Context,
	credentialID string,
	issuer profile.Issuer,
) (*GetRefreshStateResponse, error)

type ServiceType

type ServiceType struct {
	Type string `json:"type"`
	URL  string `json:"url"`
}

type VerifiablePresentationRequest

type VerifiablePresentationRequest struct {
	Query presexch.PresentationDefinition `json:"query"`
}

Jump to

Keyboard shortcuts

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