o_auth_2

package
v0.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client for o auth 2 API

func (*Client) GetTokenInfo

func (a *Client) GetTokenInfo(params *GetTokenInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTokenInfoOK, error)

GetTokenInfo looks up token information

Get basic information about the access token and the logged in user.

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 {
	GetTokenInfo(params *GetTokenInfoParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTokenInfoOK, 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 o auth 2 API client.

type GetTokenInfoOK

type GetTokenInfoOK struct {
	Payload *GetTokenInfoOKBody
}
GetTokenInfoOK describes a response with status code 200, with default header values.

success response

func NewGetTokenInfoOK

func NewGetTokenInfoOK() *GetTokenInfoOK

NewGetTokenInfoOK creates a GetTokenInfoOK with default headers values

func (*GetTokenInfoOK) Error

func (o *GetTokenInfoOK) Error() string

func (*GetTokenInfoOK) GetPayload

func (o *GetTokenInfoOK) GetPayload() *GetTokenInfoOKBody

type GetTokenInfoOKBody

type GetTokenInfoOKBody struct {

	// data
	Data *GetTokenInfoOKBodyData `json:"data,omitempty"`

	// status
	Status string `json:"status,omitempty"`
}

GetTokenInfoOKBody get token info o k body swagger:model GetTokenInfoOKBody

func (*GetTokenInfoOKBody) ContextValidate

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

ContextValidate validate this get token info o k body based on the context it is used

func (*GetTokenInfoOKBody) MarshalBinary

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

MarshalBinary interface implementation

func (*GetTokenInfoOKBody) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*GetTokenInfoOKBody) Validate

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

Validate validates this get token info o k body

type GetTokenInfoOKBodyData

type GetTokenInfoOKBodyData struct {

	// token
	Token *GetTokenInfoOKBodyDataToken `json:"token,omitempty"`
}

GetTokenInfoOKBodyData get token info o k body data swagger:model GetTokenInfoOKBodyData

func (*GetTokenInfoOKBodyData) ContextValidate

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

ContextValidate validate this get token info o k body data based on the context it is used

func (*GetTokenInfoOKBodyData) MarshalBinary

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

MarshalBinary interface implementation

func (*GetTokenInfoOKBodyData) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*GetTokenInfoOKBodyData) Validate

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

Validate validates this get token info o k body data

type GetTokenInfoOKBodyDataToken

type GetTokenInfoOKBodyDataToken struct {

	// employee
	Employee bool `json:"employee,omitempty"`

	// expires at
	ExpiresAt int64 `json:"expires_at,omitempty"`

	// id
	ID int64 `json:"id,omitempty"`

	// scopes
	Scopes []string `json:"scopes"`

	// two factor method
	TwoFactorMethod string `json:"two_factor_method,omitempty"`

	// user
	User *GetTokenInfoOKBodyDataTokenUser `json:"user,omitempty"`

	// valid until
	ValidUntil string `json:"valid_until,omitempty"`
}

GetTokenInfoOKBodyDataToken get token info o k body data token swagger:model GetTokenInfoOKBodyDataToken

func (*GetTokenInfoOKBodyDataToken) ContextValidate

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

ContextValidate validate this get token info o k body data token based on the context it is used

func (*GetTokenInfoOKBodyDataToken) MarshalBinary

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

MarshalBinary interface implementation

func (*GetTokenInfoOKBodyDataToken) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*GetTokenInfoOKBodyDataToken) Validate

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

Validate validates this get token info o k body data token

type GetTokenInfoOKBodyDataTokenUser

type GetTokenInfoOKBodyDataTokenUser struct {

	// id
	ID int64 `json:"id,omitempty"`

	// username
	Username string `json:"username,omitempty"`
}

GetTokenInfoOKBodyDataTokenUser get token info o k body data token user swagger:model GetTokenInfoOKBodyDataTokenUser

func (*GetTokenInfoOKBodyDataTokenUser) ContextValidate

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

ContextValidate validates this get token info o k body data token user based on context it is used

func (*GetTokenInfoOKBodyDataTokenUser) MarshalBinary

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

MarshalBinary interface implementation

func (*GetTokenInfoOKBodyDataTokenUser) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*GetTokenInfoOKBodyDataTokenUser) Validate

Validate validates this get token info o k body data token user

type GetTokenInfoParams

type GetTokenInfoParams struct {
	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetTokenInfoParams contains all the parameters to send to the API endpoint

for the get token info operation.

Typically these are written to a http.Request.

func NewGetTokenInfoParams

func NewGetTokenInfoParams() *GetTokenInfoParams

NewGetTokenInfoParams creates a new GetTokenInfoParams 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 NewGetTokenInfoParamsWithContext

func NewGetTokenInfoParamsWithContext(ctx context.Context) *GetTokenInfoParams

NewGetTokenInfoParamsWithContext creates a new GetTokenInfoParams object with the ability to set a context for a request.

func NewGetTokenInfoParamsWithHTTPClient

func NewGetTokenInfoParamsWithHTTPClient(client *http.Client) *GetTokenInfoParams

NewGetTokenInfoParamsWithHTTPClient creates a new GetTokenInfoParams object with the ability to set a custom HTTPClient for a request.

func NewGetTokenInfoParamsWithTimeout

func NewGetTokenInfoParamsWithTimeout(timeout time.Duration) *GetTokenInfoParams

NewGetTokenInfoParamsWithTimeout creates a new GetTokenInfoParams object with the ability to set a timeout on a request.

func (*GetTokenInfoParams) SetContext

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

SetContext adds the context to the get token info params

func (*GetTokenInfoParams) SetDefaults

func (o *GetTokenInfoParams) SetDefaults()

SetDefaults hydrates default values in the get token info params (not the query body).

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

func (*GetTokenInfoParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get token info params

func (*GetTokenInfoParams) SetTimeout

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

SetTimeout adds the timeout to the get token info params

func (*GetTokenInfoParams) WithContext

WithContext adds the context to the get token info params

func (*GetTokenInfoParams) WithDefaults

func (o *GetTokenInfoParams) WithDefaults() *GetTokenInfoParams

WithDefaults hydrates default values in the get token info params (not the query body).

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

func (*GetTokenInfoParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get token info params

func (*GetTokenInfoParams) WithTimeout

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

WithTimeout adds the timeout to the get token info params

func (*GetTokenInfoParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetTokenInfoReader

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

GetTokenInfoReader is a Reader for the GetTokenInfo structure.

func (*GetTokenInfoReader) ReadResponse

func (o *GetTokenInfoReader) 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