Documentation
¶
Overview ¶
Package verifier provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.11.0 DO NOT EDIT.
Index ¶
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- 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 IDTokenVPToken
- type InitiateOIDC4VPData
- type InitiateOIDC4VPResponse
- type InitiateOidcInteractionJSONBody
- type InitiateOidcInteractionJSONRequestBody
- type PostVerifyCredentialsJSONBody
- type PostVerifyCredentialsJSONRequestBody
- type PostVerifyPresentationJSONBody
- type PostVerifyPresentationJSONRequestBody
- type PresentationDefinition
- type PresentationDefinitionFilters
- 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 VerifyPresentationCheckResult
- 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 Config ¶
type Config struct {
VerifyCredentialSvc verifyCredentialSvc
VerifyPresentationSvc verifyPresentationSvc
ProfileSvc profileService
KMSRegistry kmsRegistry
DocumentLoader ld.DocumentLoader
VDR vdrapi.Registry
OIDCVPService oidc4VPService
JWTVerifier jose.SignatureVerifier
Metrics metricsProvider
Tracer trace.Tracer
}
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 initiate OpenID presentation flow through VCS. (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 {
VPToken IDTokenVPToken `json:"_vp_token"`
Nonce string `json:"nonce"`
Exp int64 `json:"exp"`
}
type IDTokenVPToken ¶
type IDTokenVPToken struct {
// TODO: use *presexch.PresentationSubmission instead of map[string]interface{}
PresentationSubmission map[string]interface{} `json:"presentation_submission"`
}
type InitiateOIDC4VPData ¶
type InitiateOIDC4VPData struct {
PresentationDefinitionFilters *PresentationDefinitionFilters `json:"presentationDefinitionFilters,omitempty"`
PresentationDefinitionId *string `json:"presentationDefinitionId,omitempty"`
Purpose *string `json:"purpose,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 InitiateOidcInteractionJSONBody ¶
type InitiateOidcInteractionJSONBody = InitiateOIDC4VPData
InitiateOidcInteractionJSONBody defines parameters for InitiateOidcInteraction.
type InitiateOidcInteractionJSONRequestBody ¶
type InitiateOidcInteractionJSONRequestBody = InitiateOidcInteractionJSONBody
InitiateOidcInteractionJSONRequestBody defines body for InitiateOidcInteraction for application/json ContentType.
type PostVerifyCredentialsJSONBody ¶
type PostVerifyCredentialsJSONBody = VerifyCredentialData
PostVerifyCredentialsJSONBody defines parameters for PostVerifyCredentials.
type PostVerifyCredentialsJSONRequestBody ¶
type PostVerifyCredentialsJSONRequestBody = PostVerifyCredentialsJSONBody
PostVerifyCredentialsJSONRequestBody defines body for PostVerifyCredentials for application/json ContentType.
type PostVerifyPresentationJSONBody ¶
type PostVerifyPresentationJSONBody = VerifyPresentationData
PostVerifyPresentationJSONBody defines parameters for PostVerifyPresentation.
type PostVerifyPresentationJSONRequestBody ¶
type PostVerifyPresentationJSONRequestBody = PostVerifyPresentationJSONBody
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 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 {
VP json.RawMessage `json:"vp"`
Nonce string `json:"nonce"`
Exp int64 `json:"exp"`
}
type VerifyCredentialCheckResult ¶
type VerifyCredentialCheckResult struct {
// Check title.
Check string `json:"check"`
// Error message.
Error string `json:"error"`
// Verification method.
VerificationMethod string `json:"verificationMethod"`
}
Verify credential response containing failure check details.
type VerifyCredentialData ¶
type VerifyCredentialData struct {
// Credential in jws(string) or jsonld(object) formats.
Credential interface{} `json:"credential"`
// Options for verify credential.
Options *VerifyCredentialOptions `json:"options,omitempty"`
}
Model for credential verification.
type VerifyCredentialOptions ¶
type VerifyCredentialOptions struct {
// Chalange is added to the proof.
Challenge *string `json:"challenge,omitempty"`
// Domain is added to the proof.
Domain *string `json:"domain,omitempty"`
}
Options for verify credential.
type VerifyCredentialResponse ¶
type VerifyCredentialResponse struct {
Checks *[]VerifyCredentialCheckResult `json:"checks,omitempty"`
}
Model for response of credentials verification.
type VerifyPresentationCheckResult ¶
type VerifyPresentationCheckResult struct {
// Check title.
Check string `json:"check"`
// Error message.
Error string `json:"error"`
}
Verify presentation response containing failure check details.
type VerifyPresentationData ¶
type VerifyPresentationData struct {
// Options for verify presentation.
Options *VerifyPresentationOptions `json:"options,omitempty"`
// Presentation in jws(string) or jsonld(object) formats.
Presentation interface{} `json:"presentation"`
}
Model for presentation verification.
type VerifyPresentationOptions ¶
type VerifyPresentationOptions struct {
// Challenge is added to the proof.
Challenge *string `json:"challenge,omitempty"`
// Domain is added to the proof.
Domain *string `json:"domain,omitempty"`
}
Options for verify presentation.
type VerifyPresentationResponse ¶
type VerifyPresentationResponse struct {
Checks *[]VerifyPresentationCheckResult `json:"checks,omitempty"`
}
Model for response of presentation verification.