Skip to main content

AuthN | Go SDK | Flow Endpoints

Flow Endpoints

Check a token

func (a *ClientToken) Check(ctx context.Context, input ClientTokenCheckRequest) (*pangea.PangeaResponse[ClientTokenCheckResult], error)

Look up a token and return its contents.

required parameters

context.Context
input := authn.ClientTokenCheckRequest{
	Token: "ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
}

resp, err := authcli.Client.Token.Check(ctx, input)

Complete sign-up/sign-in

func (a *Flow) Complete(ctx context.Context, input FlowCompleteRequest) (*pangea.PangeaResponse[FlowCompleteResult], error)

Complete a sign-up or sign-in flow.

required parameters

context.Context
input := authn.FlowCompleteRequest{
	FlowID: "pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh",
}

resp, err := authncli.Flow.Complete(ctx, input)

Restart a sign-up/sign-in flow

func (a *Flow) Restart(ctx context.Context, input FlowRestartRequest) (*pangea.PangeaResponse[FlowRestartResult], error)

Restart a signup-up/in flow choice.

required parameters

context.Context
input := authn.FlowRestartRequest{
	FlowID: "pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh",
	Choice: authn.FCPassword,
	Data: authn.FlowRestartData{},
}

resp, err := authncli.Flow.Restart(ctx, input)

Start a sign-up/sign-in flow

func (a *Flow) Start(ctx context.Context, input FlowStartRequest) (*pangea.PangeaResponse[FlowStartResult], error)

Start a new sign-up or sign-in flow.

required parameters

context.Context
fts := []FlowType{authn.FTsignin,authn.FTsignup}
input := authn.FlowStartRequest{
	CBURI: "https://www.myserver.com/callback",
	Email: "joe.user@email.com",
	FlowTypes: fts,
	Provider: &authn.IDPPassword,
}

resp, err := authncli.Flow.Start(ctx, input)

Update a sign-up/sign-in flow

func (a *Flow) Update(ctx context.Context, input FlowUpdateRequest) (*pangea.PangeaResponse[FlowUpdateResult], error)

Update a sign-up/sign-in flow.

required parameters

context.Context
input := authn.FlowUpdateRequest{
	FlowID: "pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh",
	Choice: authn.FCPassword,
	Data: authn.FlowUpdateDataPassword{
		Password: "somenewpassword",
	}
}

resp, err := authncli.Flow.Update(ctx, input)

Type ClientTokenCheckRequest

type ClientTokenCheckRequest struct

required parameters

pangea.BaseRequest

Base request has ConfigID for multi-config projects

string `json:"token"`
type ClientTokenCheckRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	Token	string	`json:"token"`
}

Type FlowChoice

type FlowChoice string
type FlowChoice string

Type FlowCompleteRequest

type FlowCompleteRequest struct

required parameters

pangea.BaseRequest

Base request has ConfigID for multi-config projects

string `json:"flow_id"`
type FlowCompleteRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	FlowID	string	`json:"flow_id"`
}

Type FlowRestartData

type FlowRestartData struct{}
type FlowRestartData struct{}

Type FlowRestartRequest

type FlowRestartRequest struct

required parameters

string `json:"flow_id"`
type FlowRestartRequest struct {
	pangea.BaseRequest
	FlowID	string		`json:"flow_id"`
	Choice	FlowChoice	`json:"choice"`
	Data	FlowRestartData	`json:"data"`
}

Type FlowStartRequest

type FlowStartRequest struct

required parameters

pangea.BaseRequest

Base request has ConfigID for multi-config projects

string `json:"cb_uri,omitempty"`
string `json:"email,omitempty"`
type FlowStartRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	CBURI		string		`json:"cb_uri,omitempty"`
	Email		string		`json:"email,omitempty"`
	FlowTypes	[]FlowType	`json:"flow_types,omitempty"`
	Provider	*IDProvider	`json:"provider,omitempty"`
}

Type FlowType

type FlowType string
type FlowType string

Type FlowUpdateRequest

type FlowUpdateRequest struct

required parameters

string `json:"flow_id"`
type FlowUpdateRequest struct {
	pangea.BaseRequest
	FlowID	string		`json:"flow_id"`
	Choice	FlowChoice	`json:"choice"`
	Data	FlowUpdaterData	`json:"data"`
}

Type FlowUpdaterData

type FlowUpdaterData interface

required parameters

func() bool
type FlowUpdaterData interface {
	IsFlowUpdaterData() bool
}

Type IDProvider

type IDProvider string
type IDProvider string