auth

package
v0.0.0-...-fe695c3 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2019 License: Apache-2.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 auth API

func New

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

New creates a new auth API client.

func (*Client) LoginUser

func (a *Client) LoginUser(params *LoginUserParams) (*LoginUserOK, error)

LoginUser authenticates an user by credentials

func (*Client) RefreshAuth

func (a *Client) RefreshAuth(params *RefreshAuthParams) (*RefreshAuthOK, error)

RefreshAuth refreshes an auth token before it expires

func (*Client) SetTransport

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

SetTransport changes the transport on the client

func (*Client) VerifyAuth

func (a *Client) VerifyAuth(params *VerifyAuthParams) (*VerifyAuthOK, error)

VerifyAuth verifies validity for an authentication token

type LoginUserDefault

type LoginUserDefault struct {
	Payload *models.GeneralError
	// contains filtered or unexported fields
}

LoginUserDefault handles this case with default header values.

Some error unrelated to the handler

func NewLoginUserDefault

func NewLoginUserDefault(code int) *LoginUserDefault

NewLoginUserDefault creates a LoginUserDefault with default headers values

func (*LoginUserDefault) Code

func (o *LoginUserDefault) Code() int

Code gets the status code for the login user default response

func (*LoginUserDefault) Error

func (o *LoginUserDefault) Error() string

type LoginUserOK

type LoginUserOK struct {
	Payload *models.AuthToken
}

LoginUserOK handles this case with default header values.

A generated token with expire

func NewLoginUserOK

func NewLoginUserOK() *LoginUserOK

NewLoginUserOK creates a LoginUserOK with default headers values

func (*LoginUserOK) Error

func (o *LoginUserOK) Error() string

type LoginUserParams

type LoginUserParams struct {

	/*AuthLogin
	  The credentials to authenticate

	*/
	AuthLogin *models.AuthLogin

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

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

func NewLoginUserParams

func NewLoginUserParams() *LoginUserParams

NewLoginUserParams creates a new LoginUserParams object with the default values initialized.

func NewLoginUserParamsWithContext

func NewLoginUserParamsWithContext(ctx context.Context) *LoginUserParams

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

func NewLoginUserParamsWithHTTPClient

func NewLoginUserParamsWithHTTPClient(client *http.Client) *LoginUserParams

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

func NewLoginUserParamsWithTimeout

func NewLoginUserParamsWithTimeout(timeout time.Duration) *LoginUserParams

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

func (*LoginUserParams) SetAuthLogin

func (o *LoginUserParams) SetAuthLogin(authLogin *models.AuthLogin)

SetAuthLogin adds the authLogin to the login user params

func (*LoginUserParams) SetContext

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

SetContext adds the context to the login user params

func (*LoginUserParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the login user params

func (*LoginUserParams) SetTimeout

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

SetTimeout adds the timeout to the login user params

func (*LoginUserParams) WithAuthLogin

func (o *LoginUserParams) WithAuthLogin(authLogin *models.AuthLogin) *LoginUserParams

WithAuthLogin adds the authLogin to the login user params

func (*LoginUserParams) WithContext

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

WithContext adds the context to the login user params

func (*LoginUserParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the login user params

func (*LoginUserParams) WithTimeout

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

WithTimeout adds the timeout to the login user params

func (*LoginUserParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type LoginUserReader

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

LoginUserReader is a Reader for the LoginUser structure.

func (*LoginUserReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type LoginUserUnauthorized

type LoginUserUnauthorized struct {
	Payload *models.GeneralError
}

LoginUserUnauthorized handles this case with default header values.

Unauthorized if wrong credentials

func NewLoginUserUnauthorized

func NewLoginUserUnauthorized() *LoginUserUnauthorized

NewLoginUserUnauthorized creates a LoginUserUnauthorized with default headers values

func (*LoginUserUnauthorized) Error

func (o *LoginUserUnauthorized) Error() string

type RefreshAuthDefault

type RefreshAuthDefault struct {
	Payload *models.GeneralError
	// contains filtered or unexported fields
}

RefreshAuthDefault handles this case with default header values.

Some error unrelated to the handler

func NewRefreshAuthDefault

func NewRefreshAuthDefault(code int) *RefreshAuthDefault

NewRefreshAuthDefault creates a RefreshAuthDefault with default headers values

func (*RefreshAuthDefault) Code

func (o *RefreshAuthDefault) Code() int

Code gets the status code for the refresh auth default response

func (*RefreshAuthDefault) Error

func (o *RefreshAuthDefault) Error() string

type RefreshAuthOK

type RefreshAuthOK struct {
	Payload *models.AuthToken
}

RefreshAuthOK handles this case with default header values.

A refreshed token with expire

func NewRefreshAuthOK

func NewRefreshAuthOK() *RefreshAuthOK

NewRefreshAuthOK creates a RefreshAuthOK with default headers values

func (*RefreshAuthOK) Error

func (o *RefreshAuthOK) Error() string

type RefreshAuthParams

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

RefreshAuthParams contains all the parameters to send to the API endpoint for the refresh auth operation typically these are written to a http.Request

func NewRefreshAuthParams

func NewRefreshAuthParams() *RefreshAuthParams

NewRefreshAuthParams creates a new RefreshAuthParams object with the default values initialized.

func NewRefreshAuthParamsWithContext

func NewRefreshAuthParamsWithContext(ctx context.Context) *RefreshAuthParams

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

func NewRefreshAuthParamsWithHTTPClient

func NewRefreshAuthParamsWithHTTPClient(client *http.Client) *RefreshAuthParams

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

func NewRefreshAuthParamsWithTimeout

func NewRefreshAuthParamsWithTimeout(timeout time.Duration) *RefreshAuthParams

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

func (*RefreshAuthParams) SetContext

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

SetContext adds the context to the refresh auth params

func (*RefreshAuthParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the refresh auth params

func (*RefreshAuthParams) SetTimeout

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

SetTimeout adds the timeout to the refresh auth params

func (*RefreshAuthParams) WithContext

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

WithContext adds the context to the refresh auth params

func (*RefreshAuthParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the refresh auth params

func (*RefreshAuthParams) WithTimeout

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

WithTimeout adds the timeout to the refresh auth params

func (*RefreshAuthParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type RefreshAuthReader

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

RefreshAuthReader is a Reader for the RefreshAuth structure.

func (*RefreshAuthReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type RefreshAuthUnauthorized

type RefreshAuthUnauthorized struct {
	Payload *models.GeneralError
}

RefreshAuthUnauthorized handles this case with default header values.

Unauthorized if failed to generate

func NewRefreshAuthUnauthorized

func NewRefreshAuthUnauthorized() *RefreshAuthUnauthorized

NewRefreshAuthUnauthorized creates a RefreshAuthUnauthorized with default headers values

func (*RefreshAuthUnauthorized) Error

func (o *RefreshAuthUnauthorized) Error() string

type VerifyAuthDefault

type VerifyAuthDefault struct {
	Payload *models.GeneralError
	// contains filtered or unexported fields
}

VerifyAuthDefault handles this case with default header values.

Some error unrelated to the handler

func NewVerifyAuthDefault

func NewVerifyAuthDefault(code int) *VerifyAuthDefault

NewVerifyAuthDefault creates a VerifyAuthDefault with default headers values

func (*VerifyAuthDefault) Code

func (o *VerifyAuthDefault) Code() int

Code gets the status code for the verify auth default response

func (*VerifyAuthDefault) Error

func (o *VerifyAuthDefault) Error() string

type VerifyAuthOK

type VerifyAuthOK struct {
	Payload *models.AuthVerify
}

VerifyAuthOK handles this case with default header values.

Meta data of the provided token

func NewVerifyAuthOK

func NewVerifyAuthOK() *VerifyAuthOK

NewVerifyAuthOK creates a VerifyAuthOK with default headers values

func (*VerifyAuthOK) Error

func (o *VerifyAuthOK) Error() string

type VerifyAuthParams

type VerifyAuthParams struct {

	/*Token
	  A token that have to be checked

	*/
	Token string

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

VerifyAuthParams contains all the parameters to send to the API endpoint for the verify auth operation typically these are written to a http.Request

func NewVerifyAuthParams

func NewVerifyAuthParams() *VerifyAuthParams

NewVerifyAuthParams creates a new VerifyAuthParams object with the default values initialized.

func NewVerifyAuthParamsWithContext

func NewVerifyAuthParamsWithContext(ctx context.Context) *VerifyAuthParams

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

func NewVerifyAuthParamsWithHTTPClient

func NewVerifyAuthParamsWithHTTPClient(client *http.Client) *VerifyAuthParams

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

func NewVerifyAuthParamsWithTimeout

func NewVerifyAuthParamsWithTimeout(timeout time.Duration) *VerifyAuthParams

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

func (*VerifyAuthParams) SetContext

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

SetContext adds the context to the verify auth params

func (*VerifyAuthParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the verify auth params

func (*VerifyAuthParams) SetTimeout

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

SetTimeout adds the timeout to the verify auth params

func (*VerifyAuthParams) SetToken

func (o *VerifyAuthParams) SetToken(token string)

SetToken adds the token to the verify auth params

func (*VerifyAuthParams) WithContext

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

WithContext adds the context to the verify auth params

func (*VerifyAuthParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the verify auth params

func (*VerifyAuthParams) WithTimeout

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

WithTimeout adds the timeout to the verify auth params

func (*VerifyAuthParams) WithToken

func (o *VerifyAuthParams) WithToken(token string) *VerifyAuthParams

WithToken adds the token to the verify auth params

func (*VerifyAuthParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type VerifyAuthReader

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

VerifyAuthReader is a Reader for the VerifyAuth structure.

func (*VerifyAuthReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type VerifyAuthUnauthorized

type VerifyAuthUnauthorized struct {
	Payload *models.GeneralError
}

VerifyAuthUnauthorized handles this case with default header values.

Unauthorized if token is invalid

func NewVerifyAuthUnauthorized

func NewVerifyAuthUnauthorized() *VerifyAuthUnauthorized

NewVerifyAuthUnauthorized creates a VerifyAuthUnauthorized with default headers values

func (*VerifyAuthUnauthorized) Error

func (o *VerifyAuthUnauthorized) Error() string

Jump to

Keyboard shortcuts

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