oauth

package
v0.0.0-...-370782b Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// AuthDeviceGetBadRequestBodyErrorAuthorizationPending captures enum value "authorization_pending"
	AuthDeviceGetBadRequestBodyErrorAuthorizationPending string = "authorization_pending"

	// AuthDeviceGetBadRequestBodyErrorSlowDown captures enum value "slow_down"
	AuthDeviceGetBadRequestBodyErrorSlowDown string = "slow_down"

	// AuthDeviceGetBadRequestBodyErrorExpiredToken captures enum value "expired_token"
	AuthDeviceGetBadRequestBodyErrorExpiredToken string = "expired_token"

	// AuthDeviceGetBadRequestBodyErrorInvalidClient captures enum value "invalid_client"
	AuthDeviceGetBadRequestBodyErrorInvalidClient string = "invalid_client"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthDeviceGetBadRequest

type AuthDeviceGetBadRequest struct {
	Payload *AuthDeviceGetBadRequestBody
}
AuthDeviceGetBadRequest describes a response with status code 400, with default header values.

authorization_pending: The authorization request is still pending as the end user hasn't yet completed the user-interaction steps

slow_down: A variant of "authorization_pending", the authorization request is still pending and polling should continue, but the interval MUST be increased by 5 seconds for this and all subsequent requests. expired_token: The "device_code" has expired, and the device authorization session has concluded. The only error key that the client MUST stop making requests after is 'expired_token'.

func NewAuthDeviceGetBadRequest

func NewAuthDeviceGetBadRequest() *AuthDeviceGetBadRequest

NewAuthDeviceGetBadRequest creates a AuthDeviceGetBadRequest with default headers values

func (*AuthDeviceGetBadRequest) Error

func (o *AuthDeviceGetBadRequest) Error() string

func (*AuthDeviceGetBadRequest) GetPayload

type AuthDeviceGetBadRequestBody

type AuthDeviceGetBadRequestBody struct {

	// code
	// Required: true
	Code *int64 `json:"code"`

	// error
	// Required: true
	// Enum: [authorization_pending slow_down expired_token invalid_client]
	Error *string `json:"error"`

	// message
	// Required: true
	Message *string `json:"message"`
}

AuthDeviceGetBadRequestBody auth device get bad request body swagger:model AuthDeviceGetBadRequestBody

func (*AuthDeviceGetBadRequestBody) ContextValidate

func (o *AuthDeviceGetBadRequestBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this auth device get bad request body based on context it is used

func (*AuthDeviceGetBadRequestBody) MarshalBinary

func (o *AuthDeviceGetBadRequestBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AuthDeviceGetBadRequestBody) UnmarshalBinary

func (o *AuthDeviceGetBadRequestBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AuthDeviceGetBadRequestBody) Validate

func (o *AuthDeviceGetBadRequestBody) Validate(formats strfmt.Registry) error

Validate validates this auth device get bad request body

type AuthDeviceGetInternalServerError

type AuthDeviceGetInternalServerError struct {
	Payload *mono_models.Message
}
AuthDeviceGetInternalServerError describes a response with status code 500, with default header values.

Server Error

func NewAuthDeviceGetInternalServerError

func NewAuthDeviceGetInternalServerError() *AuthDeviceGetInternalServerError

NewAuthDeviceGetInternalServerError creates a AuthDeviceGetInternalServerError with default headers values

func (*AuthDeviceGetInternalServerError) Error

func (*AuthDeviceGetInternalServerError) GetPayload

type AuthDeviceGetOK

type AuthDeviceGetOK struct {
	Payload *mono_models.DeviceCodeComplete
}
AuthDeviceGetOK describes a response with status code 200, with default header values.

Success

func NewAuthDeviceGetOK

func NewAuthDeviceGetOK() *AuthDeviceGetOK

NewAuthDeviceGetOK creates a AuthDeviceGetOK with default headers values

func (*AuthDeviceGetOK) Error

func (o *AuthDeviceGetOK) Error() string

func (*AuthDeviceGetOK) GetPayload

type AuthDeviceGetParams

type AuthDeviceGetParams struct {

	/* DeviceCode.

	   deviceCode received from /oauth/authorize/device:POST

	   Format: uuid
	*/
	DeviceCode strfmt.UUID

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

AuthDeviceGetParams contains all the parameters to send to the API endpoint

for the auth device get operation.

Typically these are written to a http.Request.

func NewAuthDeviceGetParams

func NewAuthDeviceGetParams() *AuthDeviceGetParams

NewAuthDeviceGetParams creates a new AuthDeviceGetParams 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 NewAuthDeviceGetParamsWithContext

func NewAuthDeviceGetParamsWithContext(ctx context.Context) *AuthDeviceGetParams

NewAuthDeviceGetParamsWithContext creates a new AuthDeviceGetParams object with the ability to set a context for a request.

func NewAuthDeviceGetParamsWithHTTPClient

func NewAuthDeviceGetParamsWithHTTPClient(client *http.Client) *AuthDeviceGetParams

NewAuthDeviceGetParamsWithHTTPClient creates a new AuthDeviceGetParams object with the ability to set a custom HTTPClient for a request.

func NewAuthDeviceGetParamsWithTimeout

func NewAuthDeviceGetParamsWithTimeout(timeout time.Duration) *AuthDeviceGetParams

NewAuthDeviceGetParamsWithTimeout creates a new AuthDeviceGetParams object with the ability to set a timeout on a request.

func (*AuthDeviceGetParams) SetContext

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

SetContext adds the context to the auth device get params

func (*AuthDeviceGetParams) SetDefaults

func (o *AuthDeviceGetParams) SetDefaults()

SetDefaults hydrates default values in the auth device get params (not the query body).

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

func (*AuthDeviceGetParams) SetDeviceCode

func (o *AuthDeviceGetParams) SetDeviceCode(deviceCode strfmt.UUID)

SetDeviceCode adds the deviceCode to the auth device get params

func (*AuthDeviceGetParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the auth device get params

func (*AuthDeviceGetParams) SetTimeout

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

SetTimeout adds the timeout to the auth device get params

func (*AuthDeviceGetParams) WithContext

WithContext adds the context to the auth device get params

func (*AuthDeviceGetParams) WithDefaults

func (o *AuthDeviceGetParams) WithDefaults() *AuthDeviceGetParams

WithDefaults hydrates default values in the auth device get params (not the query body).

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

func (*AuthDeviceGetParams) WithDeviceCode

func (o *AuthDeviceGetParams) WithDeviceCode(deviceCode strfmt.UUID) *AuthDeviceGetParams

WithDeviceCode adds the deviceCode to the auth device get params

func (*AuthDeviceGetParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the auth device get params

func (*AuthDeviceGetParams) WithTimeout

func (o *AuthDeviceGetParams) WithTimeout(timeout time.Duration) *AuthDeviceGetParams

WithTimeout adds the timeout to the auth device get params

func (*AuthDeviceGetParams) WriteToRequest

func (o *AuthDeviceGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type AuthDeviceGetReader

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

AuthDeviceGetReader is a Reader for the AuthDeviceGet structure.

func (*AuthDeviceGetReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type AuthDevicePostInternalServerError

type AuthDevicePostInternalServerError struct {
	Payload *mono_models.Message
}
AuthDevicePostInternalServerError describes a response with status code 500, with default header values.

Server Error

func NewAuthDevicePostInternalServerError

func NewAuthDevicePostInternalServerError() *AuthDevicePostInternalServerError

NewAuthDevicePostInternalServerError creates a AuthDevicePostInternalServerError with default headers values

func (*AuthDevicePostInternalServerError) Error

func (*AuthDevicePostInternalServerError) GetPayload

type AuthDevicePostOK

type AuthDevicePostOK struct {
	Payload *mono_models.DeviceCode
}
AuthDevicePostOK describes a response with status code 200, with default header values.

Success

func NewAuthDevicePostOK

func NewAuthDevicePostOK() *AuthDevicePostOK

NewAuthDevicePostOK creates a AuthDevicePostOK with default headers values

func (*AuthDevicePostOK) Error

func (o *AuthDevicePostOK) Error() string

func (*AuthDevicePostOK) GetPayload

func (o *AuthDevicePostOK) GetPayload() *mono_models.DeviceCode

type AuthDevicePostParams

type AuthDevicePostParams struct {

	/* DeviceID.

	   ID representing the device the request is coming from.  Only used by the ActiveState State Tool.

	   Format: uuid
	*/
	DeviceID *strfmt.UUID

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

AuthDevicePostParams contains all the parameters to send to the API endpoint

for the auth device post operation.

Typically these are written to a http.Request.

func NewAuthDevicePostParams

func NewAuthDevicePostParams() *AuthDevicePostParams

NewAuthDevicePostParams creates a new AuthDevicePostParams 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 NewAuthDevicePostParamsWithContext

func NewAuthDevicePostParamsWithContext(ctx context.Context) *AuthDevicePostParams

NewAuthDevicePostParamsWithContext creates a new AuthDevicePostParams object with the ability to set a context for a request.

func NewAuthDevicePostParamsWithHTTPClient

func NewAuthDevicePostParamsWithHTTPClient(client *http.Client) *AuthDevicePostParams

NewAuthDevicePostParamsWithHTTPClient creates a new AuthDevicePostParams object with the ability to set a custom HTTPClient for a request.

func NewAuthDevicePostParamsWithTimeout

func NewAuthDevicePostParamsWithTimeout(timeout time.Duration) *AuthDevicePostParams

NewAuthDevicePostParamsWithTimeout creates a new AuthDevicePostParams object with the ability to set a timeout on a request.

func (*AuthDevicePostParams) SetContext

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

SetContext adds the context to the auth device post params

func (*AuthDevicePostParams) SetDefaults

func (o *AuthDevicePostParams) SetDefaults()

SetDefaults hydrates default values in the auth device post params (not the query body).

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

func (*AuthDevicePostParams) SetDeviceID

func (o *AuthDevicePostParams) SetDeviceID(deviceID *strfmt.UUID)

SetDeviceID adds the deviceId to the auth device post params

func (*AuthDevicePostParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the auth device post params

func (*AuthDevicePostParams) SetTimeout

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

SetTimeout adds the timeout to the auth device post params

func (*AuthDevicePostParams) WithContext

WithContext adds the context to the auth device post params

func (*AuthDevicePostParams) WithDefaults

func (o *AuthDevicePostParams) WithDefaults() *AuthDevicePostParams

WithDefaults hydrates default values in the auth device post params (not the query body).

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

func (*AuthDevicePostParams) WithDeviceID

func (o *AuthDevicePostParams) WithDeviceID(deviceID *strfmt.UUID) *AuthDevicePostParams

WithDeviceID adds the deviceID to the auth device post params

func (*AuthDevicePostParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the auth device post params

func (*AuthDevicePostParams) WithTimeout

func (o *AuthDevicePostParams) WithTimeout(timeout time.Duration) *AuthDevicePostParams

WithTimeout adds the timeout to the auth device post params

func (*AuthDevicePostParams) WriteToRequest

func (o *AuthDevicePostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type AuthDevicePostReader

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

AuthDevicePostReader is a Reader for the AuthDevicePost structure.

func (*AuthDevicePostReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type AuthDevicePutBadRequest

type AuthDevicePutBadRequest struct {
	Payload *mono_models.Message
}
AuthDevicePutBadRequest describes a response with status code 400, with default header values.

Bad Request

func NewAuthDevicePutBadRequest

func NewAuthDevicePutBadRequest() *AuthDevicePutBadRequest

NewAuthDevicePutBadRequest creates a AuthDevicePutBadRequest with default headers values

func (*AuthDevicePutBadRequest) Error

func (o *AuthDevicePutBadRequest) Error() string

func (*AuthDevicePutBadRequest) GetPayload

func (o *AuthDevicePutBadRequest) GetPayload() *mono_models.Message

type AuthDevicePutInternalServerError

type AuthDevicePutInternalServerError struct {
	Payload *mono_models.Message
}
AuthDevicePutInternalServerError describes a response with status code 500, with default header values.

Server Error

func NewAuthDevicePutInternalServerError

func NewAuthDevicePutInternalServerError() *AuthDevicePutInternalServerError

NewAuthDevicePutInternalServerError creates a AuthDevicePutInternalServerError with default headers values

func (*AuthDevicePutInternalServerError) Error

func (*AuthDevicePutInternalServerError) GetPayload

type AuthDevicePutOK

type AuthDevicePutOK struct {
}
AuthDevicePutOK describes a response with status code 200, with default header values.

Success

func NewAuthDevicePutOK

func NewAuthDevicePutOK() *AuthDevicePutOK

NewAuthDevicePutOK creates a AuthDevicePutOK with default headers values

func (*AuthDevicePutOK) Error

func (o *AuthDevicePutOK) Error() string

type AuthDevicePutParams

type AuthDevicePutParams struct {

	/* UserCode.

	   userCode received from /oauth/authorize/device:POST

	   Format: uuid
	*/
	UserCode strfmt.UUID

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

AuthDevicePutParams contains all the parameters to send to the API endpoint

for the auth device put operation.

Typically these are written to a http.Request.

func NewAuthDevicePutParams

func NewAuthDevicePutParams() *AuthDevicePutParams

NewAuthDevicePutParams creates a new AuthDevicePutParams 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 NewAuthDevicePutParamsWithContext

func NewAuthDevicePutParamsWithContext(ctx context.Context) *AuthDevicePutParams

NewAuthDevicePutParamsWithContext creates a new AuthDevicePutParams object with the ability to set a context for a request.

func NewAuthDevicePutParamsWithHTTPClient

func NewAuthDevicePutParamsWithHTTPClient(client *http.Client) *AuthDevicePutParams

NewAuthDevicePutParamsWithHTTPClient creates a new AuthDevicePutParams object with the ability to set a custom HTTPClient for a request.

func NewAuthDevicePutParamsWithTimeout

func NewAuthDevicePutParamsWithTimeout(timeout time.Duration) *AuthDevicePutParams

NewAuthDevicePutParamsWithTimeout creates a new AuthDevicePutParams object with the ability to set a timeout on a request.

func (*AuthDevicePutParams) SetContext

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

SetContext adds the context to the auth device put params

func (*AuthDevicePutParams) SetDefaults

func (o *AuthDevicePutParams) SetDefaults()

SetDefaults hydrates default values in the auth device put params (not the query body).

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

func (*AuthDevicePutParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the auth device put params

func (*AuthDevicePutParams) SetTimeout

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

SetTimeout adds the timeout to the auth device put params

func (*AuthDevicePutParams) SetUserCode

func (o *AuthDevicePutParams) SetUserCode(userCode strfmt.UUID)

SetUserCode adds the userCode to the auth device put params

func (*AuthDevicePutParams) WithContext

WithContext adds the context to the auth device put params

func (*AuthDevicePutParams) WithDefaults

func (o *AuthDevicePutParams) WithDefaults() *AuthDevicePutParams

WithDefaults hydrates default values in the auth device put params (not the query body).

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

func (*AuthDevicePutParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the auth device put params

func (*AuthDevicePutParams) WithTimeout

func (o *AuthDevicePutParams) WithTimeout(timeout time.Duration) *AuthDevicePutParams

WithTimeout adds the timeout to the auth device put params

func (*AuthDevicePutParams) WithUserCode

func (o *AuthDevicePutParams) WithUserCode(userCode strfmt.UUID) *AuthDevicePutParams

WithUserCode adds the userCode to the auth device put params

func (*AuthDevicePutParams) WriteToRequest

func (o *AuthDevicePutParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type AuthDevicePutReader

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

AuthDevicePutReader is a Reader for the AuthDevicePut structure.

func (*AuthDevicePutReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type AuthDevicePutUnauthorized

type AuthDevicePutUnauthorized struct {
	Payload *mono_models.Message
}
AuthDevicePutUnauthorized describes a response with status code 401, with default header values.

Invalid credentials

func NewAuthDevicePutUnauthorized

func NewAuthDevicePutUnauthorized() *AuthDevicePutUnauthorized

NewAuthDevicePutUnauthorized creates a AuthDevicePutUnauthorized with default headers values

func (*AuthDevicePutUnauthorized) Error

func (o *AuthDevicePutUnauthorized) Error() string

func (*AuthDevicePutUnauthorized) GetPayload

type Client

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

Client for oauth API

func (*Client) AuthDeviceGet

func (a *Client) AuthDeviceGet(params *AuthDeviceGetParams, opts ...ClientOption) (*AuthDeviceGetOK, error)

AuthDeviceGet gets the status of a particular device code authorization flow based on device code

func (*Client) AuthDevicePost

func (a *Client) AuthDevicePost(params *AuthDevicePostParams, opts ...ClientOption) (*AuthDevicePostOK, error)

AuthDevicePost initializes device o a u t h flow with the API

func (*Client) AuthDevicePut

func (a *Client) AuthDevicePut(params *AuthDevicePutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AuthDevicePutOK, error)

AuthDevicePut authorizes user code this endpoint completes the device authorization grant flow successfully

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 is the option for Client methods

type ClientService

type ClientService interface {
	AuthDeviceGet(params *AuthDeviceGetParams, opts ...ClientOption) (*AuthDeviceGetOK, error)

	AuthDevicePost(params *AuthDevicePostParams, opts ...ClientOption) (*AuthDevicePostOK, error)

	AuthDevicePut(params *AuthDevicePutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AuthDevicePutOK, 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.

Jump to

Keyboard shortcuts

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