single_sign_on

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: BSD-3-Clause Imports: 8 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 single sign on API

func New

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

New creates a new single sign on API client.

func (*Client) GetSso

func (a *Client) GetSso(params *GetSsoParams) (*GetSsoOK, error)

GetSso singles sign on

The Manifold Dashboard forwards a user to this route during single sign-on to a resource's dashboard.

A `code` and `resource_id` are sent as query parameters allowing the provider to request an access token.

The `code` is scoped to the initiating user and resource being accessed and is only valid for five minutes. It cannot be used more than once.

Once an access token has been acquired for this user's session by the provider's server, the user should be forwarded to the resource's dashboard.

The provider should associate the access token with the user for the duration of their session.

The access token is sensitive data that grants access to a user's data within Manifold. It should be treated with care.

Requests to this route will *not* be signed by Manifold as they are performed by the user's browser.

**IMPORTANT**: A malicious user *could* tamper with the `resource_id` query parameter. To prevent this, the provider *must* validate that the user has access to the targeted resource by requesting information about it from the Connector API using the granted access token.

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type GetSsoDefault

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

GetSsoDefault handles this case with default header values.

If the request could not be processed successfully, a useful error message should be displayed to the user.

func NewGetSsoDefault

func NewGetSsoDefault(code int) *GetSsoDefault

NewGetSsoDefault creates a GetSsoDefault with default headers values

func (*GetSsoDefault) Code

func (o *GetSsoDefault) Code() int

Code gets the status code for the get sso default response

func (*GetSsoDefault) Error

func (o *GetSsoDefault) Error() string

type GetSsoFound

type GetSsoFound struct {
	/*Location of the Resources' dashboard.
	 */
	Location string
}

GetSsoFound handles this case with default header values.

If the request was successful and an access token has been acquired for the user, the user can be forwarded to the requested dashboard using an HTTP redirect.

*NOTE*: `303 See Other` is the preferred method for redirecting a user to their dashboard via HTTP.

func NewGetSsoFound

func NewGetSsoFound() *GetSsoFound

NewGetSsoFound creates a GetSsoFound with default headers values

func (*GetSsoFound) Error

func (o *GetSsoFound) Error() string

type GetSsoOK

type GetSsoOK struct {
}

GetSsoOK handles this case with default header values.

If the request was successful and an access token has been acquired for the user, the dashboard can be returned *or* they can be forwarded to the dashboard using an HTML redirect.

func NewGetSsoOK

func NewGetSsoOK() *GetSsoOK

NewGetSsoOK creates a GetSsoOK with default headers values

func (*GetSsoOK) Error

func (o *GetSsoOK) Error() string

type GetSsoParams

type GetSsoParams struct {

	/*Code
	  The authorization code sent along with the SSO request which a
	provider uses to create an access token.


	*/
	Code string
	/*ResourceID
	  ID of the Resource the user is attempting to access. This ID is a
	base32 encoded 18 byte identifier.


	*/
	ResourceID string

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

GetSsoParams contains all the parameters to send to the API endpoint for the get sso operation typically these are written to a http.Request

func NewGetSsoParams

func NewGetSsoParams() *GetSsoParams

NewGetSsoParams creates a new GetSsoParams object with the default values initialized.

func NewGetSsoParamsWithContext

func NewGetSsoParamsWithContext(ctx context.Context) *GetSsoParams

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

func NewGetSsoParamsWithHTTPClient

func NewGetSsoParamsWithHTTPClient(client *http.Client) *GetSsoParams

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

func NewGetSsoParamsWithTimeout

func NewGetSsoParamsWithTimeout(timeout time.Duration) *GetSsoParams

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

func (*GetSsoParams) SetCode

func (o *GetSsoParams) SetCode(code string)

SetCode adds the code to the get sso params

func (*GetSsoParams) SetContext

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

SetContext adds the context to the get sso params

func (*GetSsoParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get sso params

func (*GetSsoParams) SetResourceID

func (o *GetSsoParams) SetResourceID(resourceID string)

SetResourceID adds the resourceId to the get sso params

func (*GetSsoParams) SetTimeout

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

SetTimeout adds the timeout to the get sso params

func (*GetSsoParams) WithCode

func (o *GetSsoParams) WithCode(code string) *GetSsoParams

WithCode adds the code to the get sso params

func (*GetSsoParams) WithContext

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

WithContext adds the context to the get sso params

func (*GetSsoParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get sso params

func (*GetSsoParams) WithResourceID

func (o *GetSsoParams) WithResourceID(resourceID string) *GetSsoParams

WithResourceID adds the resourceID to the get sso params

func (*GetSsoParams) WithTimeout

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

WithTimeout adds the timeout to the get sso params

func (*GetSsoParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetSsoReader

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

GetSsoReader is a Reader for the GetSso structure.

func (*GetSsoReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetSsoSeeOther

type GetSsoSeeOther struct {
	/*Location of the Resources' dashboard.
	 */
	Location string
}

GetSsoSeeOther handles this case with default header values.

If the request was successful and an access token has been acquired for the user, the user can be forwarded to the requested dashboard using an HTTP redirect.

This is the preferred method for redirecting user's to their dashboards via HTTP.

func NewGetSsoSeeOther

func NewGetSsoSeeOther() *GetSsoSeeOther

NewGetSsoSeeOther creates a GetSsoSeeOther with default headers values

func (*GetSsoSeeOther) Error

func (o *GetSsoSeeOther) Error() string

Jump to

Keyboard shortcuts

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