Documentation ¶
Overview ¶
Package generated provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.
Package generated provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.
Package generated provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.
Package generated provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
- func NewGetOauth2V2AuthorizationRequest(server string) (*http.Request, error)
- func NewGetOauth2V2JwksRequest(server string) (*http.Request, error)
- func NewGetOidcCallbackRequest(server string) (*http.Request, error)
- func NewGetWellKnownOpenidConfigurationRequest(server string) (*http.Request, error)
- func NewPostOauth2V2LoginRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewPostOauth2V2LoginRequestWithFormdataBody(server string, body PostOauth2V2LoginFormdataRequestBody) (*http.Request, error)
- func NewPostOauth2V2TokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewPostOauth2V2TokenRequestWithFormdataBody(server string, body PostOauth2V2TokenFormdataRequestBody) (*http.Request, error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type AuthMethod
- type BadRequestResponse
- type ChiServerOptions
- type Claim
- type Client
- func (c *Client) GetOauth2V2Authorization(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetOauth2V2Jwks(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetOidcCallback(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetWellKnownOpenidConfiguration(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) PostOauth2V2LoginWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) PostOauth2V2LoginWithFormdataBody(ctx context.Context, body PostOauth2V2LoginFormdataRequestBody, ...) (*http.Response, error)
- func (c *Client) PostOauth2V2TokenWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) PostOauth2V2TokenWithFormdataBody(ctx context.Context, body PostOauth2V2TokenFormdataRequestBody, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) GetOauth2V2AuthorizationWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOauth2V2AuthorizationResponse, error)
- func (c *ClientWithResponses) GetOauth2V2JwksWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOauth2V2JwksResponse, error)
- func (c *ClientWithResponses) GetOidcCallbackWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOidcCallbackResponse, error)
- func (c *ClientWithResponses) GetWellKnownOpenidConfigurationWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetWellKnownOpenidConfigurationResponse, error)
- func (c *ClientWithResponses) PostOauth2V2LoginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*PostOauth2V2LoginResponse, error)
- func (c *ClientWithResponses) PostOauth2V2LoginWithFormdataBodyWithResponse(ctx context.Context, body PostOauth2V2LoginFormdataRequestBody, ...) (*PostOauth2V2LoginResponse, error)
- func (c *ClientWithResponses) PostOauth2V2TokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*PostOauth2V2TokenResponse, error)
- func (c *ClientWithResponses) PostOauth2V2TokenWithFormdataBodyWithResponse(ctx context.Context, body PostOauth2V2TokenFormdataRequestBody, ...) (*PostOauth2V2TokenResponse, error)
- type ClientWithResponsesInterface
- type CodeChallengeMethod
- type GetOauth2V2AuthorizationResponse
- type GetOauth2V2JwksResponse
- type GetOidcCallbackResponse
- type GetWellKnownOpenidConfigurationResponse
- type GrantType
- type HttpRequestDoer
- type InternalServerErrorResponse
- type InvalidParamFormatError
- type JsonWebKey
- type JsonWebKeySet
- type JwksResponse
- type LoginRequestOptions
- type MiddlewareFunc
- type Oauth2Error
- type Oauth2ErrorError
- type OpenidConfiguration
- type OpenidConfigurationResponse
- type PostOauth2V2LoginFormdataRequestBody
- type PostOauth2V2LoginResponse
- type PostOauth2V2TokenFormdataRequestBody
- type PostOauth2V2TokenResponse
- type RequestEditorFn
- type RequiredHeaderError
- type RequiredParamError
- type ResponseType
- type Scope
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) GetOauth2V2Authorization(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetOauth2V2Jwks(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetOidcCallback(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetWellKnownOpenidConfiguration(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostOauth2V2Login(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PostOauth2V2Token(w http.ResponseWriter, r *http.Request)
- type SigningAlgorithm
- type Token
- type TokenRequestOptions
- func (t TokenRequestOptions) AsTokenRequestOptions0() (TokenRequestOptions0, error)
- func (t TokenRequestOptions) AsTokenRequestOptions1() (TokenRequestOptions1, error)
- func (t *TokenRequestOptions) FromTokenRequestOptions0(v TokenRequestOptions0) error
- func (t *TokenRequestOptions) FromTokenRequestOptions1(v TokenRequestOptions1) error
- func (t TokenRequestOptions) MarshalJSON() ([]byte, error)
- func (t *TokenRequestOptions) MergeTokenRequestOptions0(v TokenRequestOptions0) error
- func (t *TokenRequestOptions) MergeTokenRequestOptions1(v TokenRequestOptions1) error
- func (t *TokenRequestOptions) UnmarshalJSON(b []byte) error
- type TokenRequestOptions0
- type TokenRequestOptions1
- type TokenResponse
- type TooManyValuesForParamError
- type UnauthorizedResponse
- type UnescapedCookieParamError
- type UnmarshallingParamError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerFromMuxWithBaseURL ¶
func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
func NewGetOauth2V2AuthorizationRequest ¶
NewGetOauth2V2AuthorizationRequest generates requests for GetOauth2V2Authorization
func NewGetOauth2V2JwksRequest ¶
NewGetOauth2V2JwksRequest generates requests for GetOauth2V2Jwks
func NewGetOidcCallbackRequest ¶
NewGetOidcCallbackRequest generates requests for GetOidcCallback
func NewGetWellKnownOpenidConfigurationRequest ¶
NewGetWellKnownOpenidConfigurationRequest generates requests for GetWellKnownOpenidConfiguration
func NewPostOauth2V2LoginRequestWithBody ¶
func NewPostOauth2V2LoginRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewPostOauth2V2LoginRequestWithBody generates requests for PostOauth2V2Login with any type of body
func NewPostOauth2V2LoginRequestWithFormdataBody ¶
func NewPostOauth2V2LoginRequestWithFormdataBody(server string, body PostOauth2V2LoginFormdataRequestBody) (*http.Request, error)
NewPostOauth2V2LoginRequestWithFormdataBody calls the generic PostOauth2V2Login builder with application/x-www-form-urlencoded body
func NewPostOauth2V2TokenRequestWithBody ¶
func NewPostOauth2V2TokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewPostOauth2V2TokenRequestWithBody generates requests for PostOauth2V2Token with any type of body
func NewPostOauth2V2TokenRequestWithFormdataBody ¶
func NewPostOauth2V2TokenRequestWithFormdataBody(server string, body PostOauth2V2TokenFormdataRequestBody) (*http.Request, error)
NewPostOauth2V2TokenRequestWithFormdataBody calls the generic PostOauth2V2Token builder with application/x-www-form-urlencoded body
Types ¶
type AuthMethod ¶
type AuthMethod string
AuthMethod Supported authentication methods.
const ( ClientSecretBasic AuthMethod = "client_secret_basic" ClientSecretPost AuthMethod = "client_secret_post" )
Defines values for AuthMethod.
type BadRequestResponse ¶
type BadRequestResponse = Oauth2Error
BadRequestResponse Generic error message.
type ChiServerOptions ¶
type ChiServerOptions struct { BaseURL string BaseRouter chi.Router Middlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
type Claim ¶
type Claim string
Claim Supported claims.
const ( ClaimAud Claim = "aud" ClaimEmail Claim = "email" ClaimEmailVerified Claim = "email_verified" ClaimExp Claim = "exp" ClaimFamilityName Claim = "famility_name" ClaimGivenName Claim = "given_name" ClaimIat Claim = "iat" ClaimIss Claim = "iss" ClaimLocale Claim = "locale" ClaimName Claim = "name" ClaimPicture Claim = "picture" ClaimSub Claim = "sub" )
Defines values for Claim.
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) GetOauth2V2Authorization ¶
func (*Client) GetOauth2V2Jwks ¶
func (*Client) GetOidcCallback ¶
func (*Client) GetWellKnownOpenidConfiguration ¶
func (*Client) PostOauth2V2LoginWithBody ¶
func (*Client) PostOauth2V2LoginWithFormdataBody ¶
func (c *Client) PostOauth2V2LoginWithFormdataBody(ctx context.Context, body PostOauth2V2LoginFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PostOauth2V2TokenWithBody ¶
func (*Client) PostOauth2V2TokenWithFormdataBody ¶
func (c *Client) PostOauth2V2TokenWithFormdataBody(ctx context.Context, body PostOauth2V2TokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // GetWellKnownOpenidConfiguration request GetWellKnownOpenidConfiguration(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // GetOauth2V2Authorization request GetOauth2V2Authorization(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // GetOauth2V2Jwks request GetOauth2V2Jwks(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // PostOauth2V2Login request with any body PostOauth2V2LoginWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) PostOauth2V2LoginWithFormdataBody(ctx context.Context, body PostOauth2V2LoginFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // PostOauth2V2Token request with any body PostOauth2V2TokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) PostOauth2V2TokenWithFormdataBody(ctx context.Context, body PostOauth2V2TokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // GetOidcCallback request GetOidcCallback(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) }
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
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) GetOauth2V2AuthorizationWithResponse ¶
func (c *ClientWithResponses) GetOauth2V2AuthorizationWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOauth2V2AuthorizationResponse, error)
GetOauth2V2AuthorizationWithResponse request returning *GetOauth2V2AuthorizationResponse
func (*ClientWithResponses) GetOauth2V2JwksWithResponse ¶
func (c *ClientWithResponses) GetOauth2V2JwksWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOauth2V2JwksResponse, error)
GetOauth2V2JwksWithResponse request returning *GetOauth2V2JwksResponse
func (*ClientWithResponses) GetOidcCallbackWithResponse ¶
func (c *ClientWithResponses) GetOidcCallbackWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOidcCallbackResponse, error)
GetOidcCallbackWithResponse request returning *GetOidcCallbackResponse
func (*ClientWithResponses) GetWellKnownOpenidConfigurationWithResponse ¶
func (c *ClientWithResponses) GetWellKnownOpenidConfigurationWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetWellKnownOpenidConfigurationResponse, error)
GetWellKnownOpenidConfigurationWithResponse request returning *GetWellKnownOpenidConfigurationResponse
func (*ClientWithResponses) PostOauth2V2LoginWithBodyWithResponse ¶
func (c *ClientWithResponses) PostOauth2V2LoginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOauth2V2LoginResponse, error)
PostOauth2V2LoginWithBodyWithResponse request with arbitrary body returning *PostOauth2V2LoginResponse
func (*ClientWithResponses) PostOauth2V2LoginWithFormdataBodyWithResponse ¶
func (c *ClientWithResponses) PostOauth2V2LoginWithFormdataBodyWithResponse(ctx context.Context, body PostOauth2V2LoginFormdataRequestBody, reqEditors ...RequestEditorFn) (*PostOauth2V2LoginResponse, error)
func (*ClientWithResponses) PostOauth2V2TokenWithBodyWithResponse ¶
func (c *ClientWithResponses) PostOauth2V2TokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOauth2V2TokenResponse, error)
PostOauth2V2TokenWithBodyWithResponse request with arbitrary body returning *PostOauth2V2TokenResponse
func (*ClientWithResponses) PostOauth2V2TokenWithFormdataBodyWithResponse ¶
func (c *ClientWithResponses) PostOauth2V2TokenWithFormdataBodyWithResponse(ctx context.Context, body PostOauth2V2TokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*PostOauth2V2TokenResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // GetWellKnownOpenidConfiguration request GetWellKnownOpenidConfigurationWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetWellKnownOpenidConfigurationResponse, error) // GetOauth2V2Authorization request GetOauth2V2AuthorizationWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOauth2V2AuthorizationResponse, error) // GetOauth2V2Jwks request GetOauth2V2JwksWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOauth2V2JwksResponse, error) // PostOauth2V2Login request with any body PostOauth2V2LoginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOauth2V2LoginResponse, error) PostOauth2V2LoginWithFormdataBodyWithResponse(ctx context.Context, body PostOauth2V2LoginFormdataRequestBody, reqEditors ...RequestEditorFn) (*PostOauth2V2LoginResponse, error) // PostOauth2V2Token request with any body PostOauth2V2TokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOauth2V2TokenResponse, error) PostOauth2V2TokenWithFormdataBodyWithResponse(ctx context.Context, body PostOauth2V2TokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*PostOauth2V2TokenResponse, error) // GetOidcCallback request GetOidcCallbackWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOidcCallbackResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CodeChallengeMethod ¶
type CodeChallengeMethod string
CodeChallengeMethod Supported code challenge methods.
const ( Plain CodeChallengeMethod = "plain" S256 CodeChallengeMethod = "S256" )
Defines values for CodeChallengeMethod.
type GetOauth2V2AuthorizationResponse ¶
type GetOauth2V2AuthorizationResponse struct { Body []byte HTTPResponse *http.Response JSON400 *Oauth2Error JSON500 *Oauth2Error }
func ParseGetOauth2V2AuthorizationResponse ¶
func ParseGetOauth2V2AuthorizationResponse(rsp *http.Response) (*GetOauth2V2AuthorizationResponse, error)
ParseGetOauth2V2AuthorizationResponse parses an HTTP response from a GetOauth2V2AuthorizationWithResponse call
func (GetOauth2V2AuthorizationResponse) Status ¶
func (r GetOauth2V2AuthorizationResponse) Status() string
Status returns HTTPResponse.Status
func (GetOauth2V2AuthorizationResponse) StatusCode ¶
func (r GetOauth2V2AuthorizationResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetOauth2V2JwksResponse ¶
type GetOauth2V2JwksResponse struct { Body []byte HTTPResponse *http.Response JSON200 *JsonWebKeySet JSON500 *Oauth2Error }
func ParseGetOauth2V2JwksResponse ¶
func ParseGetOauth2V2JwksResponse(rsp *http.Response) (*GetOauth2V2JwksResponse, error)
ParseGetOauth2V2JwksResponse parses an HTTP response from a GetOauth2V2JwksWithResponse call
func (GetOauth2V2JwksResponse) Status ¶
func (r GetOauth2V2JwksResponse) Status() string
Status returns HTTPResponse.Status
func (GetOauth2V2JwksResponse) StatusCode ¶
func (r GetOauth2V2JwksResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetOidcCallbackResponse ¶
type GetOidcCallbackResponse struct { Body []byte HTTPResponse *http.Response JSON500 *Oauth2Error }
func ParseGetOidcCallbackResponse ¶
func ParseGetOidcCallbackResponse(rsp *http.Response) (*GetOidcCallbackResponse, error)
ParseGetOidcCallbackResponse parses an HTTP response from a GetOidcCallbackWithResponse call
func (GetOidcCallbackResponse) Status ¶
func (r GetOidcCallbackResponse) Status() string
Status returns HTTPResponse.Status
func (GetOidcCallbackResponse) StatusCode ¶
func (r GetOidcCallbackResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetWellKnownOpenidConfigurationResponse ¶
type GetWellKnownOpenidConfigurationResponse struct { Body []byte HTTPResponse *http.Response JSON200 *OpenidConfiguration }
func ParseGetWellKnownOpenidConfigurationResponse ¶
func ParseGetWellKnownOpenidConfigurationResponse(rsp *http.Response) (*GetWellKnownOpenidConfigurationResponse, error)
ParseGetWellKnownOpenidConfigurationResponse parses an HTTP response from a GetWellKnownOpenidConfigurationWithResponse call
func (GetWellKnownOpenidConfigurationResponse) Status ¶
func (r GetWellKnownOpenidConfigurationResponse) Status() string
Status returns HTTPResponse.Status
func (GetWellKnownOpenidConfigurationResponse) StatusCode ¶
func (r GetWellKnownOpenidConfigurationResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InternalServerErrorResponse ¶
type InternalServerErrorResponse = Oauth2Error
InternalServerErrorResponse Generic error message.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type JsonWebKey ¶
type JsonWebKey = map[string]interface{}
JsonWebKey JSON web key. See the relevant JWKS documentation for further details.
type JsonWebKeySet ¶
type JsonWebKeySet struct {
Keys *[]JsonWebKey `json:"keys,omitempty"`
}
JsonWebKeySet JSON web key set. This data type is defined by an external 3rd party standards committee. Consult the relevant documentation for further details.
type JwksResponse ¶
type JwksResponse = JsonWebKeySet
JwksResponse JSON web key set. This data type is defined by an external 3rd party standards committee. Consult the relevant documentation for further details.
type LoginRequestOptions ¶
type LoginRequestOptions struct { // Email The user's email address. Email string `json:"email"` // Query The query string supplied to the authorization endpoint. Query string `json:"query"` }
LoginRequestOptions Login request options.
type Oauth2Error ¶
type Oauth2Error struct { // Error A terse error string expanding on the HTTP error code. Errors are based on the OAuth2 specification, but are expanded with proprietary status codes for APIs other than those specified by OAuth2. Error Oauth2ErrorError `json:"error"` // ErrorDescription Verbose message describing the error. ErrorDescription string `json:"error_description"` }
Oauth2Error Generic error message.
type Oauth2ErrorError ¶
type Oauth2ErrorError string
Oauth2ErrorError A terse error string expanding on the HTTP error code. Errors are based on the OAuth2 specification, but are expanded with proprietary status codes for APIs other than those specified by OAuth2.
const ( AccessDenied Oauth2ErrorError = "access_denied" Conflict Oauth2ErrorError = "conflict" Forbidden Oauth2ErrorError = "forbidden" InvalidClient Oauth2ErrorError = "invalid_client" InvalidGrant Oauth2ErrorError = "invalid_grant" InvalidRequest Oauth2ErrorError = "invalid_request" InvalidScope Oauth2ErrorError = "invalid_scope" MethodNotAllowed Oauth2ErrorError = "method_not_allowed" NotFound Oauth2ErrorError = "not_found" ServerError Oauth2ErrorError = "server_error" UnsupportedGrantType Oauth2ErrorError = "unsupported_grant_type" UnsupportedMediaType Oauth2ErrorError = "unsupported_media_type" UnsupportedResponseType Oauth2ErrorError = "unsupported_response_type" )
Defines values for Oauth2ErrorError.
type OpenidConfiguration ¶
type OpenidConfiguration struct { // AuthorizationEndpoint The oauth2 endpoint that initiates authentication. AuthorizationEndpoint string `json:"authorization_endpoint"` // ClaimsSupported A list of supported claims ClaimsSupported []Claim `json:"claims_supported"` // CodeChallengeMethodsSupported A list of code challenge methods supported. CodeChallengeMethodsSupported []CodeChallengeMethod `json:"code_challenge_methods_supported"` // GrantTypesSupported A list of supported grants for the token endpoint. GrantTypesSupported []GrantType `json:"grant_types_supported"` // IdTokenSigningAlgValuesSupported A list of signing algorithms supported for ID tokens. IdTokenSigningAlgValuesSupported []SigningAlgorithm `json:"id_token_signing_alg_values_supported"` // Issuer The OpenID Issuer (iss field). Issuer string `json:"issuer"` // JwksUri The oauth2 endpoint that exposes public signing keys for token validation. JwksUri string `json:"jwks_uri"` // ResponseTypesSupported A list of supported response types that can be requested for the authorization endpoint. ResponseTypesSupported []ResponseType `json:"response_types_supported"` // ScopesSupported A list of supported oauth2 scopes. ScopesSupported []Scope `json:"scopes_supported"` // TokenEndpoint The oauth2 endpoint that is used to exchange an authentication code for tokens. TokenEndpoint string `json:"token_endpoint"` // TokenEndpointAuthMethodsSupported A list of supported authentication methods for the token endpoint. TokenEndpointAuthMethodsSupported []AuthMethod `json:"token_endpoint_auth_methods_supported"` }
OpenidConfiguration OpenID configuration.
type OpenidConfigurationResponse ¶
type OpenidConfigurationResponse = OpenidConfiguration
OpenidConfigurationResponse OpenID configuration.
type PostOauth2V2LoginFormdataRequestBody ¶
type PostOauth2V2LoginFormdataRequestBody = LoginRequestOptions
PostOauth2V2LoginFormdataRequestBody defines body for PostOauth2V2Login for application/x-www-form-urlencoded ContentType.
type PostOauth2V2LoginResponse ¶
func ParsePostOauth2V2LoginResponse ¶
func ParsePostOauth2V2LoginResponse(rsp *http.Response) (*PostOauth2V2LoginResponse, error)
ParsePostOauth2V2LoginResponse parses an HTTP response from a PostOauth2V2LoginWithResponse call
func (PostOauth2V2LoginResponse) Status ¶
func (r PostOauth2V2LoginResponse) Status() string
Status returns HTTPResponse.Status
func (PostOauth2V2LoginResponse) StatusCode ¶
func (r PostOauth2V2LoginResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PostOauth2V2TokenFormdataRequestBody ¶
type PostOauth2V2TokenFormdataRequestBody = TokenRequestOptions
PostOauth2V2TokenFormdataRequestBody defines body for PostOauth2V2Token for application/x-www-form-urlencoded ContentType.
type PostOauth2V2TokenResponse ¶
type PostOauth2V2TokenResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Token JSON400 *Oauth2Error JSON401 *Oauth2Error JSON500 *Oauth2Error }
func ParsePostOauth2V2TokenResponse ¶
func ParsePostOauth2V2TokenResponse(rsp *http.Response) (*PostOauth2V2TokenResponse, error)
ParsePostOauth2V2TokenResponse parses an HTTP response from a PostOauth2V2TokenWithResponse call
func (PostOauth2V2TokenResponse) Status ¶
func (r PostOauth2V2TokenResponse) Status() string
Status returns HTTPResponse.Status
func (PostOauth2V2TokenResponse) StatusCode ¶
func (r PostOauth2V2TokenResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type ResponseType ¶
type ResponseType string
ResponseType Supported response types.
const ( ResponseTypeCode ResponseType = "code" ResponseTypeCodeIdToken ResponseType = "code id_token" ResponseTypeCodeToken ResponseType = "code token" ResponseTypeCodeTokenIdToken ResponseType = "code token id_token" ResponseTypeIdToken ResponseType = "id_token" ResponseTypeNone ResponseType = "none" ResponseTypeToken ResponseType = "token" ResponseTypeTokenIdToken ResponseType = "token id_token" )
Defines values for ResponseType.
type ServerInterface ¶
type ServerInterface interface { // (GET /.well-known/openid-configuration) GetWellKnownOpenidConfiguration(w http.ResponseWriter, r *http.Request) // (GET /oauth2/v2/authorization) GetOauth2V2Authorization(w http.ResponseWriter, r *http.Request) // (GET /oauth2/v2/jwks) GetOauth2V2Jwks(w http.ResponseWriter, r *http.Request) // (POST /oauth2/v2/login) PostOauth2V2Login(w http.ResponseWriter, r *http.Request) // (POST /oauth2/v2/token) PostOauth2V2Token(w http.ResponseWriter, r *http.Request) // (GET /oidc/callback) GetOidcCallback(w http.ResponseWriter, r *http.Request) }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct { Handler ServerInterface HandlerMiddlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) GetOauth2V2Authorization ¶
func (siw *ServerInterfaceWrapper) GetOauth2V2Authorization(w http.ResponseWriter, r *http.Request)
GetOauth2V2Authorization operation middleware
func (*ServerInterfaceWrapper) GetOauth2V2Jwks ¶
func (siw *ServerInterfaceWrapper) GetOauth2V2Jwks(w http.ResponseWriter, r *http.Request)
GetOauth2V2Jwks operation middleware
func (*ServerInterfaceWrapper) GetOidcCallback ¶
func (siw *ServerInterfaceWrapper) GetOidcCallback(w http.ResponseWriter, r *http.Request)
GetOidcCallback operation middleware
func (*ServerInterfaceWrapper) GetWellKnownOpenidConfiguration ¶
func (siw *ServerInterfaceWrapper) GetWellKnownOpenidConfiguration(w http.ResponseWriter, r *http.Request)
GetWellKnownOpenidConfiguration operation middleware
func (*ServerInterfaceWrapper) PostOauth2V2Login ¶
func (siw *ServerInterfaceWrapper) PostOauth2V2Login(w http.ResponseWriter, r *http.Request)
PostOauth2V2Login operation middleware
func (*ServerInterfaceWrapper) PostOauth2V2Token ¶
func (siw *ServerInterfaceWrapper) PostOauth2V2Token(w http.ResponseWriter, r *http.Request)
PostOauth2V2Token operation middleware
type SigningAlgorithm ¶
type SigningAlgorithm string
SigningAlgorithm Supported signing algorithms.
const (
ES512 SigningAlgorithm = "ES512"
)
Defines values for SigningAlgorithm.
type Token ¶
type Token struct { // AccessToken The opaque access token. AccessToken string `json:"access_token"` // ExpiresIn The time in seconds the token will last for. ExpiresIn int `json:"expires_in"` // IdToken An OIDC ID token. IdToken *string `json:"id_token,omitempty"` // TokenType How the access token is to be presented to the resource server. TokenType string `json:"token_type"` }
Token Oauth2 token result.
type TokenRequestOptions ¶
type TokenRequestOptions struct { // ClientId Client ID. Required with the "code" grant type. ClientId *string `json:"client_id"` // Code Authorization code. Required with the "code" grant type. Code *string `json:"code"` // CodeVerifier Client code verifier. Required with the "code" grant type. CodeVerifier *string `json:"code_verifier"` // GrantType Supported grant type. Must be either "code" or "password". GrantType string `json:"grant_type"` // Password Resource owner password. Required with the "password" grant type. Password *string `json:"password"` // RedirectUri Client redirect URI. Required with the "code" grant type. RedirectUri *string `json:"redirect_uri"` // Username Resource owner username. Required with the "password" grant type. Username *string `json:"username"` // contains filtered or unexported fields }
TokenRequestOptions oauth2 token endpoint.
func (TokenRequestOptions) AsTokenRequestOptions0 ¶
func (t TokenRequestOptions) AsTokenRequestOptions0() (TokenRequestOptions0, error)
AsTokenRequestOptions0 returns the union data inside the TokenRequestOptions as a TokenRequestOptions0
func (TokenRequestOptions) AsTokenRequestOptions1 ¶
func (t TokenRequestOptions) AsTokenRequestOptions1() (TokenRequestOptions1, error)
AsTokenRequestOptions1 returns the union data inside the TokenRequestOptions as a TokenRequestOptions1
func (*TokenRequestOptions) FromTokenRequestOptions0 ¶
func (t *TokenRequestOptions) FromTokenRequestOptions0(v TokenRequestOptions0) error
FromTokenRequestOptions0 overwrites any union data inside the TokenRequestOptions as the provided TokenRequestOptions0
func (*TokenRequestOptions) FromTokenRequestOptions1 ¶
func (t *TokenRequestOptions) FromTokenRequestOptions1(v TokenRequestOptions1) error
FromTokenRequestOptions1 overwrites any union data inside the TokenRequestOptions as the provided TokenRequestOptions1
func (TokenRequestOptions) MarshalJSON ¶
func (t TokenRequestOptions) MarshalJSON() ([]byte, error)
func (*TokenRequestOptions) MergeTokenRequestOptions0 ¶
func (t *TokenRequestOptions) MergeTokenRequestOptions0(v TokenRequestOptions0) error
MergeTokenRequestOptions0 performs a merge with any union data inside the TokenRequestOptions, using the provided TokenRequestOptions0
func (*TokenRequestOptions) MergeTokenRequestOptions1 ¶
func (t *TokenRequestOptions) MergeTokenRequestOptions1(v TokenRequestOptions1) error
MergeTokenRequestOptions1 performs a merge with any union data inside the TokenRequestOptions, using the provided TokenRequestOptions1
func (*TokenRequestOptions) UnmarshalJSON ¶
func (t *TokenRequestOptions) UnmarshalJSON(b []byte) error
type TokenRequestOptions0 ¶
type TokenRequestOptions0 struct {
GrantType *interface{} `json:"grant_type,omitempty"`
}
TokenRequestOptions0 defines model for .
type TokenRequestOptions1 ¶
type TokenRequestOptions1 struct {
GrantType *interface{} `json:"grant_type,omitempty"`
}
TokenRequestOptions1 defines model for .
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnauthorizedResponse ¶
type UnauthorizedResponse = Oauth2Error
UnauthorizedResponse Generic error message.
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type UnmarshallingParamError ¶
func (*UnmarshallingParamError) Error ¶
func (e *UnmarshallingParamError) Error() string
func (*UnmarshallingParamError) Unwrap ¶
func (e *UnmarshallingParamError) Unwrap() error