api

package
v1.6.0-herb-email-not-... Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseRequest

type BaseRequest struct {
	RequestType string `param:"request_type" query:"request_type" form:"request_type" json:"request_type" xml:"request_type"`
	Version     string `param:"version" query:"version" form:"version" json:"version" xml:"version"`
}

type BaseResponse

type BaseResponse struct {
	Errors []string `json:"errors,omitempty"`
}

type IDP

type IDP struct {
	Name string `json:"name"`
	Slug string `json:"slug"`
}

type IDPLoginRequest

type IDPLoginRequest struct {
	BaseRequest
	Slug string `param:"slug" query:"slug" form:"slug" json:"slug" xml:"slug" validate:"required"`
}

type IDPLoginResponse

type IDPLoginResponse struct {
	BaseResponse
	RedirectUri string `json:"redirect_uri"`
}

type InitialPageRequest

type InitialPageRequest struct {
	BaseRequest
}

type InitialPageResponse

type InitialPageResponse struct {
	BaseResponse
	IDPs []IDP `json:"idps"`
}

type PasswordLoginRequest

type PasswordLoginRequest struct {
	BaseRequest
	Username string `param:"username" query:"username" form:"username" json:"username" xml:"username" validate:"required"`
	Password string `param:"password" query:"password" form:"password" json:"password" xml:"password" validate:"required"`
}

type PasswordLoginResponse

type PasswordLoginResponse struct {
	BaseResponse
	// NextPage to offer the user.
	// VerifyEmailPage
	//
	NextPage    string `json:"next_page,omitempty"`
	RedirectUri string `json:"redirect_uri,omitempty"`
}

type UsernameNextStepOneRequest

type UsernameNextStepOneRequest struct {
	BaseRequest
	Username string `param:"username" query:"username" form:"username" json:"username" xml:"username" validate:"required"`
}

type UsernameNextStepOneResponse

type UsernameNextStepOneResponse struct {
	// UserExists is true if the user exists in the system.
	// Show the proper error to the user
	UserExists bool `json:"user_exists"`
	// NextPage to offer the user.
	// EnterPasswordPage
	NextPage string `json:"next_page,omitempty"`
	// IDPs is a list of IDPs that the user can use to login.
	IDPs []IDP `json:"idps,omitempty"`
	// RedirectUri is used to redirect the user to the next step.
	// This will happen if the username/email is claimed by an external IDP.
	RedirectUri string `json:"redirect_uri,omitempty"`
}

Jump to

Keyboard shortcuts

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