authn

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const (
	IDPFacebook        IDProvider = "facebook"
	IDPGithub                     = "github"
	IDPGoogle                     = "google"
	IDPMicrosoftOnline            = "microsoftonline"
	IDPPassword                   = "password"
)
View Source
const (
	MFAPTOTP     MFAProvider = "totp"
	MFAPEmailOTP             = "email_otp"
	IDPSMSOTP                = "sms_otp"
)
View Source
const (
	ULOBid          UserListOrderBy = "id"
	ULOBcreatedAt                   = "created_at"
	ULOBlastLoginAt                 = "last_login_at"
	ULOBemail                       = "email"
)
View Source
const (
	UILOBid        UserListOrderBy = "id"
	UILOBcreatedAt                 = "created_at"
	UILOBtype                      = "type"
	UILOBexpire                    = "expire"
	UILOBcallback                  = "callback"
	UILOBstate                     = "state"
	UILOBemail                     = "email"
	UILOBinviter                   = "inviter"
	UILOBinviteOrg                 = "invite_org"
)
View Source
const (
	SLOBid            SessionListOrderBy = "id"
	SLOBcreatedAt                        = "created_at"
	SLOBtype                             = "type"
	SLOBidentity                         = "identity"
	SLOBemail                            = "email"
	SLOBexpire                           = "expire"
	SLOBactiveTokenID                    = "active_token_id"
)
View Source
const (
	ALOBid        AgreementListOrderBy = "id"
	ALOBcreatedAt                      = "created_at"
	ALOBname                           = "name"
	ALOBtext                           = "text"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AgreementCreateRequest added in v2.2.0

type AgreementCreateRequest struct {
	pangea.BaseRequest

	Type   AgreementType `json:"type"`
	Name   string        `json:"name"`
	Text   string        `json:"text"`
	Active *bool         `json:"active,omitempty"`
}

type AgreementCreateResult added in v2.2.0

type AgreementCreateResult AgreementInfo

type AgreementDeleteRequest added in v2.2.0

type AgreementDeleteRequest struct {
	pangea.BaseRequest

	Type AgreementType `json:"type"`
	ID   string        `json:"id"`
}

type AgreementDeleteResult added in v2.2.0

type AgreementDeleteResult struct{}

type AgreementInfo added in v2.2.0

type AgreementInfo struct {
	Type        string `json:"type"`
	ID          string `json:"id"`
	CreatedAt   string `json:"created_at"`
	UpdatedAt   string `json:"updated_at"`
	PublishedAt string `json:"published_at,omitempty"`
	Name        string `json:"name"`
	Text        string `json:"text"`
	Active      bool   `json:"active"`
}

type AgreementListOrderBy added in v2.2.0

type AgreementListOrderBy string

type AgreementListRequest added in v2.2.0

type AgreementListRequest struct {
	pangea.BaseRequest

	// Should use FilterAgreementList object here
	Filter  map[string]any       `json:"filter,omitempty"`
	Last    string               `json:"last,omitempty"`
	Order   ItemOrder            `json:"order,omitempty"`
	OrderBy AgreementListOrderBy `json:"order_by,omitempty"`
	Size    int                  `json:"size,omitempty"`
}

type AgreementListResult added in v2.2.0

type AgreementListResult struct {
	Agreements []AgreementInfo `json:"agreements"`
	Count      int             `json:"count"`
	Last       string          `json:"last,omitempty"`
}

type AgreementType added in v2.2.0

type AgreementType string
const (
	ATeula          AgreementType = "eula"
	ATprivacyPolicy               = "privacy_policy"
)

type AgreementUpdateRequest added in v2.2.0

type AgreementUpdateRequest struct {
	pangea.BaseRequest

	Type   AgreementType `json:"type"`
	ID     string        `json:"id"`
	Name   *string       `json:"name,omitempty"`
	Text   *string       `json:"text,omitempty"`
	Active *bool         `json:"active,omitempty"`
}

type AgreementUpdateResult added in v2.2.0

type AgreementUpdateResult AgreementInfo

type Agreements added in v2.2.0

type Agreements struct {
	*pangea.Client
}

func (*Agreements) Create added in v2.2.0

TODO: docs

func (*Agreements) Delete added in v2.2.0

TODO: docs

func (*Agreements) List added in v2.2.0

TODO: docs

func (*Agreements) Update added in v2.2.0

TODO: docs

type AuthN

type AuthN struct {
	Password   *Password
	User       *User
	Flow       *Flow
	Client     *Client
	Session    *Session
	Agreements *Agreements
	// contains filtered or unexported fields
}

func New

func New(cfg *pangea.Config) *AuthN

type Client

type Client struct {
	Session  *ClientSession
	Password *ClientPassword
	Token    *ClientToken
	// contains filtered or unexported fields
}

func (*Client) JWKS

@summary Get JWT verification keys

@description Get JWT verification keys.

@operationId authn_post_v1_client_jwks

@example

resp, err := authncli.Client.JWKS(ctx)

func (*Client) Userinfo

@summary Get User (client token)

@description Retrieve the logged in user's token and information.

@operationId authn_post_v1_client_userinfo

@example

input := authn.ClientUserinfoRequest{
	Code: "pmc_d6chl6qulpn3it34oerwm3cqwsjd6dxw",
}

esp, err := authncli.Client.Userinfo(ctx, input)

type ClientJWKSResult

type ClientJWKSResult struct {
	Keys []v.JWT `json:"keys"`
}

type ClientPassword

type ClientPassword struct {
	*pangea.Client
}

func (*ClientPassword) Change

@summary Change a user's password

@description Change a user's password given the current password.

@operationId authn_post_v1_client_password_change

@example

input := authn.ClientPasswordChangeRequest{
	Token: "ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
	OldPassword: "hunter2",
	NewPassword: "My2n+Password",
}

resp, err := authncli.Client.Password.Change(ctx, input)

type ClientPasswordChangeRequest

type ClientPasswordChangeRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	Token       string `json:"token"`
	OldPassword string `json:"old_password"`
	NewPassword string `json:"new_password"`
}

type ClientPasswordChangeResult

type ClientPasswordChangeResult struct {
}

type ClientSession

type ClientSession struct {
	*pangea.Client
}

func (*ClientSession) Invalidate

@summary Invalidate Session | Client

@description Invalidate a session by session ID using a client token.

@operationId authn_post_v1_client_session_invalidate

@example

input := authn.ClientSessionInvalidateRequest{
	Token: "ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
	SessionID: "pmt_zppkzrjguxyblaia6itbiesejn7jejnr",
}

resp, err := authncli.Client.Session.Invalidate(ctx, input)

func (*ClientSession) List

@summary List sessions (client token)

@description List sessions using a client token.

@operationId authn_post_v1_client_session_list

@example

input := authn.ClientSessionListRequest{
	Token: "ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
}

resp, err := authncli.Client.Session.List(ctx, input)

func (*ClientSession) Logout

@summary Log out (client token)

@description Log out the current user's session.

@operationId authn_post_v1_client_session_logout

@example

input := authn.ClientSessionLogoutRequest{
	Token: "ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
}

resp, err := authncli.Client.Session.Logout(ctx, input)

func (*ClientSession) Refresh

@summary Refresh a Session

@description Refresh a session token.

@operationId authn_post_v1_client_session_refresh

@example

input := authn.ClientSessionRefreshRequest{
	RefreshToken: "ptr_xpkhwpnz2cmegsws737xbsqnmnuwtbm5",
	UserToken: "ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
}

resp, err := authncli.Client.Session.Refresh(ctx, input)

type ClientSessionInvalidateRequest

type ClientSessionInvalidateRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	Token     string `json:"token"`
	SessionID string `json:"session_id"`
}

type ClientSessionInvalidateResult

type ClientSessionInvalidateResult struct {
}

type ClientSessionListRequest

type ClientSessionListRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	Token string `json:"token"`

	// Should use FilterSessionList object here
	Filter  pangea.Filter      `json:"filter,omitempty"`
	Last    string             `json:"last,omitempty"`
	Order   ItemOrder          `json:"order,omitempty"`
	OrderBy SessionListOrderBy `json:"order_by,omitempty"`
}

type ClientSessionLogoutRequest

type ClientSessionLogoutRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	Token string `json:"token"`
}

type ClientSessionLogoutResult

type ClientSessionLogoutResult struct {
}

type ClientSessionRefreshRequest

type ClientSessionRefreshRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	RefreshToken string `json:"refresh_token"`
	UserToken    string `json:"user_token,omitempty"`
}

type ClientSessionRefreshResult

type ClientSessionRefreshResult struct {
	RefreshToken LoginToken `json:"refresh_token"`
	ActiveToken  LoginToken `json:"active_token"`
}

type ClientToken

type ClientToken struct {
	*pangea.Client
}

func (*ClientToken) Check

@summary Check a token

@description Look up a token and return its contents.

@operationId authn_post_v1_client_token_check

@example

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

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

type ClientTokenCheckRequest

type ClientTokenCheckRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	Token string `json:"token"`
}

type ClientTokenCheckResult

type ClientTokenCheckResult struct {
	ID        string      `json:"id"`
	Type      string      `json:"type"`
	Life      int         `json:"life"`
	Expire    string      `json:"expire"`
	Identity  string      `json:"identity"`
	Email     string      `json:"email"`
	Scopes    Scopes      `json:"scopes"`
	Profile   ProfileData `json:"profile"`
	CreatedAt string      `json:"created_at"`
}

type ClientUserinfoRequest

type ClientUserinfoRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	Code string `json:"code"`
}

type ClientUserinfoResult

type ClientUserinfoResult struct {
	RefreshToken LoginToken  `json:"refresh_token"`
	ActiveToken  *LoginToken `json:"active_token,omitempty"`
}

type CommonFlowResult

type CommonFlowResult struct {
	FlowID            string                 `json:"flow_id,omitempty"`
	NextStep          string                 `json:"next_step"`
	Error             *string                `json:"error,omitempty"`
	Complete          map[string]any         `json:"complete,omitempty"`
	EnrollMFAstart    *EnrollMFAStartData    `json:"enroll_mfa_start,omitempty"`
	EnrollMFAComplete *EnrollMFACompleteData `json:"enroll_mfa_complete,omitempty"`
	Signup            *SignupData            `json:"signup,omitempty"`
	VerifyCaptcha     *VerifyCaptchaData     `json:"verify_captcha,omitempty"`
	VerifyEmail       map[string]any         `json:"verify_email,omitempty"`
	VerifyMFAStart    *VerifyMFAStartData    `json:"verify_mfa_start,omitempty"`
	VerifyMFAComplete map[string]any         `json:"verify_mfa_complete,omitempty"`
	VerifyPassword    *VerifyPasswordData    `json:"verify_password,omitempty"`
	VerifySocial      *VerifySocialData      `json:"verify_social,omitempty"`
	ResetPassword     *VerifyPasswordData    `json:"reset_password,omitempty"`
}

type EnrollMFACompleteData

type EnrollMFACompleteData struct {
	TOTPSecret TOTPSecretData `json:"totp_secret"`
}

type EnrollMFAStartData

type EnrollMFAStartData struct {
	MFAProviders *[]MFAProvider `json:"mfa_providers,omitempty"`
}

type FilterAgreementList added in v2.3.0

type FilterAgreementList struct {
	pangea.FilterBase
	// contains filtered or unexported fields
}

func NewFilterAgreementList added in v2.3.0

func NewFilterAgreementList() *FilterAgreementList

func (*FilterAgreementList) Active added in v2.3.0

func (*FilterAgreementList) CreatedAt added in v2.3.0

func (f *FilterAgreementList) CreatedAt() *pangea.FilterRange[string]

func (*FilterAgreementList) ID added in v2.3.0

func (*FilterAgreementList) Name added in v2.3.0

func (*FilterAgreementList) PublishedAt added in v2.3.0

func (f *FilterAgreementList) PublishedAt() *pangea.FilterRange[string]

func (*FilterAgreementList) Text added in v2.3.0

func (*FilterAgreementList) Type added in v2.3.0

type FilterSessionList added in v2.3.0

type FilterSessionList struct {
	pangea.FilterBase
	// contains filtered or unexported fields
}

func NewFilterSessionList added in v2.3.0

func NewFilterSessionList() *FilterSessionList

func (*FilterSessionList) CreatedAt added in v2.3.0

func (f *FilterSessionList) CreatedAt() *pangea.FilterRange[string]

func (*FilterSessionList) Email added in v2.3.0

func (*FilterSessionList) Expire added in v2.3.0

func (*FilterSessionList) ID added in v2.3.0

func (*FilterSessionList) Identity added in v2.3.0

func (f *FilterSessionList) Identity() *pangea.FilterMatch[string]

func (*FilterSessionList) Scopes added in v2.3.0

func (f *FilterSessionList) Scopes() *pangea.FilterEqual[[]string]

func (*FilterSessionList) Type added in v2.3.0

type FilterUserInviteList added in v2.3.0

type FilterUserInviteList struct {
	pangea.FilterBase
	// contains filtered or unexported fields
}

FilterUserInviteList represents the filter criteria for user invites.

func NewFilterUserInviteList added in v2.3.0

func NewFilterUserInviteList() *FilterUserInviteList

func (*FilterUserInviteList) Callback added in v2.3.0

func (*FilterUserInviteList) CreatedAt added in v2.3.0

func (f *FilterUserInviteList) CreatedAt() *pangea.FilterRange[string]

func (*FilterUserInviteList) Email added in v2.3.0

func (*FilterUserInviteList) Expire added in v2.3.0

func (*FilterUserInviteList) ID added in v2.3.0

func (*FilterUserInviteList) InviteOrg added in v2.3.0

func (f *FilterUserInviteList) InviteOrg() *pangea.FilterMatch[string]

func (*FilterUserInviteList) Inviter added in v2.3.0

func (*FilterUserInviteList) RequireMFA added in v2.3.0

func (f *FilterUserInviteList) RequireMFA() *pangea.FilterEqual[bool]

func (*FilterUserInviteList) Signup added in v2.3.0

func (*FilterUserInviteList) State added in v2.3.0

type FilterUserList added in v2.3.0

type FilterUserList struct {
	pangea.FilterBase
	// contains filtered or unexported fields
}

func NewFilterUserList added in v2.3.0

func NewFilterUserList() *FilterUserList

func (*FilterUserList) AcceptedEulaID added in v2.3.0

func (fu *FilterUserList) AcceptedEulaID() *pangea.FilterMatch[string]

func (*FilterUserList) CreatedAt added in v2.3.0

func (fu *FilterUserList) CreatedAt() *pangea.FilterRange[string]

func (*FilterUserList) Disabled added in v2.3.0

func (fu *FilterUserList) Disabled() *pangea.FilterEqual[bool]

func (*FilterUserList) Email added in v2.3.0

func (fu *FilterUserList) Email() *pangea.FilterMatch[string]

func (*FilterUserList) ID added in v2.3.0

func (*FilterUserList) LastLoginAt added in v2.3.0

func (fu *FilterUserList) LastLoginAt() *pangea.FilterMatch[string]

func (*FilterUserList) LastLoginCity added in v2.3.0

func (fu *FilterUserList) LastLoginCity() *pangea.FilterMatch[string]

func (*FilterUserList) LastLoginCountry added in v2.3.0

func (fu *FilterUserList) LastLoginCountry() *pangea.FilterMatch[string]

func (*FilterUserList) LastLoginIP added in v2.3.0

func (fu *FilterUserList) LastLoginIP() *pangea.FilterMatch[string]

func (*FilterUserList) LoginCount added in v2.3.0

func (fu *FilterUserList) LoginCount() *pangea.FilterRange[int]

func (*FilterUserList) RequireMFA added in v2.3.0

func (fu *FilterUserList) RequireMFA() *pangea.FilterEqual[bool]

func (*FilterUserList) Scopes added in v2.3.0

func (fu *FilterUserList) Scopes() *pangea.FilterEqual[[]string]

func (*FilterUserList) Verified added in v2.3.0

func (fu *FilterUserList) Verified() *pangea.FilterEqual[bool]

type Flow

type Flow struct {
	*pangea.Client
	Signup *FlowSignup
	Verify *FlowVerify
	Enroll *FlowEnroll
	Reset  *FlowReset
}

func (*Flow) Complete

@summary Complete Sign-up/in

@description Complete a login or signup flow.

@operationId authn_post_v1_flow_complete

@example

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

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

func (*Flow) Start

@summary Start a sign-up/in

@description Start a new signup or signin flow.

@operationId authn_post_v1_flow_start

@example

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

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

type FlowCompleteRequest

type FlowCompleteRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	FlowID string `json:"flow_id"`
}

type FlowCompleteResult

type FlowCompleteResult struct {
	RefreshToken LoginToken `json:"refresh_token"`
	ActiveToken  LoginToken `json:"active_token"`
}

type FlowEnroll

type FlowEnroll struct {
	*pangea.Client
	MFA *FlowEnrollMFA
}

type FlowEnrollMFA

type FlowEnrollMFA struct {
	*pangea.Client
}

func (*FlowEnrollMFA) Complete

@summary Complete MFA Enrollment

@description Complete MFA enrollment by verifying a trial MFA code.

@operationId authn_post_v1_flow_enroll_mfa_complete

@example

input := authn.FlowEnrollMFACompleteRequest{
	FlowID: "pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh",
	Code: "391423",
}

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

func (*FlowEnrollMFA) Start

@summary Start MFA Enrollment

@description Start the process of enrolling an MFA.

@operationId authn_post_v1_flow_enroll_mfa_start

@example

input := authn.FlowEnrollMFAStartRequest{
	FlowID: "pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh",
	MFAProvider: authn.IDPSMSOTP,
	Phone: "1-808-555-0173",
}

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

type FlowEnrollMFACompleteRequest

type FlowEnrollMFACompleteRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	FlowID string `json:"flow_id"`
	Code   string `json:"code"`
	Cancel *bool  `json:"cancel,omitempty"`
}

type FlowEnrollMFACompleteResult

type FlowEnrollMFACompleteResult struct {
	CommonFlowResult
}

type FlowEnrollMFAStartRequest

type FlowEnrollMFAStartRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	FlowID      string      `json:"flow_id"`
	MFAProvider MFAProvider `json:"mfa_provider"`
	Phone       string      `json:"phone,omitempty"`
}

type FlowEnrollMFAStartResult

type FlowEnrollMFAStartResult struct {
	CommonFlowResult
}

type FlowReset

type FlowReset struct {
	*pangea.Client
}

func (*FlowReset) Password

@summary Password Reset

@description Reset password during sign-in.

@operationId authn_post_v1_flow_reset_password

@example

input := authn.FlowResetPasswordRequest{
	FlowID: "pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh",
	Password: "My1s+Password",
}

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

type FlowResetPasswordRequest

type FlowResetPasswordRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	FlowID   string `json:"flow_id"`
	Password string `json:"password"`
	Cancel   *bool  `json:"cancel,omitempty"`
	CBState  string `json:"cb_state,omitempty"`
	CBCode   string `json:"cb_code,omitempty"`
}

type FlowResetPasswordResult

type FlowResetPasswordResult struct {
	CommonFlowResult
}

type FlowSignup

type FlowSignup struct {
	*pangea.Client
}

func (*FlowSignup) Password

@summary Password Sign-up

@description Signup a new account using a password.

@operationId authn_post_v1_flow_signup_password

@example

input := authn.FlowSignupPasswordRequest{
	FlowID: "pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh",
	Password: "My1s+Password",
	FirstName: "Joe",
	LastName: "User",
}

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

func (*FlowSignup) Social

@summary Social Sign-up

@description Signup a new account using a social provider.

@operationId authn_post_v1_flow_signup_social

@example

input := authn.FlowSignupSocialRequest{
	FlowID: "pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh",
	CBState: "pcb_zurr3lkcwdp5keq73htsfpcii5k4zgm7",
	CBCode: "poc_fwg3ul4db1jpivexru3wyj354u9ej5e2",
}

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

type FlowSignupPasswordRequest

type FlowSignupPasswordRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	FlowID    string `json:"flow_id"`
	Password  string `json:"password"`
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
}

type FlowSignupPasswordResult

type FlowSignupPasswordResult struct {
	CommonFlowResult
}

type FlowSignupSocialRequest

type FlowSignupSocialRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	FlowID  string `json:"flow_id"`
	CBState string `json:"cb_state"`
	CBCode  string `json:"cb_code"`
}

type FlowSignupSocialResult

type FlowSignupSocialResult struct {
	CommonFlowResult
}

type FlowStartRequest

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 FlowStartResult

type FlowStartResult struct {
	CommonFlowResult
}

type FlowType

type FlowType string
const (
	FTsignin FlowType = "signin"
	FTsignup          = "signup"
)

type FlowVerify

type FlowVerify struct {
	*pangea.Client
	MFA *FlowVerifyMFA
}

func (*FlowVerify) Captcha

@summary Verify Captcha

@description Verify a CAPTCHA during a signup or signin flow.

@operationId authn_post_v1_flow_verify_captcha

@example

input := authn.FlowVerifyCaptchaRequest{
	FlowID: "pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh",
	Code: "SOMEREALLYLONGANDOPAQUESTRINGFROMCAPTCHAVERIFICATION",
}

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

func (*FlowVerify) Email

@summary Verify Email Address

@description Verify an email address during a signup or signin flow.

@operationId authn_post_v1_flow_verify_email

@example

input := authn.FlowVerifyEmailRequest{
	FlowID: "pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh",
	CBState: "pcb_zurr3lkcwdp5keq73htsfpcii5k4zgm7",
	CBCode: "poc_fwg3ul4db1jpivexru3wyj354u9ej5e2",
}

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

func (*FlowVerify) Password

@summary Password Sign-in

@description Sign in with a password.

@operationId authn_post_v1_flow_verify_password

@example

input := authn.FlowVerifyPasswordRequest{
	FlowID: "pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh",
	Password: pangea.String("My1s+Password"),
}

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

func (*FlowVerify) Social

@summary Social Sign-in

@description Signin with a social provider.

@operationId authn_post_v1_flow_verify_social

@example

input := authn.FlowVerifySocialRequest{
	FlowID: "pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh",
	CBState: "pcb_zurr3lkcwdp5keq73htsfpcii5k4zgm7",
	CBCode: "poc_fwg3ul4db1jpivexru3wyj354u9ej5e2",
}

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

type FlowVerifyCaptchaRequest

type FlowVerifyCaptchaRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	FlowID string `json:"flow_id"`
	Code   string `json:"code"`
}

type FlowVerifyCaptchaResult

type FlowVerifyCaptchaResult struct {
	CommonFlowResult
}

type FlowVerifyEmailRequest

type FlowVerifyEmailRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	FlowID  string `json:"flow_id"`
	CBState string `json:"cb_state,omitempty"`
	CBCode  string `json:"cb_code,omitempty"`
}

type FlowVerifyEmailResult

type FlowVerifyEmailResult struct {
	CommonFlowResult
}

type FlowVerifyMFA

type FlowVerifyMFA struct {
	*pangea.Client
}

func (*FlowVerifyMFA) Complete

@summary Complete MFA Verification

@description Complete MFA verification.

@operationId authn_post_v1_flow_verify_mfa_complete

@example

input := authn.FlowVerifyMFACompleteRequest{
	FlowID: "pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh",
	Code: pangea.String("999999"),
}

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

func (*FlowVerifyMFA) Start

@summary Start MFA Verification

@description Start the process of MFA verification.

@operationId authn_post_v1_flow_verify_mfa_start

@example

input := authn.FlowVerifyMFAStartRequest{
	FlowID: "pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh",
	MFAProvider: authn.MFAPTOTP,
}

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

type FlowVerifyMFACompleteRequest

type FlowVerifyMFACompleteRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	FlowID string  `json:"flow_id"`
	Code   *string `json:"code,omitempty"`
	Cancel *bool   `json:"cancel,omitempty"`
}

type FlowVerifyMFACompleteResult

type FlowVerifyMFACompleteResult struct {
	CommonFlowResult
}

type FlowVerifyMFAStartRequest

type FlowVerifyMFAStartRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	FlowID      string      `json:"flow_id"`
	MFAProvider MFAProvider `json:"mfa_provider"`
}

type FlowVerifyMFAStartResult

type FlowVerifyMFAStartResult struct {
	CommonFlowResult
}

type FlowVerifyPasswordRequest

type FlowVerifyPasswordRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	FlowID   string  `json:"flow_id"`
	Password *string `json:"password,omitempty"`
	Reset    *bool   `json:"reset,omitempty"`
}

type FlowVerifyPasswordResult

type FlowVerifyPasswordResult struct {
	CommonFlowResult
}

type FlowVerifySocialRequest

type FlowVerifySocialRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	FlowID  string `json:"flow_id"`
	CBState string `json:"cb_state"`
	CBCode  string `json:"cb_code"`
}

type FlowVerifySocialResult

type FlowVerifySocialResult struct {
	CommonFlowResult
}

type IDProvider

type IDProvider string

type ItemOrder

type ItemOrder string
const (
	IOasc  ItemOrder = "asc"
	IOdesc           = "desc"
)

type LoginToken

type LoginToken struct {
	Token     string      `json:"token"`
	ID        string      `json:"id"`
	Type      string      `json:"type"`
	Life      int         `json:"life"`
	Expire    string      `json:"expire"`
	Identity  string      `json:"identity"`
	Email     string      `json:"email"`
	Profile   ProfileData `json:"profile"`
	Scopes    Scopes      `json:"scopes"`
	CreatedAt string      `json:"created_at"`
}

type MFAProvider

type MFAProvider string

type Password

type Password struct {
	*pangea.Client
}

type PasswordSignupData

type PasswordSignupData struct {
	PasswordCharsMin  int `json:"password_chars_min"`
	PasswordCharsMax  int `json:"password_chars_max"`
	PasswordLowerMin  int `json:"password_lower_min"`
	PasswordUpperMin  int `json:"passwrod_upper_min"`
	PasswordPunctMin  int `json:"password_punct_min"`
	PasswordNumberMin int `json:"password_number_min"`
}

type ProfileData

type ProfileData map[string]string

type Scopes

type Scopes []string

type Session

type Session struct {
	*pangea.Client
}

func (*Session) Invalidate

@summary Invalidate Session

@description Invalidate a session by session ID.

@operationId authn_post_v1_session_invalidate

@example

input := authn.SessionInvalidateRequest{
	SessionID: "pmt_zppkzrjguxyblaia6itbiesejn7jejnr",
}

resp, err := authncli.Session.Invalidate(ctx, input)

func (*Session) List

@summary List session (service token)

@description List sessions.

@operationId authn_post_v1_session_list

@example

input := authn.SessionListRequest{}
resp, err := authn.Session.List(ctx, input)

func (*Session) Logout

@summary Log out (service token)

@description Invalidate all sessions belonging to a user.

@operationId authn_post_v1_session_logout

@example

input := authn.SessionLogoutRequest{
	UserID: "pui_xpkhwpnz2cmegsws737xbsqnmnuwtvm5",
}

resp, err := authncli.Session.Logout(ctx, input)

type SessionInvalidateRequest

type SessionInvalidateRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	SessionID string `json:"session_id"`
}

type SessionInvalidateResult

type SessionInvalidateResult struct {
}

type SessionItem

type SessionItem struct {
	ID          string        `json:"id"`
	Type        string        `json:"type"`
	Life        int           `json:"life"`
	Expire      string        `json:"expire"`
	Identity    string        `json:"identity"`
	Email       string        `json:"email"`
	Scopes      Scopes        `json:"scopes"`
	Profile     ProfileData   `json:"profile"`
	CreatedAt   string        `json:"created_at"`
	ActiveToken *SessionToken `json:"active_token,omitempty"`
}

type SessionListOrderBy

type SessionListOrderBy string

type SessionListRequest

type SessionListRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	// Should use FilterSessionList object here
	Filter  pangea.Filter      `json:"filter,omitempty"`
	Last    string             `json:"last,omitempty"`
	Order   ItemOrder          `json:"order,omitempty"`
	OrderBy SessionListOrderBy `json:"order_by,omitempty"`
}

type SessionListResult

type SessionListResult struct {
	Sessions []SessionItem `json:"sessions"`
	Last     string        `json:"last"`
}

type SessionLogoutRequest

type SessionLogoutRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	UserID string `json:"user_id"`
}

type SessionLogoutResult

type SessionLogoutResult struct {
}

type SessionToken

type SessionToken struct {
	ID        string      `json:"id"`
	Type      string      `json:"type"`
	Life      int         `json:"life"`
	Expire    string      `json:"expire"`
	Email     string      `json:"email"`
	Scopes    Scopes      `json:"scopes"`
	Profile   ProfileData `json:"profile"`
	CreatedAt string      `json:"created_at"`
}

type SignupData

type SignupData struct {
	SocialSignup   SocialSignupData   `json:"social_signup"`
	PasswordSignup PasswordSignupData `json:"password_signup"`
}

type SocialSignupData

type SocialSignupData struct {
	RedirectURI map[string]string `json:"redirect_uri"`
}

type TOTPSecretData

type TOTPSecretData struct {
	QRImage string `json:"qr_image"`
	Secret  string `json:"secret"`
}

type User

type User struct {
	*pangea.Client
	Profile  *UserProfile
	Invites  *UserInvite
	MFA      *UserMFA
	Login    *UserLogin
	Password *UserPassword
}

func (*User) Create

@summary Create User

@description Create a user.

@operationId authn_post_v1_user_create

@example

profile := &authn.ProfileData{
	"first_name": "Joe",
	"last_name": "User",
}

input := authn.UserCreateRequest{
	Email: "joe.user@email.com",
	Authenticator: "My1s+Password",
	IDProvider: authn.IDPPassword,
	Profile: profile,
}

resp, err := authncli.User.Create(ctx, input)

func (*User) Delete

@summary Delete User

@description Delete a user by email address.

@operationId authn_post_v1_user_delete

@example

input := UserDeleteRequest{
	Email: "joe.user@email.com",
}

authncli.User.Delete(ctx, input)

func (*User) Invite

@summary Invite User

@description Send an invitation to a user.

@operationId authn_post_v1_user_invite

@example

input := authn.UserInviteRequest{
	Inviter: "admin@email.com",
	Email: "joe.user@email.com",
	Callback: "/callback",
	State: "pcb_zurr3lkcwdp5keq73htsfpcii5k4zgm7",
}

resp, err := authncli.User.Invite(ctx, input)

func (*User) List

@summary List Users

@description Look up users by scopes.

@operationId authn_post_v1_user_list

@example

input := authn.UserListRequest{}
resp, err := authncli.User.List(ctx, input)

func (*User) Update

@summary Update user's settings

@description Update user's settings.

@operationId authn_post_v1_user_update

@example

input := authn.UserUpdateRequest{
	Email: pangea.String("joe.user@email.com"),
	RequireMFA: pangea.Bool(true),
}

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

func (*User) Verify

@summary Verify User

@description Verify a user's primary authentication.

@operationId authn_post_v1_user_verify

@example

input := authn.UserVerifyRequest{
	IDProvider: authn.IDPPassword,
	Email: "joe.user@email.com",
	Authenticator: "My1s+Password",
}

resp, err := authncli.User.Verify(ctx, input)

type UserCreateRequest

type UserCreateRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	Email         string       `json:"email"`
	Authenticator string       `json:"authenticator"`
	IDProvider    IDProvider   `json:"id_provider"`
	Verified      *bool        `json:"verified,omitempty"`
	RequireMFA    *bool        `json:"require_mfa,omitempty"`
	Profile       *ProfileData `json:"profile,omitempty"`
	Scopes        *Scopes      `json:"scopes,omitempty"`
}

type UserCreateResult

type UserCreateResult struct {
	ID           string        `json:"id"`
	Email        string        `json:"email"`
	Profile      ProfileData   `json:"profile"`
	IDProviders  []string      `json:"id_providers"`
	RequireMFA   bool          `json:"require_mfa"`
	Verified     bool          `json:"verified"`
	LastLoginAt  *string       `json:"last_login_at,omitempty"`
	Disabled     bool          `json:"disabled"`
	MFAProviders []MFAProvider `json:"mfa_providers,omitempty"`
	CreatedAt    string        `json:"created_at"`
}

type UserDeleteRequest

type UserDeleteRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	Email string `json:"email,omitempty"`
	ID    string `json:"id,omitempty"`
}

type UserDeleteResult

type UserDeleteResult struct {
}

type UserInfo

type UserInfo struct {
	Profile      ProfileData `json:"profile"`
	ID           string      `json:"id"`
	Email        string      `json:"email"`
	Scopes       Scopes      `json:"scopes"`
	IDProviders  []string    `json:"id_providers"`
	MFAProviders []string    `json:"mfa_providers"`
	RequireMFA   bool        `json:"require_mfa"`
	Verified     bool        `json:"verified"`
	Disabled     bool        `json:"disabled"`
	LastLoginAt  *string     `json:"last_login_at,omitempty"`
	CreatedAt    string      `json:"created_at"`
}

type UserInvite

type UserInvite struct {
	*pangea.Client
}

func (*UserInvite) Delete

@summary Delete Invite

@description Delete a user invitation.

@operationId authn_post_v1_user_invite_delete

@example

input := authn.UserInviteDeleteRequest{
	ID: "pmc_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
}

resp, err := authncli.User.Invite.Delete(ctx, input)

func (*UserInvite) List

@summary List Invites

@description Look up active invites for the userpool.

@operationId authn_post_v1_user_invite_list

@example

input := authn.UserInviteListRequest{}
resp, err := authncli.User.Invite.List(ctx, input)

type UserInviteData

type UserInviteData struct {
	ID         string `json:"id"`
	Inviter    string `json:"inviter"`
	InviteOrg  string `json:"invite_org"`
	Email      string `json:"email"`
	Callback   string `json:"callback"`
	State      string `json:"state"`
	RequireMFA bool   `json:"require_mfa"`
	CreatedAt  string `json:"created_at"`
	Expire     string `json:"expire"`
}

type UserInviteDeleteRequest

type UserInviteDeleteRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	ID string `json:"id"`
}

type UserInviteDeleteResult

type UserInviteDeleteResult struct {
}

type UserInviteListOrderBy

type UserInviteListOrderBy string

type UserInviteListRequest

type UserInviteListRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	// Should use FilterUserInviteList object here
	Filter  pangea.Filter         `json:"filter,omitempty"`
	Last    string                `json:"last,omitempty"`
	Order   ItemOrder             `json:"order,omitempty"`
	OrderBy UserInviteListOrderBy `json:"order_by,omitempty"`
	Size    int                   `json:"size,omitempty"`
}

type UserInviteListResult

type UserInviteListResult struct {
	Invites []UserInviteData `json:"invites"`
	Last    string           `json:"last"`
	Count   int              `json:"count"`
}

type UserInviteRequest

type UserInviteRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	Inviter    string `json:"inviter"`
	Email      string `json:"email"`
	Callback   string `json:"callback"`
	State      string `json:"state"`
	RequireMFA *bool  `json:"require_mfa,omitempty"`
}

type UserInviteResult

type UserInviteResult struct {
	ID         string `json:"id"`
	Inviter    string `json:"inviter"`
	InviteOrg  string `json:"invite_org"`
	Email      string `json:"email"`
	Callback   string `json:"callback"`
	State      string `json:"state"`
	RequireMFA bool   `json:"require_mfa"`
	CreatedAt  string `json:"created_at"`
	Expire     string `json:"expire"`
}

type UserListOrderBy

type UserListOrderBy string

type UserListRequest

type UserListRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	// Should user FilterUserList object here
	Filter  pangea.Filter   `json:"filter,omitempty"`
	Last    string          `json:"last,omitempty"`
	Order   ItemOrder       `json:"order,omitempty"`
	OrderBy UserListOrderBy `json:"order_by,omitempty"`
	Size    int             `json:"size,omitempty"`
}

type UserListResult

type UserListResult struct {
	Users []UserInfo `json:"users"`
	Last  string     `json:"last,omitempty"`
	Count int        `json:"count"`
}

type UserLogin

type UserLogin struct {
	*pangea.Client
}

func (*UserLogin) Password

@summary Login with a password

@description Login a user with a password and return the user's token and information.

@operationId authn_post_v1_user_login_password

@example

input := authn.UserLoginPasswordRequest{
	Email: "joe.user@email.com",
	Password: "My1s+Password",
	ExtraProfile: &authn.ProfileData{
		"country": "Argentina",
	},
}

resp, err := authncli.User.Login.Password(ctx, input)

func (*UserLogin) Social

@summary Login with a social provider

@description Login a user by their social ID and return the user's token and information.

@operationId authn_post_v1_user_login_social

@example

input := authn.UserLoginSocialRequest{
	Email: "joe.user@email.com",
	Provider: authn.IDPGoogle,
	SocialID: "My1s+Password",
}

resp, err := authncli.User.Login.Social(ctx, input)

type UserLoginPasswordRequest

type UserLoginPasswordRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	Email        string       `json:"email"`
	Password     string       `json:"password"`
	ExtraProfile *ProfileData `json:"extra_profile,omitempty"`
}

type UserLoginResult

type UserLoginResult struct {
	RefreshToken LoginToken  `json:"refresh_token"`
	ActiveToken  *LoginToken `json:"active_token,omitempty"`
}

type UserLoginSocialRequest

type UserLoginSocialRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	Email        string       `json:"email"`
	Provider     IDProvider   `json:"provider"`
	SocialID     string       `json:"social_id"`
	ExtraProfile *ProfileData `json:"extra_profile,omitempty"`
}

type UserMFA

type UserMFA struct {
	*pangea.Client
}

func (*UserMFA) Delete

@summary Delete MFA Enrollment

@description Delete MFA enrollment for a user.

@operationId authn_post_v1_user_mfa_delete

@example

input := authn.UserMFADeleteRequest{
	UserID: "pui_zgp532cx6opljeavvllmbi3iwmq72f7f",
	MFAProvider: authn.MFAPTOTP,
}

resp, err := authncli.User.MFA.Delete(ctx, input)

func (*UserMFA) Enroll

@summary Enroll In MFA

@description Enroll in MFA for a user by proving the user has access to an MFA verification code.

@operationId authn_post_v1_user_mfa_enroll

@example

input := authn.UserMFAEnrollRequest{
	UserID: "pui_zgp532cx6opljeavvllmbi3iwmq72f7f",
	MFAProvider: authn.MFAPTOTP,
	Code: "999999",
}

resp, err := authncli.User.MFA.Enroll(ctx, input)

func (*UserMFA) Start

@summary Start MFA Verification

@description Start MFA verification for a user, generating a new one-time code, and sending it if necessary. When enrolling TOTP, this returns the TOTP secret.

@operationId authn_post_v1_user_mfa_start

@example

input := authn.UserMFAStartRequest{
	UserID: "pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh",
	MFAProvider: authn.MFAPTOTP,
}

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

func (*UserMFA) Verify

@summary Verify An MFA Code

@description Verify that the user has access to an MFA verification code.

@operationId authn_post_v1_user_mfa_verify

@example

input := authn.UserMFAVerifyRequest{
	UserID: "pui_zgp532cx6opljeavvllmbi3iwmq72f7f",
	MFAProvider: authn.MFAPTOTP,
	Code: "999999",
}

resp, err := authncli.User.MFA.Verify(ctx, input)

type UserMFADeleteRequest

type UserMFADeleteRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	UserID      string      `json:"user_id"`
	MFAProvider MFAProvider `json:"mfa_provider"`
}

type UserMFADeleteResult

type UserMFADeleteResult struct {
}

type UserMFAEnrollRequest

type UserMFAEnrollRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	UserID      string      `json:"user_id"`
	MFAProvider MFAProvider `json:"mfa_provider"`
	Code        string      `json:"code"`
}

type UserMFAEnrollResult

type UserMFAEnrollResult struct {
}

type UserMFAStartRequest

type UserMFAStartRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	UserID      string      `json:"user_id"`
	MFAProvider MFAProvider `json:"mfa_provider"`
	Enroll      *bool       `json:"enroll,omitempty"`
	Phone       *string     `json:"phone,omitempty"`
}

type UserMFAStartResult

type UserMFAStartResult struct {
	TOTPSecret *UserMFAStartTOTPSecret `json:"totp_secret,omitempty"`
}

type UserMFAStartTOTPSecret

type UserMFAStartTOTPSecret struct {
	QRImage string `json:"qr_image"`
	Secret  string `json:"secret"`
}

type UserMFAVerifyRequest

type UserMFAVerifyRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	UserID      string      `json:"user_id"`
	MFAProvider MFAProvider `json:"mfa_provider"`
	Code        string      `json:"code"`
}

type UserMFAVerifyResult

type UserMFAVerifyResult struct {
}

type UserPassword

type UserPassword struct {
	*pangea.Client
}

func (*UserPassword) Reset

@summary User Password Reset

@description Manually reset a user's password.

@operationId authn_post_v1_user_password_reset

@example

input := authn.UserPasswordResetRequest{
	UserID: "pui_xpkhwpnz2cmegsws737xbsqnmnuwtvm5",
	NewPassword: "My2n+Password",
}

resp, err := authncli.User.Password.Reset(ctx, input)

type UserPasswordResetRequest

type UserPasswordResetRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	UserID      string `json:"user_id"`
	NewPassword string `json:"new_password"`
}

type UserPasswordResetResult

type UserPasswordResetResult struct {
}

type UserProfile

type UserProfile struct {
	*pangea.Client
}

func (*UserProfile) Get

@summary Get user

@description Get user's information.

@operationId authn_post_v1_user_profile_get

@example

input := authn.UserProfileGetRequest{
	Email: pangea.String("joe.user@email.com"),
}

resp, err := authncli.User.Profile.Get(ctx, input)

func (*UserProfile) Update

@summary Update user

@description Update user's information by identity or email.

@operationId authn_post_v1_user_profile_update

@example

input := authn.UserProfileUpdateRequest{
	Email: pangea.String("joe.user@email.com"),
	Profile: authn.ProfileData{
		"country": "Argentina",
	},
}

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

type UserProfileGetRequest

type UserProfileGetRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	ID    *string `json:"id,omitempty"`
	Email *string `json:"email,omitempty"`
}

type UserProfileGetResult

type UserProfileGetResult struct {
	ID           string        `json:"id"`
	Email        string        `json:"email"`
	Profile      ProfileData   `json:"profile"`
	IDProviders  []string      `json:"id_providers"`
	MFAProviders []MFAProvider `json:"mfa_providers,omitempty"`
	RequireMFA   bool          `json:"require_mfa"`
	Verified     bool          `json:"verified"`
	LastLoginAt  *string       `json:"last_login_at,omitempty"`
	Disabled     bool          `json:"disabled"`
	CreatedAt    string        `json:"created_at"`
}

type UserProfileUpdateRequest

type UserProfileUpdateRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	Profile ProfileData `json:"profile"`
	ID      *string     `json:"id,omitempty"`
	Email   *string     `json:"email,omitempty"`
}

type UserProfileUpdateResult

type UserProfileUpdateResult struct {
	ID           string        `json:"id"`
	Email        string        `json:"email"`
	Profile      ProfileData   `json:"profile"`
	IDProviders  []string      `json:"id_providers"`
	MFAProviders []MFAProvider `json:"mfa_providers"`
	RequireMFA   bool          `json:"require_mfa"`
	Verified     bool          `json:"verified"`
	LastLoginAt  *string       `json:"last_login_at,omitempty"`
	Disabled     bool          `json:"disabled"`
	CreatedAt    string        `json:"created_at"`
}

type UserUpdateRequest

type UserUpdateRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	ID            *string `json:"id,omitempty"`
	Email         *string `json:"email,omitempty"`
	Authenticator *string `json:"authenticator,omitempty"`
	Disabled      *bool   `json:"disabled,omitempty"`
	RequireMFA    *bool   `json:"require_mfa,omitempty"`
}

type UserUpdateResult

type UserUpdateResult struct {
	ID           string        `json:"id"`
	Email        string        `json:"email"`
	Profile      ProfileData   `json:"profile"`
	Scopes       *Scopes       `json:"scopes,omitempty"`
	IDProviders  []string      `json:"id_providers"`
	MFAProviders []MFAProvider `json:"mfa_providers,omitempty"`
	RequireMFA   bool          `json:"require_mfa"`
	Verified     bool          `json:"verified"`
	Disabled     bool          `json:"disabled"`
	LastLoginAt  string        `json:"last_login_at,omitempty"`
	CreatedAt    string        `json:"created_at"`
}

type UserVerifyRequest

type UserVerifyRequest struct {
	// Base request has ConfigID for multi-config projects
	pangea.BaseRequest

	IDProvider    IDProvider `json:"id_provider"`
	Email         string     `json:"email"`
	Authenticator string     `json:"authenticator"`
}

type UserVerifyResult

type UserVerifyResult struct {
	ID           string      `json:"id"`
	Email        string      `json:"email"`
	Profile      ProfileData `json:"profile"`
	Scopes       Scopes      `json:"scopes"`
	IDProviders  []string    `json:"id_providers"`
	MFAProviders []string    `json:"mfa_providers"`
	RequireMFA   bool        `json:"require_mfa"`
	Verified     bool        `json:"verified"`
	Disable      bool        `json:"disable"`
	LastLoginAt  *string     `json:"last_login_at,omitempty"`
	CreatedAt    string      `json:"created_at"`
}

type VerifyCaptchaData

type VerifyCaptchaData struct {
	SikeKey string `json:"site_key"`
}

type VerifyMFAStartData

type VerifyMFAStartData struct {
	MFAProviders *[]MFAProvider `json:"mfa_providers,omitempty"`
}

type VerifyPasswordData

type VerifyPasswordData struct {
	PasswordCharsMin  int `json:"password_chars_min"`
	PasswordCharsMax  int `json:"password_chars_max"`
	PasswordLowerMin  int `json:"password_lower_min"`
	PasswordUpperMin  int `json:"passwrod_upper_min"`
	PasswordPunctMin  int `json:"password_punct_min"`
	PasswordNumberMin int `json:"password_number_min"`
}

type VerifySocialData

type VerifySocialData struct {
	RedirectURI string `json:"redirect_uri"`
}

Jump to

Keyboard shortcuts

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