Documentation
¶
Overview ¶
Package verifier provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.
Index ¶
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type CheckAuthorizationResponseFormdataBody
- type CheckAuthorizationResponseFormdataRequestBody
- type Config
- type Controller
- func (c *Controller) CheckAuthorizationResponse(e echo.Context) error
- func (c *Controller) InitiateOidcInteraction(e echo.Context, profileID, profileVersion string) error
- func (c *Controller) PostVerifyCredentials(e echo.Context, profileID, profileVersion string) error
- func (c *Controller) PostVerifyPresentation(e echo.Context, profileID, profileVersion string) error
- func (c *Controller) RetrieveInteractionsClaim(e echo.Context, txID string) error
- type EchoRouter
- type IDTokenClaims
- type InitiateOIDC4VPData
- type InitiateOIDC4VPResponse
- type InitiateOidcInteractionJSONRequestBody
- type PostVerifyCredentialsJSONRequestBody
- type PostVerifyPresentationJSONRequestBody
- type PresentationDefinition
- type PresentationDefinitionFilters
- type PresentationDynamicFilters
- type PresentationResult
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) CheckAuthorizationResponse(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) InitiateOidcInteraction(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) PostVerifyCredentials(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) PostVerifyPresentation(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) RetrieveInteractionsClaim(ctx echo.Context) error
- type VPTokenClaims
- type VerifyCredentialCheckResult
- type VerifyCredentialData
- type VerifyCredentialOptions
- type VerifyCredentialResponse
- type VerifyPresentationData
- type VerifyPresentationOptions
- type VerifyPresentationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHandlers ¶
func RegisterHandlers(router EchoRouter, si ServerInterface)
RegisterHandlers adds each server route to the EchoRouter.
func RegisterHandlersWithBaseURL ¶
func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.
Types ¶
type CheckAuthorizationResponseFormdataBody ¶ added in v1.12.1
type CheckAuthorizationResponseFormdataBody struct {
// Error Authorization response error code
Error *string `form:"error" json:"error"`
// ErrorDescription Authorization response error description
ErrorDescription *string `form:"error_description" json:"error_description"`
// IdToken ID Token serves as an authentication receipt and includes metadata about the VP Token.
IdToken *string `form:"id_token" json:"id_token"`
// State State from authorization request for correlation
State *string `form:"state,omitempty" json:"state,omitempty"`
// VpToken VP Token includes one or more Verifiable Presentations.
VpToken *string `form:"vp_token" json:"vp_token"`
}
CheckAuthorizationResponseFormdataBody defines parameters for CheckAuthorizationResponse.
type CheckAuthorizationResponseFormdataRequestBody ¶ added in v1.12.1
type CheckAuthorizationResponseFormdataRequestBody CheckAuthorizationResponseFormdataBody
CheckAuthorizationResponseFormdataRequestBody defines body for CheckAuthorizationResponse for application/x-www-form-urlencoded ContentType.
type Config ¶
type Config struct {
VerifyCredentialSvc verifyCredentialSvc
VerifyPresentationSvc verifyPresentationSvc
ProfileSvc profileService
KMSRegistry kmsRegistry
DocumentLoader ld.DocumentLoader
VDR vdrapi.Registry
OIDCVPService oidc4VPService
ProofChecker verifiable.CombinedProofChecker
Metrics metricsProvider
Tracer trace.Tracer
EventSvc eventService
EventTopic string
DataIntegrityVerifier *dataintegrity.Verifier
}
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller for Verifier Profile Management API.
func NewController ¶
func NewController(config *Config) *Controller
NewController creates a new controller for Verifier Profile Management API.
func (*Controller) CheckAuthorizationResponse ¶
func (c *Controller) CheckAuthorizationResponse(e echo.Context) error
CheckAuthorizationResponse is used by verifier applications to verify credentials. (POST /verifier/interactions/authorization-response).
func (*Controller) InitiateOidcInteraction ¶
func (c *Controller) InitiateOidcInteraction(e echo.Context, profileID, profileVersion string) error
InitiateOidcInteraction initiates OpenID presentation flow through VCS. POST /verifier/profiles/{profileID}/{profileVersion}/interactions/initiate-oidc.
func (*Controller) PostVerifyCredentials ¶
func (c *Controller) PostVerifyCredentials(e echo.Context, profileID, profileVersion string) error
PostVerifyCredentials Verify credential (POST /verifier/profiles/{profileID}/{profileVersion}/credentials/verify).
func (*Controller) PostVerifyPresentation ¶
func (c *Controller) PostVerifyPresentation(e echo.Context, profileID, profileVersion string) error
PostVerifyPresentation Verify presentation. (POST /verifier/profiles/{profileID}/{profileVersion}/presentations/verify).
func (*Controller) RetrieveInteractionsClaim ¶
func (c *Controller) RetrieveInteractionsClaim(e echo.Context, txID string) error
RetrieveInteractionsClaim is used by verifier applications to get claims obtained during oidc4vp interaction. (GET /verifier/interactions/{txID}/claim).
type EchoRouter ¶
type EchoRouter interface {
CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}
This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration
type IDTokenClaims ¶
type IDTokenClaims struct {
// CustomScopeClaims stores claims retrieved using custom scope.
CustomScopeClaims map[string]oidc4vp.Claims `json:"_scope,omitempty"`
AttestationVP string `json:"_attestation_vp"`
Nonce string `json:"nonce"`
Aud string `json:"aud"`
Exp int64 `json:"exp"`
Attachments map[string]string `json:"_attachments"`
}
type InitiateOIDC4VPData ¶
type InitiateOIDC4VPData struct {
CustomURLScheme *string `json:"customURLScheme,omitempty"`
DynamicPresentationFilters *PresentationDynamicFilters `json:"dynamicPresentationFilters,omitempty"`
PresentationDefinitionFilters *PresentationDefinitionFilters `json:"presentationDefinitionFilters,omitempty"`
PresentationDefinitionId *string `json:"presentationDefinitionId,omitempty"`
Purpose *string `json:"purpose,omitempty"`
// Scopes List of custom scopes that defines additional claims requested from Holder to Verifier.
Scopes *[]string `json:"scopes,omitempty"`
}
InitiateOIDC4VPData defines model for InitiateOIDC4VPData.
type InitiateOIDC4VPResponse ¶
type InitiateOIDC4VPResponse struct {
AuthorizationRequest string `json:"authorizationRequest"`
TxID string `json:"txID"`
}
InitiateOIDC4VPResponse defines model for InitiateOIDC4VPResponse.
type InitiateOidcInteractionJSONRequestBody ¶
type InitiateOidcInteractionJSONRequestBody = InitiateOIDC4VPData
InitiateOidcInteractionJSONRequestBody defines body for InitiateOidcInteraction for application/json ContentType.
type PostVerifyCredentialsJSONRequestBody ¶
type PostVerifyCredentialsJSONRequestBody = VerifyCredentialData
PostVerifyCredentialsJSONRequestBody defines body for PostVerifyCredentials for application/json ContentType.
type PostVerifyPresentationJSONRequestBody ¶
type PostVerifyPresentationJSONRequestBody = VerifyPresentationData
PostVerifyPresentationJSONRequestBody defines body for PostVerifyPresentation for application/json ContentType.
type PresentationDefinition ¶
type PresentationDefinition = json.RawMessage
type PresentationDefinitionFilters ¶
type PresentationDefinitionFilters struct {
Fields *[]string `json:"fields,omitempty"`
}
PresentationDefinitionFilters defines model for PresentationDefinitionFilters.
type PresentationDynamicFilters ¶ added in v1.12.0
type PresentationDynamicFilters struct {
// Context List of @contexts of the VC.
Context *[]string `json:"context,omitempty"`
// Type VC type.
Type *string `json:"type,omitempty"`
}
PresentationDynamicFilters defines model for PresentationDynamicFilters.
type PresentationResult ¶ added in v1.12.0
type PresentationResult struct {
// Verified Presentation verification result.
Verified bool `json:"verified"`
}
PresentationResult Presentation result.
type ServerInterface ¶
type ServerInterface interface {
// Used by verifier applications to initiate OpenID presentation flow through VCS
// (POST /verifier/interactions/authorization-response)
CheckAuthorizationResponse(ctx echo.Context) error
// Used by verifier applications to get claims obtained during oidc4vp interaction.
// (GET /verifier/interactions/{txID}/claim)
RetrieveInteractionsClaim(ctx echo.Context, txid string) error
// Verify credential
// (POST /verifier/profiles/{profileID}/{profileVersion}/credentials/verify)
PostVerifyCredentials(ctx echo.Context, profileID string, profileVersion string) error
// Used by verifier applications to initiate OpenID presentation flow through VCS
// (POST /verifier/profiles/{profileID}/{profileVersion}/interactions/initiate-oidc)
InitiateOidcInteraction(ctx echo.Context, profileID string, profileVersion string) error
// Verify presentation
// (POST /verifier/profiles/{profileID}/{profileVersion}/presentations/verify)
PostVerifyPresentation(ctx echo.Context, profileID string, profileVersion string) error
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) CheckAuthorizationResponse ¶
func (w *ServerInterfaceWrapper) CheckAuthorizationResponse(ctx echo.Context) error
CheckAuthorizationResponse converts echo context to params.
func (*ServerInterfaceWrapper) InitiateOidcInteraction ¶
func (w *ServerInterfaceWrapper) InitiateOidcInteraction(ctx echo.Context) error
InitiateOidcInteraction converts echo context to params.
func (*ServerInterfaceWrapper) PostVerifyCredentials ¶
func (w *ServerInterfaceWrapper) PostVerifyCredentials(ctx echo.Context) error
PostVerifyCredentials converts echo context to params.
func (*ServerInterfaceWrapper) PostVerifyPresentation ¶
func (w *ServerInterfaceWrapper) PostVerifyPresentation(ctx echo.Context) error
PostVerifyPresentation converts echo context to params.
func (*ServerInterfaceWrapper) RetrieveInteractionsClaim ¶
func (w *ServerInterfaceWrapper) RetrieveInteractionsClaim(ctx echo.Context) error
RetrieveInteractionsClaim converts echo context to params.
type VPTokenClaims ¶
type VPTokenClaims struct {
Nonce string `json:"nonce"`
Aud string `json:"aud"`
Iss string `json:"iss"`
Exp int64 `json:"exp"`
SignerDIDID string `json:"signer_did_id"`
VpTokenFormat vcsverifiable.Format `json:"vp_token_format"`
VP *verifiable.Presentation `json:"vp"`
}
type VerifyCredentialCheckResult ¶
type VerifyCredentialCheckResult struct {
// Check Check title.
Check string `json:"check"`
// Error Error message.
Error string `json:"error"`
// VerificationMethod Verification method.
VerificationMethod string `json:"verificationMethod"`
}
VerifyCredentialCheckResult Verify credential response containing failure check details.
type VerifyCredentialData ¶
type VerifyCredentialData struct {
// Credential Credential in jws(string) or jsonld(object) formats. Backward compatibility, use verifiableCredential.
// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
Credential *any `json:"credential,omitempty"`
// Options Options for verify credential.
Options *VerifyCredentialOptions `json:"options,omitempty"`
// VerifiableCredential Credential in jws(string) or jsonld(object) formats.
VerifiableCredential *any `json:"verifiableCredential,omitempty"`
}
VerifyCredentialData Model for credential verification.
type VerifyCredentialOptions ¶
type VerifyCredentialOptions struct {
// Challenge Chalange is added to the proof.
Challenge *string `json:"challenge,omitempty"`
// Domain Domain is added to the proof.
Domain *string `json:"domain,omitempty"`
}
VerifyCredentialOptions Options for verify credential.
type VerifyCredentialResponse ¶
type VerifyCredentialResponse struct {
Checks *[]VerifyCredentialCheckResult `json:"checks,omitempty"`
}
VerifyCredentialResponse Model for response of credentials verification.
type VerifyPresentationData ¶
type VerifyPresentationData struct {
// Options Options for verify presentation.
Options *VerifyPresentationOptions `json:"options,omitempty"`
// VerifiablePresentation Presentation in jws(string) or jsonld(object) formats.
VerifiablePresentation any `json:"verifiablePresentation"`
}
VerifyPresentationData Model for presentation verification.
type VerifyPresentationOptions ¶
type VerifyPresentationOptions struct {
// Challenge Challenge is added to the proof.
Challenge *string `json:"challenge,omitempty"`
// Domain Domain is added to the proof.
Domain *string `json:"domain,omitempty"`
}
VerifyPresentationOptions Options for verify presentation.
type VerifyPresentationResponse ¶
type VerifyPresentationResponse struct {
Checks []string `json:"checks"`
CredentialResults []PresentationResult `json:"credentialResults"`
Errors *[]string `json:"errors,omitempty"`
// Presentation Presentation object.
Presentation *map[string]interface{} `json:"presentation,omitempty"`
// PresentationResult Presentation result.
PresentationResult PresentationResult `json:"presentationResult"`
Verified bool `json:"verified"`
Warnings *[]string `json:"warnings,omitempty"`
}
VerifyPresentationResponse Model for response of presentation verification.