authentication

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: MIT 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 authentication API

func (*Client) Login

func (a *Client) Login(params *LoginParams) (*LoginOK, error)

Login logins

Login using credentials and registered device id

func (*Client) RegisterDevice

func (a *Client) RegisterDevice(params *RegisterDeviceParams) (*RegisterDeviceOK, error)

RegisterDevice registers device

Register Device before logging in

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientService

type ClientService interface {
	Login(params *LoginParams) (*LoginOK, error)

	RegisterDevice(params *RegisterDeviceParams) (*RegisterDeviceOK, 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 authentication API client.

type LoginOK

type LoginOK struct {
	Payload *models.LoginResponse
}

LoginOK handles this case with default header values.

Register Device response

func NewLoginOK

func NewLoginOK() *LoginOK

NewLoginOK creates a LoginOK with default headers values

func (*LoginOK) Error

func (o *LoginOK) Error() string

func (*LoginOK) GetPayload

func (o *LoginOK) GetPayload() *models.LoginResponse

type LoginParams

type LoginParams struct {

	/*Authorization
	  Security token from authHeader field in the Register Device response

	*/
	Authorization string
	/*LoginRequest
	  Login Request Body

	*/
	LoginRequest *models.LoginRequest
	/*XCodDeviceID
	  Device ID

	*/
	XCodDeviceID string

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

LoginParams contains all the parameters to send to the API endpoint for the login operation typically these are written to a http.Request

func NewLoginParams

func NewLoginParams() *LoginParams

NewLoginParams creates a new LoginParams object with the default values initialized.

func NewLoginParamsWithContext

func NewLoginParamsWithContext(ctx context.Context) *LoginParams

NewLoginParamsWithContext creates a new LoginParams object with the default values initialized, and the ability to set a context for a request

func NewLoginParamsWithHTTPClient

func NewLoginParamsWithHTTPClient(client *http.Client) *LoginParams

NewLoginParamsWithHTTPClient creates a new LoginParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewLoginParamsWithTimeout

func NewLoginParamsWithTimeout(timeout time.Duration) *LoginParams

NewLoginParamsWithTimeout creates a new LoginParams object with the default values initialized, and the ability to set a timeout on a request

func (*LoginParams) SetAuthorization

func (o *LoginParams) SetAuthorization(authorization string)

SetAuthorization adds the authorization to the login params

func (*LoginParams) SetContext

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

SetContext adds the context to the login params

func (*LoginParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the login params

func (*LoginParams) SetLoginRequest

func (o *LoginParams) SetLoginRequest(loginRequest *models.LoginRequest)

SetLoginRequest adds the loginRequest to the login params

func (*LoginParams) SetTimeout

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

SetTimeout adds the timeout to the login params

func (*LoginParams) SetXCodDeviceID

func (o *LoginParams) SetXCodDeviceID(xCodDeviceID string)

SetXCodDeviceID adds the xCodDeviceId to the login params

func (*LoginParams) WithAuthorization

func (o *LoginParams) WithAuthorization(authorization string) *LoginParams

WithAuthorization adds the authorization to the login params

func (*LoginParams) WithContext

func (o *LoginParams) WithContext(ctx context.Context) *LoginParams

WithContext adds the context to the login params

func (*LoginParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the login params

func (*LoginParams) WithLoginRequest

func (o *LoginParams) WithLoginRequest(loginRequest *models.LoginRequest) *LoginParams

WithLoginRequest adds the loginRequest to the login params

func (*LoginParams) WithTimeout

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

WithTimeout adds the timeout to the login params

func (*LoginParams) WithXCodDeviceID

func (o *LoginParams) WithXCodDeviceID(xCodDeviceID string) *LoginParams

WithXCodDeviceID adds the xCodDeviceID to the login params

func (*LoginParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type LoginReader

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

LoginReader is a Reader for the Login structure.

func (*LoginReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type RegisterDeviceOK

type RegisterDeviceOK struct {
	Payload *models.RegisterDeviceResponse
}

RegisterDeviceOK handles this case with default header values.

Register Device Response

func NewRegisterDeviceOK

func NewRegisterDeviceOK() *RegisterDeviceOK

NewRegisterDeviceOK creates a RegisterDeviceOK with default headers values

func (*RegisterDeviceOK) Error

func (o *RegisterDeviceOK) Error() string

func (*RegisterDeviceOK) GetPayload

type RegisterDeviceParams

type RegisterDeviceParams struct {

	/*RegisterDeviceRequest
	  Body should contain the unique device id

	*/
	RegisterDeviceRequest *models.RegisterDeviceRequest

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

RegisterDeviceParams contains all the parameters to send to the API endpoint for the register device operation typically these are written to a http.Request

func NewRegisterDeviceParams

func NewRegisterDeviceParams() *RegisterDeviceParams

NewRegisterDeviceParams creates a new RegisterDeviceParams object with the default values initialized.

func NewRegisterDeviceParamsWithContext

func NewRegisterDeviceParamsWithContext(ctx context.Context) *RegisterDeviceParams

NewRegisterDeviceParamsWithContext creates a new RegisterDeviceParams object with the default values initialized, and the ability to set a context for a request

func NewRegisterDeviceParamsWithHTTPClient

func NewRegisterDeviceParamsWithHTTPClient(client *http.Client) *RegisterDeviceParams

NewRegisterDeviceParamsWithHTTPClient creates a new RegisterDeviceParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewRegisterDeviceParamsWithTimeout

func NewRegisterDeviceParamsWithTimeout(timeout time.Duration) *RegisterDeviceParams

NewRegisterDeviceParamsWithTimeout creates a new RegisterDeviceParams object with the default values initialized, and the ability to set a timeout on a request

func (*RegisterDeviceParams) SetContext

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

SetContext adds the context to the register device params

func (*RegisterDeviceParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the register device params

func (*RegisterDeviceParams) SetRegisterDeviceRequest

func (o *RegisterDeviceParams) SetRegisterDeviceRequest(registerDeviceRequest *models.RegisterDeviceRequest)

SetRegisterDeviceRequest adds the registerDeviceRequest to the register device params

func (*RegisterDeviceParams) SetTimeout

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

SetTimeout adds the timeout to the register device params

func (*RegisterDeviceParams) WithContext

WithContext adds the context to the register device params

func (*RegisterDeviceParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the register device params

func (*RegisterDeviceParams) WithRegisterDeviceRequest

func (o *RegisterDeviceParams) WithRegisterDeviceRequest(registerDeviceRequest *models.RegisterDeviceRequest) *RegisterDeviceParams

WithRegisterDeviceRequest adds the registerDeviceRequest to the register device params

func (*RegisterDeviceParams) WithTimeout

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

WithTimeout adds the timeout to the register device params

func (*RegisterDeviceParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type RegisterDeviceReader

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

RegisterDeviceReader is a Reader for the RegisterDevice structure.

func (*RegisterDeviceReader) ReadResponse

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