v1

package
v6.2.12 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Overview

Package v1 provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Index

Constants

View Source
const (
	JwtBearerAuthScopes = "jwtBearerAuth.Scopes"
)

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 AccessTokenRequestFailedResponse

type AccessTokenRequestFailedResponse = oauth.OAuth2Error

type AccessTokenResponse

type AccessTokenResponse = oauth.TokenResponse

AccessTokenResponse is an alias to use from within the API

type Contract

type Contract struct {
	// Language Language of the contract in all caps.
	Language           ContractLanguage `json:"language"`
	SignerAttributes   *[]string        `json:"signer_attributes,omitempty"`
	Template           *string          `json:"template,omitempty"`
	TemplateAttributes *[]string        `json:"template_attributes,omitempty"`

	// Type Type of which contract to sign.
	Type ContractType `json:"type"`

	// Version Version of the contract.
	Version ContractVersion `json:"version"`
}

Contract defines model for Contract.

type ContractLanguage

type ContractLanguage = string

ContractLanguage Language of the contract in all caps.

type ContractResponse

type ContractResponse struct {
	// Language Language of the contract in all caps.
	Language ContractLanguage `json:"language"`

	// Message The contract message.
	Message string `json:"message"`

	// Type Type of which contract to sign.
	Type ContractType `json:"type"`

	// Version Version of the contract.
	Version ContractVersion `json:"version"`
}

ContractResponse defines model for ContractResponse.

type ContractSigningRequest

type ContractSigningRequest struct {
	// Language Language of the contract in all caps.
	Language ContractLanguage `json:"language"`

	// LegalEntity DID of the organization as registered in the Nuts registry.
	LegalEntity LegalEntity `json:"legalEntity"`

	// Type Type of which contract to sign.
	Type ContractType `json:"type"`

	// ValidFrom ValidFrom describes the time from which this contract should be considered valid
	ValidFrom *string `json:"valid_from,omitempty"`

	// ValidTo ValidTo describes the time until this contract should be considered valid
	ValidTo *string `json:"valid_to,omitempty"`

	// Version Version of the contract.
	Version ContractVersion `json:"version"`
}

ContractSigningRequest defines model for ContractSigningRequest.

type ContractType

type ContractType = string

ContractType Type of which contract to sign.

type ContractVersion

type ContractVersion = string

ContractVersion Version of the contract.

type CreateAccessToken200JSONResponse

type CreateAccessToken200JSONResponse AccessTokenResponse

func (CreateAccessToken200JSONResponse) VisitCreateAccessTokenResponse

func (response CreateAccessToken200JSONResponse) VisitCreateAccessTokenResponse(w http.ResponseWriter) error

type CreateAccessToken400JSONResponse

type CreateAccessToken400JSONResponse AccessTokenRequestFailedResponse

func (CreateAccessToken400JSONResponse) VisitCreateAccessTokenResponse

func (response CreateAccessToken400JSONResponse) VisitCreateAccessTokenResponse(w http.ResponseWriter) error

type CreateAccessTokenFormdataRequestBody

type CreateAccessTokenFormdataRequestBody = CreateAccessTokenRequest

CreateAccessTokenFormdataRequestBody defines body for CreateAccessToken for application/x-www-form-urlencoded ContentType.

type CreateAccessTokenRequest

type CreateAccessTokenRequest struct {
	// Assertion Base64 encoded JWT following rfc7523 and the Nuts documentation
	Assertion string `json:"assertion"`

	// GrantType always must contain the value "urn:ietf:params:oauth:grant-type:jwt-bearer"
	GrantType string `json:"grant_type"`
}

CreateAccessTokenRequest Request as described in RFC7523 section 2.1

type CreateAccessTokenRequestObject

type CreateAccessTokenRequestObject struct {
	Body *CreateAccessTokenFormdataRequestBody
}

type CreateAccessTokenResponseObject

type CreateAccessTokenResponseObject interface {
	VisitCreateAccessTokenResponse(w http.ResponseWriter) error
}

type CreateJwtGrant200JSONResponse

type CreateJwtGrant200JSONResponse JwtGrantResponse

func (CreateJwtGrant200JSONResponse) VisitCreateJwtGrantResponse

func (response CreateJwtGrant200JSONResponse) VisitCreateJwtGrantResponse(w http.ResponseWriter) error

type CreateJwtGrantJSONRequestBody

type CreateJwtGrantJSONRequestBody = CreateJwtGrantRequest

CreateJwtGrantJSONRequestBody defines body for CreateJwtGrant for application/json ContentType.

type CreateJwtGrantRequest

type CreateJwtGrantRequest struct {
	Authorizer  string                  `json:"authorizer"`
	Credentials []VerifiableCredential  `json:"credentials"`
	Identity    *VerifiablePresentation `json:"identity,omitempty"`
	Requester   string                  `json:"requester"`

	// Service The service for which this access token can be used. The right oauth endpoint is selected based on the service.
	Service string `json:"service"`
}

CreateJwtGrantRequest Request for a JWT Grant. The grant can be used during a Access Token Request in the assertion field

type CreateJwtGrantRequestObject

type CreateJwtGrantRequestObject struct {
	Body *CreateJwtGrantJSONRequestBody
}

type CreateJwtGrantResponseObject

type CreateJwtGrantResponseObject interface {
	VisitCreateJwtGrantResponse(w http.ResponseWriter) error
}

type CreateJwtGrantdefaultApplicationProblemPlusJSONResponse

type CreateJwtGrantdefaultApplicationProblemPlusJSONResponse struct {
	Body struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
	StatusCode int
}

func (CreateJwtGrantdefaultApplicationProblemPlusJSONResponse) VisitCreateJwtGrantResponse

func (response CreateJwtGrantdefaultApplicationProblemPlusJSONResponse) VisitCreateJwtGrantResponse(w http.ResponseWriter) error

type CreateSignSession201JSONResponse

type CreateSignSession201JSONResponse SignSessionResponse

func (CreateSignSession201JSONResponse) VisitCreateSignSessionResponse

func (response CreateSignSession201JSONResponse) VisitCreateSignSessionResponse(w http.ResponseWriter) error

type CreateSignSessionJSONRequestBody

type CreateSignSessionJSONRequestBody = SignSessionRequest

CreateSignSessionJSONRequestBody defines body for CreateSignSession for application/json ContentType.

type CreateSignSessionRequestObject

type CreateSignSessionRequestObject struct {
	Body *CreateSignSessionJSONRequestBody
}

type CreateSignSessionResponseObject

type CreateSignSessionResponseObject interface {
	VisitCreateSignSessionResponse(w http.ResponseWriter) error
}

type CreateSignSessiondefaultApplicationProblemPlusJSONResponse

type CreateSignSessiondefaultApplicationProblemPlusJSONResponse struct {
	Body struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
	StatusCode int
}

func (CreateSignSessiondefaultApplicationProblemPlusJSONResponse) VisitCreateSignSessionResponse

func (response CreateSignSessiondefaultApplicationProblemPlusJSONResponse) VisitCreateSignSessionResponse(w http.ResponseWriter) error

type DrawUpContract200JSONResponse

type DrawUpContract200JSONResponse ContractResponse

func (DrawUpContract200JSONResponse) VisitDrawUpContractResponse

func (response DrawUpContract200JSONResponse) VisitDrawUpContractResponse(w http.ResponseWriter) error

type DrawUpContractJSONRequestBody

type DrawUpContractJSONRequestBody = DrawUpContractRequest

DrawUpContractJSONRequestBody defines body for DrawUpContract for application/json ContentType.

type DrawUpContractRequest

type DrawUpContractRequest struct {
	// Language Language of the contract in all caps.
	Language ContractLanguage `json:"language"`

	// LegalEntity DID of the organization as registered in the Nuts registry.
	LegalEntity            LegalEntity           `json:"legalEntity"`
	OrganizationCredential *VerifiableCredential `json:"organizationCredential,omitempty"`

	// Type Type of which contract to sign.
	Type ContractType `json:"type"`

	// ValidDuration The duration this contract is valid, starting from validFrom or current time if validFrom is omitted. Uses this node default when omitted. Valid time units are: 's', 'm', 'h'
	ValidDuration *string `json:"validDuration,omitempty"`

	// ValidFrom validFrom describes the time from which this contract should be considered valid. Current time is used when omitted.
	ValidFrom *string `json:"validFrom,omitempty"`

	// Version Version of the contract.
	Version ContractVersion `json:"version"`
}

DrawUpContractRequest defines model for DrawUpContractRequest.

type DrawUpContractRequestObject

type DrawUpContractRequestObject struct {
	Body *DrawUpContractJSONRequestBody
}

type DrawUpContractResponseObject

type DrawUpContractResponseObject interface {
	VisitDrawUpContractResponse(w http.ResponseWriter) error
}

type DrawUpContractdefaultApplicationProblemPlusJSONResponse

type DrawUpContractdefaultApplicationProblemPlusJSONResponse struct {
	Body struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
	StatusCode int
}

func (DrawUpContractdefaultApplicationProblemPlusJSONResponse) VisitDrawUpContractResponse

func (response DrawUpContractdefaultApplicationProblemPlusJSONResponse) VisitDrawUpContractResponse(w http.ResponseWriter) error

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 GetContractByType200JSONResponse

type GetContractByType200JSONResponse Contract

func (GetContractByType200JSONResponse) VisitGetContractByTypeResponse

func (response GetContractByType200JSONResponse) VisitGetContractByTypeResponse(w http.ResponseWriter) error

type GetContractByTypeParams

type GetContractByTypeParams struct {
	// Version The version of this contract. If omitted, the most recent version will be returned
	Version  *string `form:"version,omitempty" json:"version,omitempty"`
	Language *string `form:"language,omitempty" json:"language,omitempty"`
}

GetContractByTypeParams defines parameters for GetContractByType.

type GetContractByTypeRequestObject

type GetContractByTypeRequestObject struct {
	ContractType string `json:"contractType"`
	Params       GetContractByTypeParams
}

type GetContractByTypeResponseObject

type GetContractByTypeResponseObject interface {
	VisitGetContractByTypeResponse(w http.ResponseWriter) error
}

type GetContractByTypedefaultApplicationProblemPlusJSONResponse

type GetContractByTypedefaultApplicationProblemPlusJSONResponse struct {
	Body struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
	StatusCode int
}

func (GetContractByTypedefaultApplicationProblemPlusJSONResponse) VisitGetContractByTypeResponse

func (response GetContractByTypedefaultApplicationProblemPlusJSONResponse) VisitGetContractByTypeResponse(w http.ResponseWriter) error

type GetSignSessionStatus200JSONResponse

type GetSignSessionStatus200JSONResponse SignSessionStatusResponse

func (GetSignSessionStatus200JSONResponse) VisitGetSignSessionStatusResponse

func (response GetSignSessionStatus200JSONResponse) VisitGetSignSessionStatusResponse(w http.ResponseWriter) error

type GetSignSessionStatusRequestObject

type GetSignSessionStatusRequestObject struct {
	SessionID string `json:"sessionID"`
}

type GetSignSessionStatusResponseObject

type GetSignSessionStatusResponseObject interface {
	VisitGetSignSessionStatusResponse(w http.ResponseWriter) error
}

type GetSignSessionStatusdefaultApplicationProblemPlusJSONResponse

type GetSignSessionStatusdefaultApplicationProblemPlusJSONResponse struct {
	Body struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
	StatusCode int
}

func (GetSignSessionStatusdefaultApplicationProblemPlusJSONResponse) VisitGetSignSessionStatusResponse

func (response GetSignSessionStatusdefaultApplicationProblemPlusJSONResponse) VisitGetSignSessionStatusResponse(w http.ResponseWriter) error

type IntrospectAccessToken200JSONResponse

type IntrospectAccessToken200JSONResponse TokenIntrospectionResponse

func (IntrospectAccessToken200JSONResponse) VisitIntrospectAccessTokenResponse

func (response IntrospectAccessToken200JSONResponse) VisitIntrospectAccessTokenResponse(w http.ResponseWriter) error

type IntrospectAccessTokenFormdataBody

type IntrospectAccessTokenFormdataBody struct {
	// Token JWT access token
	Token string `form:"token" json:"token"`
}

IntrospectAccessTokenFormdataBody defines parameters for IntrospectAccessToken.

type IntrospectAccessTokenFormdataRequestBody

type IntrospectAccessTokenFormdataRequestBody IntrospectAccessTokenFormdataBody

IntrospectAccessTokenFormdataRequestBody defines body for IntrospectAccessToken for application/x-www-form-urlencoded ContentType.

type IntrospectAccessTokenRequestObject

type IntrospectAccessTokenRequestObject struct {
	Body *IntrospectAccessTokenFormdataRequestBody
}

type IntrospectAccessTokenResponseObject

type IntrospectAccessTokenResponseObject interface {
	VisitIntrospectAccessTokenResponse(w http.ResponseWriter) error
}

type JwtGrantResponse

type JwtGrantResponse struct {
	// AuthorizationServerEndpoint The URL that corresponds to the oauth endpoint of the selected service.
	AuthorizationServerEndpoint string `json:"authorization_server_endpoint"`
	BearerToken                 string `json:"bearer_token"`
}

JwtGrantResponse Response with a JWT Grant. It contains a JWT, signed with the private key of the requestor software vendor.

type LegalEntity

type LegalEntity = string

LegalEntity DID of the organization as registered in the Nuts registry.

type RequestAccessToken200JSONResponse

type RequestAccessToken200JSONResponse AccessTokenResponse

func (RequestAccessToken200JSONResponse) VisitRequestAccessTokenResponse

func (response RequestAccessToken200JSONResponse) VisitRequestAccessTokenResponse(w http.ResponseWriter) error

type RequestAccessTokenJSONRequestBody

type RequestAccessTokenJSONRequestBody = RequestAccessTokenRequest

RequestAccessTokenJSONRequestBody defines body for RequestAccessToken for application/json ContentType.

type RequestAccessTokenRequest

type RequestAccessTokenRequest struct {
	Authorizer string `json:"authorizer"`

	// Credentials Verifiable Credentials to be included in the access token. If no VCs are to be included in the access token, the array can be left empty.
	Credentials []VerifiableCredential  `json:"credentials"`
	Identity    *VerifiablePresentation `json:"identity,omitempty"`
	Requester   string                  `json:"requester"`

	// Service The service for which this access token can be used. The right oauth endpoint is selected based on the service.
	Service string `json:"service"`
}

RequestAccessTokenRequest Request for a JWT Grant and use it as authorization grant to get the access token from the authorizer

type RequestAccessTokenRequestObject

type RequestAccessTokenRequestObject struct {
	Body *RequestAccessTokenJSONRequestBody
}

type RequestAccessTokenResponseObject

type RequestAccessTokenResponseObject interface {
	VisitRequestAccessTokenResponse(w http.ResponseWriter) error
}

type RequestAccessTokendefaultApplicationProblemPlusJSONResponse

type RequestAccessTokendefaultApplicationProblemPlusJSONResponse struct {
	Body struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
	StatusCode int
}

func (RequestAccessTokendefaultApplicationProblemPlusJSONResponse) VisitRequestAccessTokenResponse

func (response RequestAccessTokendefaultApplicationProblemPlusJSONResponse) VisitRequestAccessTokenResponse(w http.ResponseWriter) error

type ServerInterface

type ServerInterface interface {
	// Introspection endpoint to retrieve information from an Access Token as described by RFC7662
	// (POST /internal/auth/v1/accesstoken/introspect)
	IntrospectAccessToken(ctx echo.Context) error
	// Verifies the provided access token
	// (HEAD /internal/auth/v1/accesstoken/verify)
	VerifyAccessToken(ctx echo.Context, params VerifyAccessTokenParams) error
	// Draw up a contract using a specified contract template, language and version
	// (PUT /internal/auth/v1/contract/drawup)
	DrawUpContract(ctx echo.Context) error
	// Create a JWT Grant
	// (POST /internal/auth/v1/jwt-grant)
	CreateJwtGrant(ctx echo.Context) error
	// Request an access token from the authorizer
	// (POST /internal/auth/v1/request-access-token)
	RequestAccessToken(ctx echo.Context) error
	// Create a signing session for a supported means.
	// (POST /internal/auth/v1/signature/session)
	CreateSignSession(ctx echo.Context) error
	// Get the current status of a signing session
	// (GET /internal/auth/v1/signature/session/{sessionID})
	GetSignSessionStatus(ctx echo.Context, sessionID string) error
	// Verify a signature in the form of a verifiable presentation
	// (PUT /internal/auth/v1/signature/verify)
	VerifySignature(ctx echo.Context) error
	// Create an access token using a JWT as authorization grant
	// (POST /n2n/auth/v1/accesstoken)
	CreateAccessToken(ctx echo.Context) error
	// Get a contract by type and version
	// (GET /public/auth/v1/contract/{contractType})
	GetContractByType(ctx echo.Context, contractType string, params GetContractByTypeParams) error
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) CreateAccessToken

func (w *ServerInterfaceWrapper) CreateAccessToken(ctx echo.Context) error

CreateAccessToken converts echo context to params.

func (*ServerInterfaceWrapper) CreateJwtGrant

func (w *ServerInterfaceWrapper) CreateJwtGrant(ctx echo.Context) error

CreateJwtGrant converts echo context to params.

func (*ServerInterfaceWrapper) CreateSignSession

func (w *ServerInterfaceWrapper) CreateSignSession(ctx echo.Context) error

CreateSignSession converts echo context to params.

func (*ServerInterfaceWrapper) DrawUpContract

func (w *ServerInterfaceWrapper) DrawUpContract(ctx echo.Context) error

DrawUpContract converts echo context to params.

func (*ServerInterfaceWrapper) GetContractByType

func (w *ServerInterfaceWrapper) GetContractByType(ctx echo.Context) error

GetContractByType converts echo context to params.

func (*ServerInterfaceWrapper) GetSignSessionStatus

func (w *ServerInterfaceWrapper) GetSignSessionStatus(ctx echo.Context) error

GetSignSessionStatus converts echo context to params.

func (*ServerInterfaceWrapper) IntrospectAccessToken

func (w *ServerInterfaceWrapper) IntrospectAccessToken(ctx echo.Context) error

IntrospectAccessToken converts echo context to params.

func (*ServerInterfaceWrapper) RequestAccessToken

func (w *ServerInterfaceWrapper) RequestAccessToken(ctx echo.Context) error

RequestAccessToken converts echo context to params.

func (*ServerInterfaceWrapper) VerifyAccessToken

func (w *ServerInterfaceWrapper) VerifyAccessToken(ctx echo.Context) error

VerifyAccessToken converts echo context to params.

func (*ServerInterfaceWrapper) VerifySignature

func (w *ServerInterfaceWrapper) VerifySignature(ctx echo.Context) error

VerifySignature converts echo context to params.

type SignSessionRequest

type SignSessionRequest struct {
	Means SignSessionRequestMeans `json:"means"`

	// Params Params are passed to the means. Should be documented in the means documentation.
	Params map[string]interface{} `json:"params"`

	// Payload Base64 encoded payload what needs to be signed.
	Payload string `json:"payload"`
}

SignSessionRequest defines model for SignSessionRequest.

type SignSessionRequestMeans

type SignSessionRequestMeans string

SignSessionRequestMeans defines model for SignSessionRequest.Means.

const (
	SignSessionRequestMeansDummy      SignSessionRequestMeans = "dummy"
	SignSessionRequestMeansEmployeeid SignSessionRequestMeans = "employeeid"
	SignSessionRequestMeansIrma       SignSessionRequestMeans = "irma"
)

Defines values for SignSessionRequestMeans.

type SignSessionResponse

type SignSessionResponse struct {
	// Means The means this session uses to sign.
	Means SignSessionResponseMeans `json:"means"`

	// SessionID Unique identifier of this sign session.
	SessionID string `json:"sessionID"`

	// SessionPtr A pointer to a sign session. This is an opaque value which only has meaning in the context of the signing means. Can be an URL, base64 encoded image of a QRCode etc.
	SessionPtr map[string]interface{} `json:"sessionPtr"`
}

SignSessionResponse defines model for SignSessionResponse.

type SignSessionResponseMeans

type SignSessionResponseMeans string

SignSessionResponseMeans The means this session uses to sign.

const (
	SignSessionResponseMeansDummy      SignSessionResponseMeans = "dummy"
	SignSessionResponseMeansEmployeeid SignSessionResponseMeans = "employeeid"
	SignSessionResponseMeansIrma       SignSessionResponseMeans = "irma"
)

Defines values for SignSessionResponseMeans.

type SignSessionStatusResponse

type SignSessionStatusResponse struct {
	// Status Status indicates the status of the signing process. Values depend on the implementation of the signing means.
	Status                 string                  `json:"status"`
	VerifiablePresentation *VerifiablePresentation `json:"verifiablePresentation,omitempty"`
}

SignSessionStatusResponse defines model for SignSessionStatusResponse.

type SignatureVerificationRequest

type SignatureVerificationRequest struct {
	VerifiablePresentation VerifiablePresentation `json:"VerifiablePresentation"`

	// CheckTime Moment in time to check the validity of the signature. If omitted, the current time is used.
	CheckTime *string `json:"checkTime,omitempty"`
}

SignatureVerificationRequest defines model for SignatureVerificationRequest.

type SignatureVerificationResponse

type SignatureVerificationResponse struct {
	// Credentials Key value pairs containing claims and their values.
	Credentials *map[string]interface{} `json:"credentials,omitempty"`

	// IssuerAttributes Key vale pairs containing the attributes of the issuer.
	IssuerAttributes *map[string]interface{} `json:"issuerAttributes,omitempty"`

	// Validity Indicates the validity of the signature.
	Validity bool `json:"validity"`

	// VpType Type of Verifiable credential.
	VpType *string `json:"vpType,omitempty"`
}

SignatureVerificationResponse Contains the signature verification result.

type StrictHandlerFunc

type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc

type StrictMiddlewareFunc

type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc

type StrictServerInterface

type StrictServerInterface interface {
	// Introspection endpoint to retrieve information from an Access Token as described by RFC7662
	// (POST /internal/auth/v1/accesstoken/introspect)
	IntrospectAccessToken(ctx context.Context, request IntrospectAccessTokenRequestObject) (IntrospectAccessTokenResponseObject, error)
	// Verifies the provided access token
	// (HEAD /internal/auth/v1/accesstoken/verify)
	VerifyAccessToken(ctx context.Context, request VerifyAccessTokenRequestObject) (VerifyAccessTokenResponseObject, error)
	// Draw up a contract using a specified contract template, language and version
	// (PUT /internal/auth/v1/contract/drawup)
	DrawUpContract(ctx context.Context, request DrawUpContractRequestObject) (DrawUpContractResponseObject, error)
	// Create a JWT Grant
	// (POST /internal/auth/v1/jwt-grant)
	CreateJwtGrant(ctx context.Context, request CreateJwtGrantRequestObject) (CreateJwtGrantResponseObject, error)
	// Request an access token from the authorizer
	// (POST /internal/auth/v1/request-access-token)
	RequestAccessToken(ctx context.Context, request RequestAccessTokenRequestObject) (RequestAccessTokenResponseObject, error)
	// Create a signing session for a supported means.
	// (POST /internal/auth/v1/signature/session)
	CreateSignSession(ctx context.Context, request CreateSignSessionRequestObject) (CreateSignSessionResponseObject, error)
	// Get the current status of a signing session
	// (GET /internal/auth/v1/signature/session/{sessionID})
	GetSignSessionStatus(ctx context.Context, request GetSignSessionStatusRequestObject) (GetSignSessionStatusResponseObject, error)
	// Verify a signature in the form of a verifiable presentation
	// (PUT /internal/auth/v1/signature/verify)
	VerifySignature(ctx context.Context, request VerifySignatureRequestObject) (VerifySignatureResponseObject, error)
	// Create an access token using a JWT as authorization grant
	// (POST /n2n/auth/v1/accesstoken)
	CreateAccessToken(ctx context.Context, request CreateAccessTokenRequestObject) (CreateAccessTokenResponseObject, error)
	// Get a contract by type and version
	// (GET /public/auth/v1/contract/{contractType})
	GetContractByType(ctx context.Context, request GetContractByTypeRequestObject) (GetContractByTypeResponseObject, error)
}

StrictServerInterface represents all server handlers.

type TokenIntrospectionRequest

type TokenIntrospectionRequest struct {
	Token string `json:"token"`
}

TokenIntrospectionRequest Token introspection request as described in RFC7662 section 2.1

type TokenIntrospectionResponse

type TokenIntrospectionResponse struct {
	// Active True if the token is active, false if the token is expired, malformed etc.
	Active bool `json:"active"`

	// AssuranceLevel Assurance level of the identity of the End-User.
	AssuranceLevel *TokenIntrospectionResponseAssuranceLevel `json:"assurance_level,omitempty"`

	// Aud As per rfc7523 https://tools.ietf.org/html/rfc7523>, the aud must be the
	// token endpoint. This can be taken from the Nuts registry.
	Aud *string `json:"aud,omitempty"`

	// Email End-User's preferred e-mail address. Should be a personal email and can be used to uniquely identify a user. Just like the email used for an account.
	Email *string `json:"email,omitempty"`
	Exp   *int    `json:"exp,omitempty"`

	// FamilyName Surname(s) or last name(s) of the End-User.
	FamilyName *string `json:"family_name,omitempty"`
	Iat        *int    `json:"iat,omitempty"`

	// Initials Initials of the End-User.
	Initials *string `json:"initials,omitempty"`

	// Iss The subject (not a Nuts subject) contains the DID of the authorizer.
	Iss *string `json:"iss,omitempty"`

	// Osi encoded ops signature. (TBD)
	Osi *string `json:"osi,omitempty"`

	// Prefix Surname prefix
	Prefix *string `json:"prefix,omitempty"`

	// ResolvedVCs credentials resolved from `vcs` (VC IDs). It contains only those VCs that could be resolved.
	ResolvedVCs *[]VerifiableCredential `json:"resolvedVCs,omitempty"`
	Service     *string                 `json:"service,omitempty"`

	// Sub The subject is always the acting party, thus the care organization requesting access to data.
	Sub *string `json:"sub,omitempty"`

	// UserRole Role of the End-User.
	UserRole *string `json:"user_role,omitempty"`

	// Username Identifier uniquely identifying the End-User's account in the issuing system.
	Username *string   `json:"username,omitempty"`
	Vcs      *[]string `json:"vcs,omitempty"`
}

TokenIntrospectionResponse Token introspection response as described in RFC7662 section 2.2

type TokenIntrospectionResponseAssuranceLevel

type TokenIntrospectionResponseAssuranceLevel string

TokenIntrospectionResponseAssuranceLevel Assurance level of the identity of the End-User.

Defines values for TokenIntrospectionResponseAssuranceLevel.

type VerifiableCredential

type VerifiableCredential = vc.VerifiableCredential

VerifiableCredential is an alias to use from within the API

type VerifiablePresentation

type VerifiablePresentation = vc.VerifiablePresentation

VerifiablePresentation is an alias to use from within the API

type VerifyAccessToken200Response

type VerifyAccessToken200Response struct {
}

func (VerifyAccessToken200Response) VisitVerifyAccessTokenResponse

func (response VerifyAccessToken200Response) VisitVerifyAccessTokenResponse(w http.ResponseWriter) error

type VerifyAccessToken403Response

type VerifyAccessToken403Response struct {
}

func (VerifyAccessToken403Response) VisitVerifyAccessTokenResponse

func (response VerifyAccessToken403Response) VisitVerifyAccessTokenResponse(w http.ResponseWriter) error

type VerifyAccessTokenParams

type VerifyAccessTokenParams struct {
	Authorization string `json:"Authorization"`
}

VerifyAccessTokenParams defines parameters for VerifyAccessToken.

type VerifyAccessTokenRequestObject

type VerifyAccessTokenRequestObject struct {
	Params VerifyAccessTokenParams
}

type VerifyAccessTokenResponseObject

type VerifyAccessTokenResponseObject interface {
	VisitVerifyAccessTokenResponse(w http.ResponseWriter) error
}

type VerifySignature200JSONResponse

type VerifySignature200JSONResponse SignatureVerificationResponse

func (VerifySignature200JSONResponse) VisitVerifySignatureResponse

func (response VerifySignature200JSONResponse) VisitVerifySignatureResponse(w http.ResponseWriter) error

type VerifySignatureJSONRequestBody

type VerifySignatureJSONRequestBody = SignatureVerificationRequest

VerifySignatureJSONRequestBody defines body for VerifySignature for application/json ContentType.

type VerifySignatureRequestObject

type VerifySignatureRequestObject struct {
	Body *VerifySignatureJSONRequestBody
}

type VerifySignatureResponseObject

type VerifySignatureResponseObject interface {
	VisitVerifySignatureResponse(w http.ResponseWriter) error
}

type VerifySignaturedefaultApplicationProblemPlusJSONResponse

type VerifySignaturedefaultApplicationProblemPlusJSONResponse struct {
	Body struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
	StatusCode int
}

func (VerifySignaturedefaultApplicationProblemPlusJSONResponse) VisitVerifySignatureResponse

func (response VerifySignaturedefaultApplicationProblemPlusJSONResponse) VisitVerifySignatureResponse(w http.ResponseWriter) error

type Wrapper

type Wrapper struct {
	Auth               auth.AuthenticationServices
	CredentialResolver vcr.Resolver
}

Wrapper bridges the generated api types and http logic to the internal types and logic. It checks required parameters and message body. It converts data from api to internal types. Then passes the internal formats to the AuthenticationServices. Converts internal results back to the generated Api types. Handles errors and returns the correct http response. It does not perform any business logic.

func (Wrapper) CreateAccessToken

CreateAccessToken handles the http request (from a remote vendor's Nuts node) for creating an access token for accessing resources of the local vendor's EPD/XIS. It consumes a JWT Bearer token. It consumes and checks the JWT and returns a smaller sessionToken The errors returns for this API do not follow RFC7807 but follow the oauth framework error response: RFC6749 (https://tools.ietf.org/html/rfc6749#page-45)

func (Wrapper) CreateJwtGrant

CreateJwtGrant handles the http request (from the vendor's EPD/XIS) for creating a JWT bearer token which can be used to retrieve an access token from a remote Nuts node.

func (Wrapper) CreateSignSession

CreateSignSession handles the CreateSignSession http request. It parses the parameters, finds the means handler and returns a session pointer which can be used to monitor the session.

func (Wrapper) DrawUpContract

DrawUpContract handles the http request for drawing up a contract for a given contract template identified by type, language and version.

func (Wrapper) GetContractByType

GetContractByType handles the http request for finding a contract by type.

func (Wrapper) GetSignSessionStatus

GetSignSessionStatus handles the http requests for getting the current status of a signing session.

func (Wrapper) IntrospectAccessToken

IntrospectAccessToken handles the http request (from the vendor's EPD/XIS) for introspecting an access token received from a remote Nuts node.

func (Wrapper) RequestAccessToken

RequestAccessToken handles the HTTP request (from the vendor's EPD/XIS) for creating a JWT grant and using it as authorization grant to get an access token from the remote Nuts node.

func (*Wrapper) ResolveStatusCode

func (w *Wrapper) ResolveStatusCode(err error) int

ResolveStatusCode maps errors returned by this API to specific HTTP status codes.

func (*Wrapper) Routes

func (w *Wrapper) Routes(router core.EchoRouter)

Routes registers the Echo routes for the API.

func (Wrapper) VerifyAccessToken

VerifyAccessToken handles the http request (from the vendor's EPD/XIS) for verifying an access token received from a remote Nuts node.

func (Wrapper) VerifySignature

VerifySignature handles the VerifySignature http request. It parses the request body, parses the verifiable presentation and calls the ContractNotary to verify the VP.

Directories

Path Synopsis
Package client provides primitives to interact with the openapi HTTP API.
Package client provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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