Documentation ¶
Overview ¶
Package consentv1 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.8.3 DO NOT EDIT.
Index ¶
Constants ¶
const ParamRequest = "tiga_consent"
ParamRequest is the name of the request parameter that contains the URL to fetch ConsentRequest.
Variables ¶
var Routes = route{}
Routes helps configure API endpoints.
Functions ¶
This section is empty.
Types ¶
type CallbackConsentFailureJSONBody ¶
type CallbackConsentFailureJSONBody externalRef0.ErrorCallback
CallbackConsentFailureJSONBody defines parameters for CallbackConsentFailure.
type CallbackConsentFailureJSONRequestBody ¶
type CallbackConsentFailureJSONRequestBody CallbackConsentFailureJSONBody
CallbackConsentFailureJSONRequestBody defines body for CallbackConsentFailure for application/json ContentType.
type CallbackConsentSuccessJSONBody ¶
type CallbackConsentSuccessJSONBody ConsentCallback
CallbackConsentSuccessJSONBody defines parameters for CallbackConsentSuccess.
type CallbackConsentSuccessJSONRequestBody ¶
type CallbackConsentSuccessJSONRequestBody CallbackConsentSuccessJSONBody
CallbackConsentSuccessJSONRequestBody defines body for CallbackConsentSuccess for application/json ContentType.
type ConsentCallback ¶
type ConsentCallback struct { // List of scopes granted by the user. GrantedScopes []string `json:"granted_scopes,omitempty" yaml:"granted_scopes,omitempty"` }
ConsentCallback defines model for ConsentCallback.
type ConsentRequest ¶
type ConsentRequest struct { // ClientInfo contains public client information that can be used to visually identity the client. Client externalRef0.ClientInfo `json:"client,omitempty" yaml:"client,omitempty"` Links externalRef0.Links `json:"links,omitempty" yaml:"links,omitempty"` // Optional array containing prompt parameters. This fields exists only for backward compatibility // purposes but is no longer useful. The consent prompts processing capability is moved to the Tiga server. // When prompts contains PromptConsent, all requested scopes are always included in this request and requires // user approval, regardless of previous grant records. When prompts contains PromptNone, the consent // interaction will not happen. By default, only the un-granted scopes are included in this request. // For the sake of the identity provider, it is fine to ignore the prompts and just process the list of // scopes included in this request. Prompts []string `json:"prompts,omitempty" yaml:"prompts,omitempty"` // List of scope that reuqires user consent. Scopes []string `json:"scopes,omitempty" yaml:"scopes,omitempty"` // Subject identifier for the user whose consent is needed. Sub string `json:"sub,omitempty" yaml:"sub,omitempty"` // Optional list of preferred UI locales. UiLocales []string `json:"ui_locales,omitempty" yaml:"ui_locales,omitempty"` }
ConsentRequest defines model for ConsentRequest.
type ErrorResponse ¶
type ErrorResponse externalRef0.ErrorResponse
ErrorResponse defines model for ErrorResponse.
type Option ¶
type Option func(s *defaultService)
func WithTransport ¶
func WithTransport(transport http.RoundTripper) Option
type Service ¶
type Service interface { // GetConsent retrieves the ConsentRequest data from Tiga via a URL link provided on tiga during // the redirection to the Dyna consent entrypoint. GetConsent(ctx context.Context, url string) (*ConsentRequest, error) // ReplyConsentSuccess posts back the successful ConsentCallback to Tiga. ReplyConsentSuccess(ctx context.Context, req *ConsentRequest, payload *ConsentCallback) error // ReplyConsentFailure posts back the failure ErrorCallback to Tiga. ReplyConsentFailure(ctx context.Context, req *ConsentRequest, payload *commonv1.ErrorCallback) error }
Service abstracts consent API endpoints.
func NewService ¶
func NewService(oauth *clientcredentials.Config, options ...Option) Service
NewService returns a new instance of the default implementation of Service.