vcclient

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: BSD-2-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidRequest is returned when the request is invalid
	ErrInvalidRequest = errors.New("invalid request")

	// ErrNotAllowedRequest is returned when the request is not allowed
	ErrNotAllowedRequest = errors.New("not allowed request")
)

Functions

This section is empty.

Types

type APIGWClient

type APIGWClient struct {
	Document *documentHandler
	Identity *identityHandler
	Root     *rootHandler
	OAuth    *oauthHandler
	User     *userHandler
	// contains filtered or unexported fields
}

APIGWClient handles all APIGW endpoints

type AddPIDRequest

type AddPIDRequest struct {
	Username string          `json:"username" validate:"required,max=128,printascii"`
	Password string          `json:"password" validate:"required,max=128,printascii"`
	Identity *model.Identity `json:"identity,omitempty" validate:"required"`
	Meta     *model.MetaData `json:"meta,omitempty" validate:"required"`
}

type Client

type Client struct {
	APIGW    *APIGWClient
	MockAS   *MockASClient
	Verifier *VerifierClient
	// contains filtered or unexported fields
}

Client is the client

func New

func New(config *Config, log *logger.Log) (*Client, error)

New creates a new client

type Config

type Config struct {
	ApigwURL    string `validate:""`
	MockASURL   string `validate:""`
	VerifierURL string `validate:""`
}

Config is the configuration for the client

type DocumentCollectIDQuery

type DocumentCollectIDQuery struct {
	AuthenticSource string          `json:"authentic_source"`
	VCT             string          `json:"vct"`
	CollectID       string          `json:"collect_id"`
	Identity        *model.Identity `json:"identity"`
}

DocumentCollectIDQuery is the query for CollectID

type DocumentCollectIDReply

type DocumentCollectIDReply struct {
	DocumentData any `json:"document_data"`
}

DocumentCollectIDReply is the reply for CollectID

type DocumentDeleteQuery

type DocumentDeleteQuery struct {
	AuthenticSource string `json:"authentic_source" validate:"required"`
	VCT             string `json:"vct" validate:"required"`
	DocumentID      string `json:"document_id" validate:"required"`
}

DocumentDeleteQuery is the query for Delete

type DocumentGetQuery

type DocumentGetQuery struct {
	AuthenticSource string `json:"authentic_source"`
	VCT             string `json:"vct"`
	DocumentID      string `json:"document_id"`
}

DocumentGetQuery is the query for GetDocument

type DocumentListQuery

type DocumentListQuery struct {
	AuthenticSource string          `json:"authentic_source"`
	Identity        *model.Identity `json:"identity"`
	VCT             string          `json:"vct"`
	ValidTo         int64           `json:"valid_to"`
	ValidFrom       int64           `json:"valid_from"`
}

DocumentListQuery is the query for ListDocument

type GetPIDReply

type GetPIDReply struct {
	Identity *model.Identity `json:"identity,omitempty"`
}

type GetPIDRequest

type GetPIDRequest struct {
	Username string `json:"username" form:"username" validate:"required,max=128,printascii"`
}

type IdentityMappingQuery

type IdentityMappingQuery struct {
	AuthenticSource string          `json:"authentic_source"`
	Identity        *model.Identity `json:"identity"`
}

IdentityMappingQuery is the query for IdentityMapping

type LoginPIDUserRequest

type LoginPIDUserRequest struct {
	Username string `json:"username" form:"username" validate:"required,max=128,printascii"`
	Password string `json:"password" form:"password" validate:"required,max=128,printascii"`

	// RequestURI comes from session cookie
	RequestURI string `json:"-" validate:"omitempty,max=128,printascii"`
}

type MockASClient

type MockASClient struct {
	Root *mockasRootHandler
	Mock *mockHandler
	// contains filtered or unexported fields
}

MockASClient handles MockAS endpoints

type MockBulkReply

type MockBulkReply struct {
	DocumentIDS []string `json:"document_ids"`
}

MockBulkReply is the reply for MockBulk

type MockBulkRequest

type MockBulkRequest struct {
	MockNextRequest
	N int `form:"n" json:"n"`
}

MockBulkRequest is the request for MockBulk

type MockNextReply

type MockNextReply struct {
	Upload map[string]any `json:"upload"`
}

MockNextReply is the reply for MockNext

type MockNextRequest

type MockNextRequest struct {
	VCT                     string `json:"vct"`
	DocumentID              string `json:"document_id"`
	AuthenticSource         string `json:"authentic_source"`
	AuthenticSourcePersonID string `json:"authentic_source_person_id"`
	GivenName               string `json:"given_name"`
	FamilyName              string `json:"family_name"`
	BirthDate               string `json:"birth_date"`
	CollectID               string `json:"collect_id"`
	IdentitySchemaName      string `json:"identity_schema_name"`
}

MockNextRequest is the request for MockNext

type NotificationReply

type NotificationReply struct {
	Data *openid4vci.QR `json:"data"`
}

NotificationReply is the reply for Notification

type NotificationRequest

type NotificationRequest struct {
	AuthenticSource string `json:"authentic_source" validate:"required"`
	VCT             string `json:"vct" validate:"required"`
	DocumentID      string `json:"document_id" validate:"required"`
}

NotificationRequest is the request for Notification

type SVGClaim

type SVGClaim struct {
	Label string `json:"label"`
	Value string `json:"value"`
}

type SVGTemplateReply

type SVGTemplateReply struct {
	Template string `json:"template"`
}

SVGTemplateReply holds SVG template data.

type UploadRequest

type UploadRequest struct {
	Meta                *model.MetaData        `json:"meta" validate:"required"`
	Identities          []model.Identity       `json:"identities,omitempty" validate:"dive"`
	DocumentDisplay     *model.DocumentDisplay `json:"document_display,omitempty"`
	DocumentData        map[string]any         `json:"document_data" validate:"required"`
	DocumentDataVersion string                 `json:"document_data_version,omitempty" validate:"required,semver"`
}

type UserAuthenticSourceLookupReply

type UserAuthenticSourceLookupReply struct {
	AuthenticSources []string `json:"authentic_sources,omitempty" validate:"omitempty,dive,max=128,printascii"`
}

type UserAuthenticSourceLookupRequest

type UserAuthenticSourceLookupRequest struct {
	AuthenticSource string `json:"authentic_source,omitempty" validate:"omitempty,max=128,printascii"`
	SessionID       string `json:"-"`
}

type UserLookupReply

type UserLookupReply struct {
	SVGTemplateClaims map[string]SVGClaim `json:"svg_template_claims,omitempty"`
	RedirectURL       string              `json:"redirect_url,omitempty"`
}

type UserLookupRequest

type UserLookupRequest struct {
	Username     string        `json:"-"`
	AuthMethod   string        `json:"-"`
	ResponseCode string        `json:"-"`
	RequestURI   string        `json:"-" validate:"omitempty,max=128,printascii"`
	VCTM         *sdjwtvc.VCTM `json:"-"`
}

type VerifierClient

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

VerifierClient handles Verifier endpoints

func (*VerifierClient) Health

Health checks the health of the Verifier service

Jump to

Keyboard shortcuts

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