iam

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

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

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

Index

Constants

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

Variables

This section is empty.

Functions

func NewCreateDPoPProofRequest

func NewCreateDPoPProofRequest(server string, kid string, body CreateDPoPProofJSONRequestBody) (*http.Request, error)

NewCreateDPoPProofRequest calls the generic CreateDPoPProof builder with application/json body

func NewCreateDPoPProofRequestWithBody

func NewCreateDPoPProofRequestWithBody(server string, kid string, contentType string, body io.Reader) (*http.Request, error)

NewCreateDPoPProofRequestWithBody generates requests for CreateDPoPProof with any type of body

func NewIntrospectAccessTokenExtendedRequestWithBody

func NewIntrospectAccessTokenExtendedRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewIntrospectAccessTokenExtendedRequestWithBody generates requests for IntrospectAccessTokenExtended with any type of body

func NewIntrospectAccessTokenExtendedRequestWithFormdataBody

func NewIntrospectAccessTokenExtendedRequestWithFormdataBody(server string, body IntrospectAccessTokenExtendedFormdataRequestBody) (*http.Request, error)

NewIntrospectAccessTokenExtendedRequestWithFormdataBody calls the generic IntrospectAccessTokenExtended builder with application/x-www-form-urlencoded body

func NewIntrospectAccessTokenRequestWithBody

func NewIntrospectAccessTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewIntrospectAccessTokenRequestWithBody generates requests for IntrospectAccessToken with any type of body

func NewIntrospectAccessTokenRequestWithFormdataBody

func NewIntrospectAccessTokenRequestWithFormdataBody(server string, body IntrospectAccessTokenFormdataRequestBody) (*http.Request, error)

NewIntrospectAccessTokenRequestWithFormdataBody calls the generic IntrospectAccessToken builder with application/x-www-form-urlencoded body

func NewRequestOpenid4VCICredentialIssuanceRequest

func NewRequestOpenid4VCICredentialIssuanceRequest(server string, subjectID string, body RequestOpenid4VCICredentialIssuanceJSONRequestBody) (*http.Request, error)

NewRequestOpenid4VCICredentialIssuanceRequest calls the generic RequestOpenid4VCICredentialIssuance builder with application/json body

func NewRequestOpenid4VCICredentialIssuanceRequestWithBody

func NewRequestOpenid4VCICredentialIssuanceRequestWithBody(server string, subjectID string, contentType string, body io.Reader) (*http.Request, error)

NewRequestOpenid4VCICredentialIssuanceRequestWithBody generates requests for RequestOpenid4VCICredentialIssuance with any type of body

func NewRequestServiceAccessTokenRequest

func NewRequestServiceAccessTokenRequest(server string, subjectID string, body RequestServiceAccessTokenJSONRequestBody) (*http.Request, error)

NewRequestServiceAccessTokenRequest calls the generic RequestServiceAccessToken builder with application/json body

func NewRequestServiceAccessTokenRequestWithBody

func NewRequestServiceAccessTokenRequestWithBody(server string, subjectID string, contentType string, body io.Reader) (*http.Request, error)

NewRequestServiceAccessTokenRequestWithBody generates requests for RequestServiceAccessToken with any type of body

func NewRequestUserAccessTokenRequest

func NewRequestUserAccessTokenRequest(server string, subjectID string, body RequestUserAccessTokenJSONRequestBody) (*http.Request, error)

NewRequestUserAccessTokenRequest calls the generic RequestUserAccessToken builder with application/json body

func NewRequestUserAccessTokenRequestWithBody

func NewRequestUserAccessTokenRequestWithBody(server string, subjectID string, contentType string, body io.Reader) (*http.Request, error)

NewRequestUserAccessTokenRequestWithBody generates requests for RequestUserAccessToken with any type of body

func NewRetrieveAccessTokenRequest

func NewRetrieveAccessTokenRequest(server string, sessionID string) (*http.Request, error)

NewRetrieveAccessTokenRequest generates requests for RetrieveAccessToken

func NewValidateDPoPProofRequest

func NewValidateDPoPProofRequest(server string, body ValidateDPoPProofJSONRequestBody) (*http.Request, error)

NewValidateDPoPProofRequest calls the generic ValidateDPoPProof builder with application/json body

func NewValidateDPoPProofRequestWithBody

func NewValidateDPoPProofRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewValidateDPoPProofRequestWithBody generates requests for ValidateDPoPProof with any type of body

Types

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) CreateDPoPProof

func (c *Client) CreateDPoPProof(ctx context.Context, kid string, body CreateDPoPProofJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateDPoPProofWithBody

func (c *Client) CreateDPoPProofWithBody(ctx context.Context, kid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) IntrospectAccessTokenExtendedWithBody

func (c *Client) IntrospectAccessTokenExtendedWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) IntrospectAccessTokenExtendedWithFormdataBody

func (c *Client) IntrospectAccessTokenExtendedWithFormdataBody(ctx context.Context, body IntrospectAccessTokenExtendedFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) IntrospectAccessTokenWithBody

func (c *Client) IntrospectAccessTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) IntrospectAccessTokenWithFormdataBody

func (c *Client) IntrospectAccessTokenWithFormdataBody(ctx context.Context, body IntrospectAccessTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RequestOpenid4VCICredentialIssuance

func (c *Client) RequestOpenid4VCICredentialIssuance(ctx context.Context, subjectID string, body RequestOpenid4VCICredentialIssuanceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RequestOpenid4VCICredentialIssuanceWithBody

func (c *Client) RequestOpenid4VCICredentialIssuanceWithBody(ctx context.Context, subjectID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RequestServiceAccessToken

func (c *Client) RequestServiceAccessToken(ctx context.Context, subjectID string, body RequestServiceAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RequestServiceAccessTokenWithBody

func (c *Client) RequestServiceAccessTokenWithBody(ctx context.Context, subjectID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RequestUserAccessToken

func (c *Client) RequestUserAccessToken(ctx context.Context, subjectID string, body RequestUserAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RequestUserAccessTokenWithBody

func (c *Client) RequestUserAccessTokenWithBody(ctx context.Context, subjectID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RetrieveAccessToken

func (c *Client) RetrieveAccessToken(ctx context.Context, sessionID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ValidateDPoPProof

func (c *Client) ValidateDPoPProof(ctx context.Context, body ValidateDPoPProofJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ValidateDPoPProofWithBody

func (c *Client) ValidateDPoPProofWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// IntrospectAccessTokenWithBody request with any body
	IntrospectAccessTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	IntrospectAccessTokenWithFormdataBody(ctx context.Context, body IntrospectAccessTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// IntrospectAccessTokenExtendedWithBody request with any body
	IntrospectAccessTokenExtendedWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	IntrospectAccessTokenExtendedWithFormdataBody(ctx context.Context, body IntrospectAccessTokenExtendedFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RetrieveAccessToken request
	RetrieveAccessToken(ctx context.Context, sessionID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ValidateDPoPProofWithBody request with any body
	ValidateDPoPProofWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ValidateDPoPProof(ctx context.Context, body ValidateDPoPProofJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateDPoPProofWithBody request with any body
	CreateDPoPProofWithBody(ctx context.Context, kid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateDPoPProof(ctx context.Context, kid string, body CreateDPoPProofJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RequestOpenid4VCICredentialIssuanceWithBody request with any body
	RequestOpenid4VCICredentialIssuanceWithBody(ctx context.Context, subjectID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	RequestOpenid4VCICredentialIssuance(ctx context.Context, subjectID string, body RequestOpenid4VCICredentialIssuanceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RequestServiceAccessTokenWithBody request with any body
	RequestServiceAccessTokenWithBody(ctx context.Context, subjectID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	RequestServiceAccessToken(ctx context.Context, subjectID string, body RequestServiceAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RequestUserAccessTokenWithBody request with any body
	RequestUserAccessTokenWithBody(ctx context.Context, subjectID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	RequestUserAccessToken(ctx context.Context, subjectID string, body RequestUserAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) CreateDPoPProofWithBodyWithResponse

func (c *ClientWithResponses) CreateDPoPProofWithBodyWithResponse(ctx context.Context, kid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDPoPProofResponse, error)

CreateDPoPProofWithBodyWithResponse request with arbitrary body returning *CreateDPoPProofResponse

func (*ClientWithResponses) CreateDPoPProofWithResponse

func (c *ClientWithResponses) CreateDPoPProofWithResponse(ctx context.Context, kid string, body CreateDPoPProofJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDPoPProofResponse, error)

func (*ClientWithResponses) IntrospectAccessTokenExtendedWithBodyWithResponse

func (c *ClientWithResponses) IntrospectAccessTokenExtendedWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IntrospectAccessTokenExtendedResponse, error)

IntrospectAccessTokenExtendedWithBodyWithResponse request with arbitrary body returning *IntrospectAccessTokenExtendedResponse

func (*ClientWithResponses) IntrospectAccessTokenExtendedWithFormdataBodyWithResponse

func (c *ClientWithResponses) IntrospectAccessTokenExtendedWithFormdataBodyWithResponse(ctx context.Context, body IntrospectAccessTokenExtendedFormdataRequestBody, reqEditors ...RequestEditorFn) (*IntrospectAccessTokenExtendedResponse, error)

func (*ClientWithResponses) IntrospectAccessTokenWithBodyWithResponse

func (c *ClientWithResponses) IntrospectAccessTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IntrospectAccessTokenResponse, error)

IntrospectAccessTokenWithBodyWithResponse request with arbitrary body returning *IntrospectAccessTokenResponse

func (*ClientWithResponses) IntrospectAccessTokenWithFormdataBodyWithResponse

func (c *ClientWithResponses) IntrospectAccessTokenWithFormdataBodyWithResponse(ctx context.Context, body IntrospectAccessTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*IntrospectAccessTokenResponse, error)

func (*ClientWithResponses) RequestOpenid4VCICredentialIssuanceWithBodyWithResponse

func (c *ClientWithResponses) RequestOpenid4VCICredentialIssuanceWithBodyWithResponse(ctx context.Context, subjectID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RequestOpenid4VCICredentialIssuanceResponse, error)

RequestOpenid4VCICredentialIssuanceWithBodyWithResponse request with arbitrary body returning *RequestOpenid4VCICredentialIssuanceResponse

func (*ClientWithResponses) RequestOpenid4VCICredentialIssuanceWithResponse

func (c *ClientWithResponses) RequestOpenid4VCICredentialIssuanceWithResponse(ctx context.Context, subjectID string, body RequestOpenid4VCICredentialIssuanceJSONRequestBody, reqEditors ...RequestEditorFn) (*RequestOpenid4VCICredentialIssuanceResponse, error)

func (*ClientWithResponses) RequestServiceAccessTokenWithBodyWithResponse

func (c *ClientWithResponses) RequestServiceAccessTokenWithBodyWithResponse(ctx context.Context, subjectID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RequestServiceAccessTokenResponse, error)

RequestServiceAccessTokenWithBodyWithResponse request with arbitrary body returning *RequestServiceAccessTokenResponse

func (*ClientWithResponses) RequestServiceAccessTokenWithResponse

func (c *ClientWithResponses) RequestServiceAccessTokenWithResponse(ctx context.Context, subjectID string, body RequestServiceAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*RequestServiceAccessTokenResponse, error)

func (*ClientWithResponses) RequestUserAccessTokenWithBodyWithResponse

func (c *ClientWithResponses) RequestUserAccessTokenWithBodyWithResponse(ctx context.Context, subjectID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RequestUserAccessTokenResponse, error)

RequestUserAccessTokenWithBodyWithResponse request with arbitrary body returning *RequestUserAccessTokenResponse

func (*ClientWithResponses) RequestUserAccessTokenWithResponse

func (c *ClientWithResponses) RequestUserAccessTokenWithResponse(ctx context.Context, subjectID string, body RequestUserAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*RequestUserAccessTokenResponse, error)

func (*ClientWithResponses) RetrieveAccessTokenWithResponse

func (c *ClientWithResponses) RetrieveAccessTokenWithResponse(ctx context.Context, sessionID string, reqEditors ...RequestEditorFn) (*RetrieveAccessTokenResponse, error)

RetrieveAccessTokenWithResponse request returning *RetrieveAccessTokenResponse

func (*ClientWithResponses) ValidateDPoPProofWithBodyWithResponse

func (c *ClientWithResponses) ValidateDPoPProofWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ValidateDPoPProofResponse, error)

ValidateDPoPProofWithBodyWithResponse request with arbitrary body returning *ValidateDPoPProofResponse

func (*ClientWithResponses) ValidateDPoPProofWithResponse

func (c *ClientWithResponses) ValidateDPoPProofWithResponse(ctx context.Context, body ValidateDPoPProofJSONRequestBody, reqEditors ...RequestEditorFn) (*ValidateDPoPProofResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// IntrospectAccessTokenWithBodyWithResponse request with any body
	IntrospectAccessTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IntrospectAccessTokenResponse, error)

	IntrospectAccessTokenWithFormdataBodyWithResponse(ctx context.Context, body IntrospectAccessTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*IntrospectAccessTokenResponse, error)

	// IntrospectAccessTokenExtendedWithBodyWithResponse request with any body
	IntrospectAccessTokenExtendedWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IntrospectAccessTokenExtendedResponse, error)

	IntrospectAccessTokenExtendedWithFormdataBodyWithResponse(ctx context.Context, body IntrospectAccessTokenExtendedFormdataRequestBody, reqEditors ...RequestEditorFn) (*IntrospectAccessTokenExtendedResponse, error)

	// RetrieveAccessTokenWithResponse request
	RetrieveAccessTokenWithResponse(ctx context.Context, sessionID string, reqEditors ...RequestEditorFn) (*RetrieveAccessTokenResponse, error)

	// ValidateDPoPProofWithBodyWithResponse request with any body
	ValidateDPoPProofWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ValidateDPoPProofResponse, error)

	ValidateDPoPProofWithResponse(ctx context.Context, body ValidateDPoPProofJSONRequestBody, reqEditors ...RequestEditorFn) (*ValidateDPoPProofResponse, error)

	// CreateDPoPProofWithBodyWithResponse request with any body
	CreateDPoPProofWithBodyWithResponse(ctx context.Context, kid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDPoPProofResponse, error)

	CreateDPoPProofWithResponse(ctx context.Context, kid string, body CreateDPoPProofJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDPoPProofResponse, error)

	// RequestOpenid4VCICredentialIssuanceWithBodyWithResponse request with any body
	RequestOpenid4VCICredentialIssuanceWithBodyWithResponse(ctx context.Context, subjectID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RequestOpenid4VCICredentialIssuanceResponse, error)

	RequestOpenid4VCICredentialIssuanceWithResponse(ctx context.Context, subjectID string, body RequestOpenid4VCICredentialIssuanceJSONRequestBody, reqEditors ...RequestEditorFn) (*RequestOpenid4VCICredentialIssuanceResponse, error)

	// RequestServiceAccessTokenWithBodyWithResponse request with any body
	RequestServiceAccessTokenWithBodyWithResponse(ctx context.Context, subjectID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RequestServiceAccessTokenResponse, error)

	RequestServiceAccessTokenWithResponse(ctx context.Context, subjectID string, body RequestServiceAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*RequestServiceAccessTokenResponse, error)

	// RequestUserAccessTokenWithBodyWithResponse request with any body
	RequestUserAccessTokenWithBodyWithResponse(ctx context.Context, subjectID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RequestUserAccessTokenResponse, error)

	RequestUserAccessTokenWithResponse(ctx context.Context, subjectID string, body RequestUserAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*RequestUserAccessTokenResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type Cnf

type Cnf struct {
	// Jkt JWK thumbprint
	Jkt string `json:"jkt"`
}

Cnf The 'confirmation' claim is used in JWTs to proof the possession of a key.

type CreateDPoPProofJSONRequestBody

type CreateDPoPProofJSONRequestBody = DPoPRequest

CreateDPoPProofJSONRequestBody defines body for CreateDPoPProof for application/json ContentType.

type CreateDPoPProofResponse

type CreateDPoPProofResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *DPoPResponse
}

func ParseCreateDPoPProofResponse

func ParseCreateDPoPProofResponse(rsp *http.Response) (*CreateDPoPProofResponse, error)

ParseCreateDPoPProofResponse parses an HTTP response from a CreateDPoPProofWithResponse call

func (CreateDPoPProofResponse) Status

func (r CreateDPoPProofResponse) Status() string

Status returns HTTPResponse.Status

func (CreateDPoPProofResponse) StatusCode

func (r CreateDPoPProofResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DPoPRequest

type DPoPRequest struct {
	// Htm The HTTP method for which the DPoP proof is requested.
	Htm string `json:"htm"`

	// Htu The URL for which the DPoP proof is requested. Query params and fragments are ignored during validation.
	Htu string `json:"htu"`

	// Token The access token for which the DPoP proof is requested.
	Token string `json:"token"`
}

DPoPRequest defines model for DPoPRequest.

type DPoPResponse

type DPoPResponse struct {
	// Dpop The DPoP proof as specified by https://datatracker.ietf.org/doc/html/rfc9449 for resource requests
	Dpop string `json:"dpop"`
}

DPoPResponse defines model for DPoPResponse.

type DPoPValidateRequest

type DPoPValidateRequest struct {
	// DpopProof The DPoP Proof as specified by https://datatracker.ietf.org/doc/html/rfc9449 for resource requests
	DpopProof string `json:"dpop_proof"`

	// Method The HTTP method against which the DPoP proof is validated.
	Method string `json:"method"`

	// Thumbprint The thumbprint of the public key used to sign the DPoP proof. Base64url encoded, no padding.
	Thumbprint string `json:"thumbprint"`

	// Token The access token against which the DPoP proof is validated.
	Token string `json:"token"`

	// Url The URL against which the DPoP proof is validated. Query params and fragments are ignored during validation.
	Url string `json:"url"`
}

DPoPValidateRequest defines model for DPoPValidateRequest.

type DPoPValidateResponse

type DPoPValidateResponse struct {
	// Reason The reason why the DPoP Proof header is invalid.
	Reason *string `json:"reason,omitempty"`

	// Valid True if the DPoP Proof header is valid for the access token and HTTP request, false if it is not.
	Valid bool `json:"valid"`
}

DPoPValidateResponse defines model for DPoPValidateResponse.

type ExtendedTokenIntrospectionResponse

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

	// Aud RFC7662 - Service-specific string identifier or list of string identifiers representing the intended audience for this token, as defined in JWT [RFC7519].
	Aud *string `json:"aud,omitempty"`

	// ClientId The client (DID) the access token was issued to
	ClientId *string `json:"client_id,omitempty"`

	// Cnf The 'confirmation' claim is used in JWTs to proof the possession of a key.
	Cnf *Cnf `json:"cnf,omitempty"`

	// Exp Expiration date in seconds since UNIX epoch
	Exp *int `json:"exp,omitempty"`

	// Iat Issuance time in seconds since UNIX epoch
	Iat *int `json:"iat,omitempty"`

	// Iss Contains the DID of the authorizer. Should be equal to 'sub'
	Iss *string `json:"iss,omitempty"`

	// PresentationDefinitions Presentation Definitions, as described in Presentation Exchange specification, fulfilled to obtain the access token
	// The map key is the wallet owner (user/organization)
	PresentationDefinitions *RequiredPresentationDefinitions `json:"presentation_definitions,omitempty"`

	// PresentationSubmissions Mapping of Presentation Definition IDs that were fulfilled to Presentation Submissions.
	PresentationSubmissions *map[string]PresentationSubmission `json:"presentation_submissions,omitempty"`

	// Scope granted scopes
	Scope                *string                   `json:"scope,omitempty"`
	Vps                  *[]VerifiablePresentation `json:"vps,omitempty"`
	AdditionalProperties map[string]interface{}    `json:"-"`
}

ExtendedTokenIntrospectionResponse defines model for ExtendedTokenIntrospectionResponse.

func (ExtendedTokenIntrospectionResponse) Get

func (a ExtendedTokenIntrospectionResponse) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for ExtendedTokenIntrospectionResponse. Returns the specified element and whether it was found

func (ExtendedTokenIntrospectionResponse) MarshalJSON

func (a ExtendedTokenIntrospectionResponse) MarshalJSON() ([]byte, error)

Override default JSON handling for ExtendedTokenIntrospectionResponse to handle AdditionalProperties

func (*ExtendedTokenIntrospectionResponse) Set

func (a *ExtendedTokenIntrospectionResponse) Set(fieldName string, value interface{})

Setter for additional properties for ExtendedTokenIntrospectionResponse

func (*ExtendedTokenIntrospectionResponse) UnmarshalJSON

func (a *ExtendedTokenIntrospectionResponse) UnmarshalJSON(b []byte) error

Override default JSON handling for ExtendedTokenIntrospectionResponse to handle AdditionalProperties

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type IntrospectAccessTokenExtendedFormdataRequestBody

type IntrospectAccessTokenExtendedFormdataRequestBody = TokenIntrospectionRequest

IntrospectAccessTokenExtendedFormdataRequestBody defines body for IntrospectAccessTokenExtended for application/x-www-form-urlencoded ContentType.

type IntrospectAccessTokenExtendedResponse

type IntrospectAccessTokenExtendedResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ExtendedTokenIntrospectionResponse
}

func ParseIntrospectAccessTokenExtendedResponse

func ParseIntrospectAccessTokenExtendedResponse(rsp *http.Response) (*IntrospectAccessTokenExtendedResponse, error)

ParseIntrospectAccessTokenExtendedResponse parses an HTTP response from a IntrospectAccessTokenExtendedWithResponse call

func (IntrospectAccessTokenExtendedResponse) Status

Status returns HTTPResponse.Status

func (IntrospectAccessTokenExtendedResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type IntrospectAccessTokenFormdataRequestBody

type IntrospectAccessTokenFormdataRequestBody = TokenIntrospectionRequest

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

type IntrospectAccessTokenResponse

type IntrospectAccessTokenResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TokenIntrospectionResponse
}

func ParseIntrospectAccessTokenResponse

func ParseIntrospectAccessTokenResponse(rsp *http.Response) (*IntrospectAccessTokenResponse, error)

ParseIntrospectAccessTokenResponse parses an HTTP response from a IntrospectAccessTokenWithResponse call

func (IntrospectAccessTokenResponse) Status

Status returns HTTPResponse.Status

func (IntrospectAccessTokenResponse) StatusCode

func (r IntrospectAccessTokenResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PresentationDefinition

type PresentationDefinition = map[string]interface{}

PresentationDefinition A presentation definition is a JSON object that describes the desired verifiable credentials and presentation formats. Specified at https://identity.foundation/presentation-exchange/spec/v2.0.0/

type PresentationSubmission

type PresentationSubmission = map[string]interface{}

PresentationSubmission A presentation submission is a JSON object that describes the mapping between the required verifiable credentials listed in the presentation definition and the supplied verifiable presentation. Specified at https://identity.foundation/presentation-exchange/spec/v2.0.0/

type RedirectResponse

type RedirectResponse struct {
	// RedirectUri The URL to which the user-agent will be redirected after the authorization request.
	RedirectUri string `json:"redirect_uri"`
}

RedirectResponse defines model for RedirectResponse.

type RedirectResponseWithID

type RedirectResponseWithID struct {
	// RedirectUri The URL to which the user-agent will be redirected after the authorization request.
	RedirectUri string `json:"redirect_uri"`

	// SessionId The session ID that can be used to retrieve the access token by the calling application.
	SessionId string `json:"session_id"`
}

RedirectResponseWithID defines model for RedirectResponseWithID.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type RequestOpenid4VCICredentialIssuanceJSONBody

type RequestOpenid4VCICredentialIssuanceJSONBody struct {
	AuthorizationDetails []map[string]interface{} `json:"authorization_details"`

	// Issuer The OAuth Authorization Server's identifier, that issues the Verifiable Credentials, as specified in RFC 8414 (section 2),
	// used to locate the OAuth2 Authorization Server metadata.
	Issuer string `json:"issuer"`

	// RedirectUri The URL to which the user-agent will be redirected after the authorization request.
	RedirectUri string `json:"redirect_uri"`

	// WalletDid The DID to which the Verifiable Credential must be issued. Must be owned by the given subject.
	WalletDid string `json:"wallet_did"`
}

RequestOpenid4VCICredentialIssuanceJSONBody defines parameters for RequestOpenid4VCICredentialIssuance.

type RequestOpenid4VCICredentialIssuanceJSONRequestBody

type RequestOpenid4VCICredentialIssuanceJSONRequestBody RequestOpenid4VCICredentialIssuanceJSONBody

RequestOpenid4VCICredentialIssuanceJSONRequestBody defines body for RequestOpenid4VCICredentialIssuance for application/json ContentType.

type RequestOpenid4VCICredentialIssuanceResponse

type RequestOpenid4VCICredentialIssuanceResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *RedirectResponse
	ApplicationproblemJSONDefault *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"`
	}
}

func ParseRequestOpenid4VCICredentialIssuanceResponse

func ParseRequestOpenid4VCICredentialIssuanceResponse(rsp *http.Response) (*RequestOpenid4VCICredentialIssuanceResponse, error)

ParseRequestOpenid4VCICredentialIssuanceResponse parses an HTTP response from a RequestOpenid4VCICredentialIssuanceWithResponse call

func (RequestOpenid4VCICredentialIssuanceResponse) Status

Status returns HTTPResponse.Status

func (RequestOpenid4VCICredentialIssuanceResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type RequestServiceAccessTokenJSONRequestBody

type RequestServiceAccessTokenJSONRequestBody = ServiceAccessTokenRequest

RequestServiceAccessTokenJSONRequestBody defines body for RequestServiceAccessToken for application/json ContentType.

type RequestServiceAccessTokenResponse

type RequestServiceAccessTokenResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *TokenResponse
	ApplicationproblemJSONDefault *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"`
	}
}

func ParseRequestServiceAccessTokenResponse

func ParseRequestServiceAccessTokenResponse(rsp *http.Response) (*RequestServiceAccessTokenResponse, error)

ParseRequestServiceAccessTokenResponse parses an HTTP response from a RequestServiceAccessTokenWithResponse call

func (RequestServiceAccessTokenResponse) Status

Status returns HTTPResponse.Status

func (RequestServiceAccessTokenResponse) StatusCode

func (r RequestServiceAccessTokenResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestUserAccessTokenJSONRequestBody

type RequestUserAccessTokenJSONRequestBody = UserAccessTokenRequest

RequestUserAccessTokenJSONRequestBody defines body for RequestUserAccessToken for application/json ContentType.

type RequestUserAccessTokenResponse

type RequestUserAccessTokenResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *RedirectResponseWithID
	ApplicationproblemJSONDefault *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"`
	}
}

func ParseRequestUserAccessTokenResponse

func ParseRequestUserAccessTokenResponse(rsp *http.Response) (*RequestUserAccessTokenResponse, error)

ParseRequestUserAccessTokenResponse parses an HTTP response from a RequestUserAccessTokenWithResponse call

func (RequestUserAccessTokenResponse) Status

Status returns HTTPResponse.Status

func (RequestUserAccessTokenResponse) StatusCode

func (r RequestUserAccessTokenResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequiredPresentationDefinitions

type RequiredPresentationDefinitions map[string]PresentationDefinition

RequiredPresentationDefinitions Presentation Definitions, as described in Presentation Exchange specification, fulfilled to obtain the access token The map key is the wallet owner (user/organization)

type RetrieveAccessTokenResponse

type RetrieveAccessTokenResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *TokenResponse
	ApplicationproblemJSONDefault *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"`
	}
}

func ParseRetrieveAccessTokenResponse

func ParseRetrieveAccessTokenResponse(rsp *http.Response) (*RetrieveAccessTokenResponse, error)

ParseRetrieveAccessTokenResponse parses an HTTP response from a RetrieveAccessTokenWithResponse call

func (RetrieveAccessTokenResponse) Status

Status returns HTTPResponse.Status

func (RetrieveAccessTokenResponse) StatusCode

func (r RetrieveAccessTokenResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ServiceAccessTokenRequest

type ServiceAccessTokenRequest struct {
	// AuthorizationServer The OAuth Authorization Server's identifier as specified in RFC 8414 (section 2),
	// used to locate the OAuth2 Authorization Server metadata.
	AuthorizationServer string `json:"authorization_server"`

	// Credentials Additional credentials to present (if required by the authorizer), in addition to those in the requester's wallet.
	// They must be in the form of a Verifiable Credential in JSON form.
	// The serialized form (JWT or JSON-LD) in the resulting Verifiable Presentation depends on the capability of the authorizing party.
	// A typical use case is to provide a self-attested credential to convey information about the user that initiated the request.
	//
	// The following credential fields are automatically filled (when not present), and may be omitted:
	// - issuer, credentialSubject.id (filled with the DID of the requester)
	// - issuanceDate (filled with the current date/time)
	// - id (filled with a UUID)
	Credentials *[]VerifiableCredential `json:"credentials,omitempty"`

	// Scope The scope that will be the service for which this access token can be used.
	Scope string `json:"scope"`

	// TokenType The type of access token that is preferred, default: DPoP
	TokenType *ServiceAccessTokenRequestTokenType `json:"token_type,omitempty"`
}

ServiceAccessTokenRequest Request for an access token for a service.

type ServiceAccessTokenRequestTokenType

type ServiceAccessTokenRequestTokenType string

ServiceAccessTokenRequestTokenType The type of access token that is preferred, default: DPoP

const (
	ServiceAccessTokenRequestTokenTypeBearer ServiceAccessTokenRequestTokenType = "Bearer"
	ServiceAccessTokenRequestTokenTypeDPoP   ServiceAccessTokenRequestTokenType = "DPoP"
)

Defines values for ServiceAccessTokenRequestTokenType.

type TokenIntrospectionRequest

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

TokenIntrospectionRequest Token introspection request as described in RFC7662 section 2.1 Alongside the defined properties, it can return values (additionalProperties) from the Verifiable Credentials that resulted from the Presentation Exchange.

type TokenIntrospectionResponse

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

	// Aud RFC7662 - Service-specific string identifier or list of string identifiers representing the intended audience for this token, as defined in JWT [RFC7519].
	Aud *string `json:"aud,omitempty"`

	// ClientId The client (DID) the access token was issued to
	ClientId *string `json:"client_id,omitempty"`

	// Cnf The 'confirmation' claim is used in JWTs to proof the possession of a key.
	Cnf *Cnf `json:"cnf,omitempty"`

	// Exp Expiration date in seconds since UNIX epoch
	Exp *int `json:"exp,omitempty"`

	// Iat Issuance time in seconds since UNIX epoch
	Iat *int `json:"iat,omitempty"`

	// Iss Contains the DID of the authorizer. Should be equal to 'sub'
	Iss *string `json:"iss,omitempty"`

	// Scope granted scopes
	Scope                *string                `json:"scope,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

TokenIntrospectionResponse Token introspection response as described in RFC7662 section 2.2

func (TokenIntrospectionResponse) Get

func (a TokenIntrospectionResponse) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for TokenIntrospectionResponse. Returns the specified element and whether it was found

func (TokenIntrospectionResponse) MarshalJSON

func (a TokenIntrospectionResponse) MarshalJSON() ([]byte, error)

Override default JSON handling for TokenIntrospectionResponse to handle AdditionalProperties

func (*TokenIntrospectionResponse) Set

func (a *TokenIntrospectionResponse) Set(fieldName string, value interface{})

Setter for additional properties for TokenIntrospectionResponse

func (*TokenIntrospectionResponse) UnmarshalJSON

func (a *TokenIntrospectionResponse) UnmarshalJSON(b []byte) error

Override default JSON handling for TokenIntrospectionResponse to handle AdditionalProperties

type TokenResponse

type TokenResponse struct {
	// AccessToken The access token issued by the authorization server.
	AccessToken string `json:"access_token"`

	// DpopKid The kid of the DPoP key that is used to sign dpop headers.
	DpopKid *string `json:"dpop_kid,omitempty"`

	// ExpiresIn The lifetime in seconds of the access token.
	ExpiresIn *int    `json:"expires_in,omitempty"`
	Scope     *string `json:"scope,omitempty"`

	// Status The status of the access token request. Can be 'pending' or 'active'.
	// If the status is 'pending', the access token is not yet available.
	// Only used when the access token is requested through /request-user-access-token.
	Status *TokenResponseStatus `json:"status,omitempty"`

	// TokenType The type of the token issued as described in [RFC6749].
	TokenType string `json:"token_type"`
}

TokenResponse Token Responses are made as defined in (RFC6749)[https://datatracker.ietf.org/doc/html/rfc6749#section-5.1]

type TokenResponseStatus

type TokenResponseStatus string

TokenResponseStatus The status of the access token request. Can be 'pending' or 'active'. If the status is 'pending', the access token is not yet available. Only used when the access token is requested through /request-user-access-token.

const (
	Active  TokenResponseStatus = "active"
	Pending TokenResponseStatus = "pending"
)

Defines values for TokenResponseStatus.

type UserAccessTokenRequest

type UserAccessTokenRequest struct {
	// AuthorizationServer The OAuth Authorization Server's identifier as specified in RFC 8414 (section 2),
	// used to locate the OAuth2 Authorization Server metadata.
	AuthorizationServer string `json:"authorization_server"`

	// PreauthorizedUser Claims about the authorized user.
	PreauthorizedUser *UserDetails `json:"preauthorized_user,omitempty"`

	// RedirectUri The URL to which the user-agent will be redirected after the authorization request.
	// This is the URL of the calling application.
	// The OAuth2 flow will finish at the /callback URL of the node and the node will redirect the user to this redirect_uri.
	RedirectUri string `json:"redirect_uri"`

	// Scope The scope that will be the service for which this access token can be used.
	Scope string `json:"scope"`

	// TokenType The type of access token that is prefered. Supported values: [Bearer, DPoP], default: DPoP
	TokenType *UserAccessTokenRequestTokenType `json:"token_type,omitempty"`
}

UserAccessTokenRequest Request for an access token for a user.

type UserAccessTokenRequestTokenType

type UserAccessTokenRequestTokenType string

UserAccessTokenRequestTokenType The type of access token that is prefered. Supported values: [Bearer, DPoP], default: DPoP

const (
	UserAccessTokenRequestTokenTypeBearer UserAccessTokenRequestTokenType = "Bearer"
	UserAccessTokenRequestTokenTypeDPoP   UserAccessTokenRequestTokenType = "DPoP"
)

Defines values for UserAccessTokenRequestTokenType.

type UserDetails

type UserDetails struct {
	// Id Machine-readable identifier, uniquely identifying the user in the issuing system.
	Id string `json:"id"`

	// Name Human-readable name of the user.
	Name string `json:"name"`

	// Role Role of the user.
	Role string `json:"role"`
}

UserDetails Claims about the authorized user.

type ValidateDPoPProofJSONRequestBody

type ValidateDPoPProofJSONRequestBody = DPoPValidateRequest

ValidateDPoPProofJSONRequestBody defines body for ValidateDPoPProof for application/json ContentType.

type ValidateDPoPProofResponse

type ValidateDPoPProofResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *DPoPValidateResponse
	ApplicationproblemJSONDefault *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"`
	}
}

func ParseValidateDPoPProofResponse

func ParseValidateDPoPProofResponse(rsp *http.Response) (*ValidateDPoPProofResponse, error)

ParseValidateDPoPProofResponse parses an HTTP response from a ValidateDPoPProofWithResponse call

func (ValidateDPoPProofResponse) Status

func (r ValidateDPoPProofResponse) Status() string

Status returns HTTPResponse.Status

func (ValidateDPoPProofResponse) StatusCode

func (r ValidateDPoPProofResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type VerifiableCredential

type VerifiableCredential = externalRef0.VerifiableCredential

VerifiableCredential defines model for VerifiableCredential.

type VerifiablePresentation

type VerifiablePresentation = externalRef0.VerifiablePresentation

VerifiablePresentation defines model for VerifiablePresentation.

Jump to

Keyboard shortcuts

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