auth

package
v3.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const AuthorizeTemporaryRedirectCode int = 307

AuthorizeTemporaryRedirectCode is the HTTP code returned for type AuthorizeTemporaryRedirect

View Source
const GetMeOKCode int = 200

GetMeOKCode is the HTTP code returned for type GetMeOK

View Source
const LogoutOKCode int = 200

LogoutOKCode is the HTTP code returned for type LogoutOK

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorize

type Authorize struct {
	Context *middleware.Context
	Handler AuthorizeHandler
}

Authorize swagger:route GET /api/authorize auth authorize

Authorize authorize API

func NewAuthorize

func NewAuthorize(ctx *middleware.Context, handler AuthorizeHandler) *Authorize

NewAuthorize creates a new http.Handler for the authorize operation

func (*Authorize) ServeHTTP

func (o *Authorize) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type AuthorizeDefault

type AuthorizeDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

AuthorizeDefault generic error response

swagger:response authorizeDefault

func NewAuthorizeDefault

func NewAuthorizeDefault(code int) *AuthorizeDefault

NewAuthorizeDefault creates AuthorizeDefault with default headers values

func (*AuthorizeDefault) SetPayload

func (o *AuthorizeDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the authorize default response

func (*AuthorizeDefault) SetStatusCode

func (o *AuthorizeDefault) SetStatusCode(code int)

SetStatusCode sets the status to the authorize default response

func (*AuthorizeDefault) WithPayload

func (o *AuthorizeDefault) WithPayload(payload *models.Error) *AuthorizeDefault

WithPayload adds the payload to the authorize default response

func (*AuthorizeDefault) WithStatusCode

func (o *AuthorizeDefault) WithStatusCode(code int) *AuthorizeDefault

WithStatusCode adds the status to the authorize default response

func (*AuthorizeDefault) WriteResponse

func (o *AuthorizeDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type AuthorizeHandler

type AuthorizeHandler interface {
	Handle(AuthorizeParams) middleware.Responder
}

AuthorizeHandler interface for that can handle valid authorize params

type AuthorizeHandlerFunc

type AuthorizeHandlerFunc func(AuthorizeParams) middleware.Responder

AuthorizeHandlerFunc turns a function with the right signature into a authorize handler

func (AuthorizeHandlerFunc) Handle

Handle executing the request and returning a response

type AuthorizeParams

type AuthorizeParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*Authorization code
	  Required: true
	  In: query
	*/
	Code string
}

AuthorizeParams contains all the bound params for the authorize operation typically these are obtained from a http.Request

swagger:parameters authorize

func NewAuthorizeParams

func NewAuthorizeParams() AuthorizeParams

NewAuthorizeParams creates a new AuthorizeParams object no default values defined in spec.

func (*AuthorizeParams) BindRequest

func (o *AuthorizeParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewAuthorizeParams() beforehand.

type AuthorizeTemporaryRedirect

type AuthorizeTemporaryRedirect struct {
	/*homepage of frontend

	 */
	Location string `json:"Location"`
	/*set access_token in cookie

	 */
	SetCookie string `json:"Set-Cookie"`
}

AuthorizeTemporaryRedirect redirect to homepage of frontend

swagger:response authorizeTemporaryRedirect

func NewAuthorizeTemporaryRedirect

func NewAuthorizeTemporaryRedirect() *AuthorizeTemporaryRedirect

NewAuthorizeTemporaryRedirect creates AuthorizeTemporaryRedirect with default headers values

func (*AuthorizeTemporaryRedirect) SetLocation

func (o *AuthorizeTemporaryRedirect) SetLocation(location string)

SetLocation sets the location to the authorize temporary redirect response

func (*AuthorizeTemporaryRedirect) SetSetCookie

func (o *AuthorizeTemporaryRedirect) SetSetCookie(setCookie string)

SetSetCookie sets the setCookie to the authorize temporary redirect response

func (*AuthorizeTemporaryRedirect) WithLocation

WithLocation adds the location to the authorize temporary redirect response

func (*AuthorizeTemporaryRedirect) WithSetCookie

func (o *AuthorizeTemporaryRedirect) WithSetCookie(setCookie string) *AuthorizeTemporaryRedirect

WithSetCookie adds the setCookie to the authorize temporary redirect response

func (*AuthorizeTemporaryRedirect) WriteResponse

func (o *AuthorizeTemporaryRedirect) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type AuthorizeURL

type AuthorizeURL struct {
	Code string
	// contains filtered or unexported fields
}

AuthorizeURL generates an URL for the authorize operation

func (*AuthorizeURL) Build

func (o *AuthorizeURL) Build() (*url.URL, error)

Build a url path and query string

func (*AuthorizeURL) BuildFull

func (o *AuthorizeURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*AuthorizeURL) Must

func (o *AuthorizeURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*AuthorizeURL) SetBasePath

func (o *AuthorizeURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*AuthorizeURL) String

func (o *AuthorizeURL) String() string

String returns the string representation of the path with query string

func (*AuthorizeURL) StringFull

func (o *AuthorizeURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*AuthorizeURL) WithBasePath

func (o *AuthorizeURL) WithBasePath(bp string) *AuthorizeURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type GetMe

type GetMe struct {
	Context *middleware.Context
	Handler GetMeHandler
}

GetMe swagger:route GET /api/me auth getMe

GetMe get me API

func NewGetMe

func NewGetMe(ctx *middleware.Context, handler GetMeHandler) *GetMe

NewGetMe creates a new http.Handler for the get me operation

func (*GetMe) ServeHTTP

func (o *GetMe) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type GetMeDefault

type GetMeDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

GetMeDefault generic error response

swagger:response getMeDefault

func NewGetMeDefault

func NewGetMeDefault(code int) *GetMeDefault

NewGetMeDefault creates GetMeDefault with default headers values

func (*GetMeDefault) SetPayload

func (o *GetMeDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the get me default response

func (*GetMeDefault) SetStatusCode

func (o *GetMeDefault) SetStatusCode(code int)

SetStatusCode sets the status to the get me default response

func (*GetMeDefault) WithPayload

func (o *GetMeDefault) WithPayload(payload *models.Error) *GetMeDefault

WithPayload adds the payload to the get me default response

func (*GetMeDefault) WithStatusCode

func (o *GetMeDefault) WithStatusCode(code int) *GetMeDefault

WithStatusCode adds the status to the get me default response

func (*GetMeDefault) WriteResponse

func (o *GetMeDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetMeHandler

type GetMeHandler interface {
	Handle(GetMeParams) middleware.Responder
}

GetMeHandler interface for that can handle valid get me params

type GetMeHandlerFunc

type GetMeHandlerFunc func(GetMeParams) middleware.Responder

GetMeHandlerFunc turns a function with the right signature into a get me handler

func (GetMeHandlerFunc) Handle

Handle executing the request and returning a response

type GetMeOK

type GetMeOK struct {

	/*
	  In: Body
	*/
	Payload *models.User `json:"body,omitempty"`
}

GetMeOK the user corresponding to the access_token

swagger:response getMeOK

func NewGetMeOK

func NewGetMeOK() *GetMeOK

NewGetMeOK creates GetMeOK with default headers values

func (*GetMeOK) SetPayload

func (o *GetMeOK) SetPayload(payload *models.User)

SetPayload sets the payload to the get me o k response

func (*GetMeOK) WithPayload

func (o *GetMeOK) WithPayload(payload *models.User) *GetMeOK

WithPayload adds the payload to the get me o k response

func (*GetMeOK) WriteResponse

func (o *GetMeOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetMeParams

type GetMeParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*Cookie with access_token
	  Required: true
	  In: header
	*/
	Cookie string
}

GetMeParams contains all the bound params for the get me operation typically these are obtained from a http.Request

swagger:parameters getMe

func NewGetMeParams

func NewGetMeParams() GetMeParams

NewGetMeParams creates a new GetMeParams object no default values defined in spec.

func (*GetMeParams) BindRequest

func (o *GetMeParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewGetMeParams() beforehand.

type GetMeURL

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

GetMeURL generates an URL for the get me operation

func (*GetMeURL) Build

func (o *GetMeURL) Build() (*url.URL, error)

Build a url path and query string

func (*GetMeURL) BuildFull

func (o *GetMeURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*GetMeURL) Must

func (o *GetMeURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*GetMeURL) SetBasePath

func (o *GetMeURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*GetMeURL) String

func (o *GetMeURL) String() string

String returns the string representation of the path with query string

func (*GetMeURL) StringFull

func (o *GetMeURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*GetMeURL) WithBasePath

func (o *GetMeURL) WithBasePath(bp string) *GetMeURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type Logout

type Logout struct {
	Context *middleware.Context
	Handler LogoutHandler
}

Logout swagger:route GET /api/logout auth logout

Logout logout API

func NewLogout

func NewLogout(ctx *middleware.Context, handler LogoutHandler) *Logout

NewLogout creates a new http.Handler for the logout operation

func (*Logout) ServeHTTP

func (o *Logout) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type LogoutDefault

type LogoutDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

LogoutDefault generic error response

swagger:response logoutDefault

func NewLogoutDefault

func NewLogoutDefault(code int) *LogoutDefault

NewLogoutDefault creates LogoutDefault with default headers values

func (*LogoutDefault) SetPayload

func (o *LogoutDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the logout default response

func (*LogoutDefault) SetStatusCode

func (o *LogoutDefault) SetStatusCode(code int)

SetStatusCode sets the status to the logout default response

func (*LogoutDefault) WithPayload

func (o *LogoutDefault) WithPayload(payload *models.Error) *LogoutDefault

WithPayload adds the payload to the logout default response

func (*LogoutDefault) WithStatusCode

func (o *LogoutDefault) WithStatusCode(code int) *LogoutDefault

WithStatusCode adds the status to the logout default response

func (*LogoutDefault) WriteResponse

func (o *LogoutDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type LogoutHandler

type LogoutHandler interface {
	Handle(LogoutParams) middleware.Responder
}

LogoutHandler interface for that can handle valid logout params

type LogoutHandlerFunc

type LogoutHandlerFunc func(LogoutParams) middleware.Responder

LogoutHandlerFunc turns a function with the right signature into a logout handler

func (LogoutHandlerFunc) Handle

Handle executing the request and returning a response

type LogoutOK

type LogoutOK struct {
	/*delete access_token in cookie

	 */
	SetCookie string `json:"Set-Cookie"`
}

LogoutOK logout

swagger:response logoutOK

func NewLogoutOK

func NewLogoutOK() *LogoutOK

NewLogoutOK creates LogoutOK with default headers values

func (*LogoutOK) SetSetCookie

func (o *LogoutOK) SetSetCookie(setCookie string)

SetSetCookie sets the setCookie to the logout o k response

func (*LogoutOK) WithSetCookie

func (o *LogoutOK) WithSetCookie(setCookie string) *LogoutOK

WithSetCookie adds the setCookie to the logout o k response

func (*LogoutOK) WriteResponse

func (o *LogoutOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type LogoutParams

type LogoutParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`
}

LogoutParams contains all the bound params for the logout operation typically these are obtained from a http.Request

swagger:parameters logout

func NewLogoutParams

func NewLogoutParams() LogoutParams

NewLogoutParams creates a new LogoutParams object no default values defined in spec.

func (*LogoutParams) BindRequest

func (o *LogoutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewLogoutParams() beforehand.

type LogoutURL

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

LogoutURL generates an URL for the logout operation

func (*LogoutURL) Build

func (o *LogoutURL) Build() (*url.URL, error)

Build a url path and query string

func (*LogoutURL) BuildFull

func (o *LogoutURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*LogoutURL) Must

func (o *LogoutURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*LogoutURL) SetBasePath

func (o *LogoutURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*LogoutURL) String

func (o *LogoutURL) String() string

String returns the string representation of the path with query string

func (*LogoutURL) StringFull

func (o *LogoutURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*LogoutURL) WithBasePath

func (o *LogoutURL) WithBasePath(bp string) *LogoutURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

Jump to

Keyboard shortcuts

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