oauth

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithContentTypeApplicationJSON

func WithContentTypeApplicationJSON(r *runtime.ClientOperation)

WithContentTypeApplicationJSON sets the Content-Type header to "application/json".

func WithContentTypeMultipartFormData

func WithContentTypeMultipartFormData(r *runtime.ClientOperation)

WithContentTypeMultipartFormData sets the Content-Type header to "multipart/form-data".

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for oauth API

func (*Client) OauthTokenRevoke

func (a *Client) OauthTokenRevoke(params *OauthTokenRevokeParams, opts ...ClientOption) (*OauthTokenRevokeOK, error)

OauthTokenRevoke revokes an access token to make it no longer valid for use

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption may be used to customize the behavior of Client methods.

func WithContentType

func WithContentType(mime string) ClientOption

WithContentType allows the client to force the Content-Type header to negotiate a specific Consumer from the server.

You may use this option to set arbitrary extensions to your MIME media type.

type ClientService

type ClientService interface {
	OauthTokenRevoke(params *OauthTokenRevokeParams, opts ...ClientOption) (*OauthTokenRevokeOK, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new oauth API client.

func NewClientWithBasicAuth

func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService

New creates a new oauth API client with basic auth credentials. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - user: user for basic authentication header. - password: password for basic authentication header.

func NewClientWithBearerToken

func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService

New creates a new oauth API client with a bearer token for authentication. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - bearerToken: bearer token for Bearer authentication header.

type OauthTokenRevokeBadRequest

type OauthTokenRevokeBadRequest struct {
}

OauthTokenRevokeBadRequest describes a response with status code 400, with default header values.

bad request

func NewOauthTokenRevokeBadRequest

func NewOauthTokenRevokeBadRequest() *OauthTokenRevokeBadRequest

NewOauthTokenRevokeBadRequest creates a OauthTokenRevokeBadRequest with default headers values

func (*OauthTokenRevokeBadRequest) Code

func (o *OauthTokenRevokeBadRequest) Code() int

Code gets the status code for the oauth token revoke bad request response

func (*OauthTokenRevokeBadRequest) Error

func (*OauthTokenRevokeBadRequest) IsClientError

func (o *OauthTokenRevokeBadRequest) IsClientError() bool

IsClientError returns true when this oauth token revoke bad request response has a 4xx status code

func (*OauthTokenRevokeBadRequest) IsCode

func (o *OauthTokenRevokeBadRequest) IsCode(code int) bool

IsCode returns true when this oauth token revoke bad request response a status code equal to that given

func (*OauthTokenRevokeBadRequest) IsRedirect

func (o *OauthTokenRevokeBadRequest) IsRedirect() bool

IsRedirect returns true when this oauth token revoke bad request response has a 3xx status code

func (*OauthTokenRevokeBadRequest) IsServerError

func (o *OauthTokenRevokeBadRequest) IsServerError() bool

IsServerError returns true when this oauth token revoke bad request response has a 5xx status code

func (*OauthTokenRevokeBadRequest) IsSuccess

func (o *OauthTokenRevokeBadRequest) IsSuccess() bool

IsSuccess returns true when this oauth token revoke bad request response has a 2xx status code

func (*OauthTokenRevokeBadRequest) String

func (o *OauthTokenRevokeBadRequest) String() string

type OauthTokenRevokeForbidden

type OauthTokenRevokeForbidden struct {
}

OauthTokenRevokeForbidden describes a response with status code 403, with default header values.

forbidden - If you provide a token you do not own, the API call will return a 403 error.

func NewOauthTokenRevokeForbidden

func NewOauthTokenRevokeForbidden() *OauthTokenRevokeForbidden

NewOauthTokenRevokeForbidden creates a OauthTokenRevokeForbidden with default headers values

func (*OauthTokenRevokeForbidden) Code

func (o *OauthTokenRevokeForbidden) Code() int

Code gets the status code for the oauth token revoke forbidden response

func (*OauthTokenRevokeForbidden) Error

func (o *OauthTokenRevokeForbidden) Error() string

func (*OauthTokenRevokeForbidden) IsClientError

func (o *OauthTokenRevokeForbidden) IsClientError() bool

IsClientError returns true when this oauth token revoke forbidden response has a 4xx status code

func (*OauthTokenRevokeForbidden) IsCode

func (o *OauthTokenRevokeForbidden) IsCode(code int) bool

IsCode returns true when this oauth token revoke forbidden response a status code equal to that given

func (*OauthTokenRevokeForbidden) IsRedirect

func (o *OauthTokenRevokeForbidden) IsRedirect() bool

IsRedirect returns true when this oauth token revoke forbidden response has a 3xx status code

func (*OauthTokenRevokeForbidden) IsServerError

func (o *OauthTokenRevokeForbidden) IsServerError() bool

IsServerError returns true when this oauth token revoke forbidden response has a 5xx status code

func (*OauthTokenRevokeForbidden) IsSuccess

func (o *OauthTokenRevokeForbidden) IsSuccess() bool

IsSuccess returns true when this oauth token revoke forbidden response has a 2xx status code

func (*OauthTokenRevokeForbidden) String

func (o *OauthTokenRevokeForbidden) String() string

type OauthTokenRevokeInternalServerError

type OauthTokenRevokeInternalServerError struct {
}

OauthTokenRevokeInternalServerError describes a response with status code 500, with default header values.

internal server error

func NewOauthTokenRevokeInternalServerError

func NewOauthTokenRevokeInternalServerError() *OauthTokenRevokeInternalServerError

NewOauthTokenRevokeInternalServerError creates a OauthTokenRevokeInternalServerError with default headers values

func (*OauthTokenRevokeInternalServerError) Code

Code gets the status code for the oauth token revoke internal server error response

func (*OauthTokenRevokeInternalServerError) Error

func (*OauthTokenRevokeInternalServerError) IsClientError

func (o *OauthTokenRevokeInternalServerError) IsClientError() bool

IsClientError returns true when this oauth token revoke internal server error response has a 4xx status code

func (*OauthTokenRevokeInternalServerError) IsCode

IsCode returns true when this oauth token revoke internal server error response a status code equal to that given

func (*OauthTokenRevokeInternalServerError) IsRedirect

func (o *OauthTokenRevokeInternalServerError) IsRedirect() bool

IsRedirect returns true when this oauth token revoke internal server error response has a 3xx status code

func (*OauthTokenRevokeInternalServerError) IsServerError

func (o *OauthTokenRevokeInternalServerError) IsServerError() bool

IsServerError returns true when this oauth token revoke internal server error response has a 5xx status code

func (*OauthTokenRevokeInternalServerError) IsSuccess

IsSuccess returns true when this oauth token revoke internal server error response has a 2xx status code

func (*OauthTokenRevokeInternalServerError) String

type OauthTokenRevokeNotAcceptable

type OauthTokenRevokeNotAcceptable struct {
}

OauthTokenRevokeNotAcceptable describes a response with status code 406, with default header values.

not acceptable

func NewOauthTokenRevokeNotAcceptable

func NewOauthTokenRevokeNotAcceptable() *OauthTokenRevokeNotAcceptable

NewOauthTokenRevokeNotAcceptable creates a OauthTokenRevokeNotAcceptable with default headers values

func (*OauthTokenRevokeNotAcceptable) Code

Code gets the status code for the oauth token revoke not acceptable response

func (*OauthTokenRevokeNotAcceptable) Error

func (*OauthTokenRevokeNotAcceptable) IsClientError

func (o *OauthTokenRevokeNotAcceptable) IsClientError() bool

IsClientError returns true when this oauth token revoke not acceptable response has a 4xx status code

func (*OauthTokenRevokeNotAcceptable) IsCode

func (o *OauthTokenRevokeNotAcceptable) IsCode(code int) bool

IsCode returns true when this oauth token revoke not acceptable response a status code equal to that given

func (*OauthTokenRevokeNotAcceptable) IsRedirect

func (o *OauthTokenRevokeNotAcceptable) IsRedirect() bool

IsRedirect returns true when this oauth token revoke not acceptable response has a 3xx status code

func (*OauthTokenRevokeNotAcceptable) IsServerError

func (o *OauthTokenRevokeNotAcceptable) IsServerError() bool

IsServerError returns true when this oauth token revoke not acceptable response has a 5xx status code

func (*OauthTokenRevokeNotAcceptable) IsSuccess

func (o *OauthTokenRevokeNotAcceptable) IsSuccess() bool

IsSuccess returns true when this oauth token revoke not acceptable response has a 2xx status code

func (*OauthTokenRevokeNotAcceptable) String

type OauthTokenRevokeOK

type OauthTokenRevokeOK struct {
}

OauthTokenRevokeOK describes a response with status code 200, with default header values.

OK - If you own the provided token, the API call will provide OK and an empty response `{}`. This operation is idempotent, so calling this API multiple times will still return OK.

func NewOauthTokenRevokeOK

func NewOauthTokenRevokeOK() *OauthTokenRevokeOK

NewOauthTokenRevokeOK creates a OauthTokenRevokeOK with default headers values

func (*OauthTokenRevokeOK) Code

func (o *OauthTokenRevokeOK) Code() int

Code gets the status code for the oauth token revoke o k response

func (*OauthTokenRevokeOK) Error

func (o *OauthTokenRevokeOK) Error() string

func (*OauthTokenRevokeOK) IsClientError

func (o *OauthTokenRevokeOK) IsClientError() bool

IsClientError returns true when this oauth token revoke o k response has a 4xx status code

func (*OauthTokenRevokeOK) IsCode

func (o *OauthTokenRevokeOK) IsCode(code int) bool

IsCode returns true when this oauth token revoke o k response a status code equal to that given

func (*OauthTokenRevokeOK) IsRedirect

func (o *OauthTokenRevokeOK) IsRedirect() bool

IsRedirect returns true when this oauth token revoke o k response has a 3xx status code

func (*OauthTokenRevokeOK) IsServerError

func (o *OauthTokenRevokeOK) IsServerError() bool

IsServerError returns true when this oauth token revoke o k response has a 5xx status code

func (*OauthTokenRevokeOK) IsSuccess

func (o *OauthTokenRevokeOK) IsSuccess() bool

IsSuccess returns true when this oauth token revoke o k response has a 2xx status code

func (*OauthTokenRevokeOK) String

func (o *OauthTokenRevokeOK) String() string

type OauthTokenRevokeParams

type OauthTokenRevokeParams struct {

	/* ClientID.

	   The client ID, obtained during app registration.
	*/
	ClientID string

	/* ClientSecret.

	   The client secret, obtained during app registration.
	*/
	ClientSecret string

	/* Token.

	   The previously obtained token, to be invalidated.
	*/
	Token string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

OauthTokenRevokeParams contains all the parameters to send to the API endpoint

for the oauth token revoke operation.

Typically these are written to a http.Request.

func NewOauthTokenRevokeParams

func NewOauthTokenRevokeParams() *OauthTokenRevokeParams

NewOauthTokenRevokeParams creates a new OauthTokenRevokeParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewOauthTokenRevokeParamsWithContext

func NewOauthTokenRevokeParamsWithContext(ctx context.Context) *OauthTokenRevokeParams

NewOauthTokenRevokeParamsWithContext creates a new OauthTokenRevokeParams object with the ability to set a context for a request.

func NewOauthTokenRevokeParamsWithHTTPClient

func NewOauthTokenRevokeParamsWithHTTPClient(client *http.Client) *OauthTokenRevokeParams

NewOauthTokenRevokeParamsWithHTTPClient creates a new OauthTokenRevokeParams object with the ability to set a custom HTTPClient for a request.

func NewOauthTokenRevokeParamsWithTimeout

func NewOauthTokenRevokeParamsWithTimeout(timeout time.Duration) *OauthTokenRevokeParams

NewOauthTokenRevokeParamsWithTimeout creates a new OauthTokenRevokeParams object with the ability to set a timeout on a request.

func (*OauthTokenRevokeParams) SetClientID

func (o *OauthTokenRevokeParams) SetClientID(clientID string)

SetClientID adds the clientId to the oauth token revoke params

func (*OauthTokenRevokeParams) SetClientSecret

func (o *OauthTokenRevokeParams) SetClientSecret(clientSecret string)

SetClientSecret adds the clientSecret to the oauth token revoke params

func (*OauthTokenRevokeParams) SetContext

func (o *OauthTokenRevokeParams) SetContext(ctx context.Context)

SetContext adds the context to the oauth token revoke params

func (*OauthTokenRevokeParams) SetDefaults

func (o *OauthTokenRevokeParams) SetDefaults()

SetDefaults hydrates default values in the oauth token revoke params (not the query body).

All values with no default are reset to their zero value.

func (*OauthTokenRevokeParams) SetHTTPClient

func (o *OauthTokenRevokeParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the oauth token revoke params

func (*OauthTokenRevokeParams) SetTimeout

func (o *OauthTokenRevokeParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the oauth token revoke params

func (*OauthTokenRevokeParams) SetToken

func (o *OauthTokenRevokeParams) SetToken(token string)

SetToken adds the token to the oauth token revoke params

func (*OauthTokenRevokeParams) WithClientID

func (o *OauthTokenRevokeParams) WithClientID(clientID string) *OauthTokenRevokeParams

WithClientID adds the clientID to the oauth token revoke params

func (*OauthTokenRevokeParams) WithClientSecret

func (o *OauthTokenRevokeParams) WithClientSecret(clientSecret string) *OauthTokenRevokeParams

WithClientSecret adds the clientSecret to the oauth token revoke params

func (*OauthTokenRevokeParams) WithContext

WithContext adds the context to the oauth token revoke params

func (*OauthTokenRevokeParams) WithDefaults

WithDefaults hydrates default values in the oauth token revoke params (not the query body).

All values with no default are reset to their zero value.

func (*OauthTokenRevokeParams) WithHTTPClient

func (o *OauthTokenRevokeParams) WithHTTPClient(client *http.Client) *OauthTokenRevokeParams

WithHTTPClient adds the HTTPClient to the oauth token revoke params

func (*OauthTokenRevokeParams) WithTimeout

WithTimeout adds the timeout to the oauth token revoke params

func (*OauthTokenRevokeParams) WithToken

WithToken adds the token to the oauth token revoke params

func (*OauthTokenRevokeParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type OauthTokenRevokeReader

type OauthTokenRevokeReader struct {
	// contains filtered or unexported fields
}

OauthTokenRevokeReader is a Reader for the OauthTokenRevoke structure.

func (*OauthTokenRevokeReader) ReadResponse

func (o *OauthTokenRevokeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

Jump to

Keyboard shortcuts

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