Documentation ¶
Index ¶
- Constants
- type AgreementCreateRequest
- type AgreementCreateResult
- type AgreementDeleteRequest
- type AgreementDeleteResult
- type AgreementInfo
- type AgreementListOrderBy
- type AgreementListRequest
- type AgreementListResult
- type AgreementType
- type AgreementUpdateRequest
- type AgreementUpdateResult
- type Agreements
- func (a *Agreements) Create(ctx context.Context, input AgreementCreateRequest) (*pangea.PangeaResponse[AgreementCreateResult], error)
- func (a *Agreements) Delete(ctx context.Context, input AgreementDeleteRequest) (*pangea.PangeaResponse[AgreementDeleteResult], error)
- func (a *Agreements) List(ctx context.Context, input AgreementListRequest) (*pangea.PangeaResponse[AgreementListResult], error)
- func (a *Agreements) Update(ctx context.Context, input AgreementUpdateRequest) (*pangea.PangeaResponse[AgreementUpdateResult], error)
- type AuthN
- type Client
- type ClientJWKSResult
- type ClientPassword
- type ClientPasswordChangeRequest
- type ClientPasswordChangeResult
- type ClientSession
- func (a *ClientSession) Invalidate(ctx context.Context, input ClientSessionInvalidateRequest) (*pangea.PangeaResponse[ClientSessionInvalidateResult], error)
- func (a *ClientSession) List(ctx context.Context, input ClientSessionListRequest) (*pangea.PangeaResponse[SessionListResult], error)
- func (a *ClientSession) Logout(ctx context.Context, input ClientSessionLogoutRequest) (*pangea.PangeaResponse[ClientSessionLogoutResult], error)
- func (a *ClientSession) Refresh(ctx context.Context, input ClientSessionRefreshRequest) (*pangea.PangeaResponse[ClientSessionRefreshResult], error)
- type ClientSessionInvalidateRequest
- type ClientSessionInvalidateResult
- type ClientSessionListRequest
- type ClientSessionLogoutRequest
- type ClientSessionLogoutResult
- type ClientSessionRefreshRequest
- type ClientSessionRefreshResult
- type ClientToken
- type ClientTokenCheckRequest
- type ClientTokenCheckResult
- type ClientUserinfoRequest
- type ClientUserinfoResult
- type CommonFlowResult
- type EnrollMFACompleteData
- type EnrollMFAStartData
- type FilterAgreementList
- func (f *FilterAgreementList) Active() *pangea.FilterEqual[bool]
- func (f *FilterAgreementList) CreatedAt() *pangea.FilterRange[string]
- func (f *FilterAgreementList) ID() *pangea.FilterMatch[string]
- func (f *FilterAgreementList) Name() *pangea.FilterMatch[string]
- func (f *FilterAgreementList) PublishedAt() *pangea.FilterRange[string]
- func (f *FilterAgreementList) Text() *pangea.FilterMatch[string]
- func (f *FilterAgreementList) Type() *pangea.FilterMatch[string]
- type FilterSessionList
- func (f *FilterSessionList) CreatedAt() *pangea.FilterRange[string]
- func (f *FilterSessionList) Email() *pangea.FilterMatch[string]
- func (f *FilterSessionList) Expire() *pangea.FilterRange[string]
- func (f *FilterSessionList) ID() *pangea.FilterMatch[string]
- func (f *FilterSessionList) Identity() *pangea.FilterMatch[string]
- func (f *FilterSessionList) Scopes() *pangea.FilterEqual[[]string]
- func (f *FilterSessionList) Type() *pangea.FilterMatch[string]
- type FilterUserInviteList
- func (f *FilterUserInviteList) Callback() *pangea.FilterMatch[string]
- func (f *FilterUserInviteList) CreatedAt() *pangea.FilterRange[string]
- func (f *FilterUserInviteList) Email() *pangea.FilterMatch[string]
- func (f *FilterUserInviteList) Expire() *pangea.FilterRange[string]
- func (f *FilterUserInviteList) ID() *pangea.FilterMatch[string]
- func (f *FilterUserInviteList) InviteOrg() *pangea.FilterMatch[string]
- func (f *FilterUserInviteList) Inviter() *pangea.FilterMatch[string]
- func (f *FilterUserInviteList) RequireMFA() *pangea.FilterEqual[bool]
- func (f *FilterUserInviteList) Signup() *pangea.FilterEqual[bool]
- func (f *FilterUserInviteList) State() *pangea.FilterMatch[string]
- type FilterUserList
- func (fu *FilterUserList) AcceptedEulaID() *pangea.FilterMatch[string]
- func (fu *FilterUserList) CreatedAt() *pangea.FilterRange[string]
- func (fu *FilterUserList) Disabled() *pangea.FilterEqual[bool]
- func (fu *FilterUserList) Email() *pangea.FilterMatch[string]
- func (fu *FilterUserList) ID() *pangea.FilterMatch[string]
- func (fu *FilterUserList) LastLoginAt() *pangea.FilterMatch[string]
- func (fu *FilterUserList) LastLoginCity() *pangea.FilterMatch[string]
- func (fu *FilterUserList) LastLoginCountry() *pangea.FilterMatch[string]
- func (fu *FilterUserList) LastLoginIP() *pangea.FilterMatch[string]
- func (fu *FilterUserList) LoginCount() *pangea.FilterRange[int]
- func (fu *FilterUserList) RequireMFA() *pangea.FilterEqual[bool]
- func (fu *FilterUserList) Scopes() *pangea.FilterEqual[[]string]
- func (fu *FilterUserList) Verified() *pangea.FilterEqual[bool]
- type Flow
- type FlowCompleteRequest
- type FlowCompleteResult
- type FlowEnroll
- type FlowEnrollMFA
- type FlowEnrollMFACompleteRequest
- type FlowEnrollMFACompleteResult
- type FlowEnrollMFAStartRequest
- type FlowEnrollMFAStartResult
- type FlowReset
- type FlowResetPasswordRequest
- type FlowResetPasswordResult
- type FlowSignup
- type FlowSignupPasswordRequest
- type FlowSignupPasswordResult
- type FlowSignupSocialRequest
- type FlowSignupSocialResult
- type FlowStartRequest
- type FlowStartResult
- type FlowType
- type FlowVerify
- func (a *FlowVerify) Captcha(ctx context.Context, input FlowVerifyCaptchaRequest) (*pangea.PangeaResponse[FlowVerifyCaptchaResult], error)
- func (a *FlowVerify) Email(ctx context.Context, input FlowVerifyEmailRequest) (*pangea.PangeaResponse[FlowVerifyEmailResult], error)
- func (a *FlowVerify) Password(ctx context.Context, input FlowVerifyPasswordRequest) (*pangea.PangeaResponse[FlowVerifyPasswordResult], error)
- func (a *FlowVerify) Social(ctx context.Context, input FlowVerifySocialRequest) (*pangea.PangeaResponse[FlowVerifySocialResult], error)
- type FlowVerifyCaptchaRequest
- type FlowVerifyCaptchaResult
- type FlowVerifyEmailRequest
- type FlowVerifyEmailResult
- type FlowVerifyMFA
- type FlowVerifyMFACompleteRequest
- type FlowVerifyMFACompleteResult
- type FlowVerifyMFAStartRequest
- type FlowVerifyMFAStartResult
- type FlowVerifyPasswordRequest
- type FlowVerifyPasswordResult
- type FlowVerifySocialRequest
- type FlowVerifySocialResult
- type IDProvider
- type ItemOrder
- type LoginToken
- type MFAProvider
- type Password
- type PasswordSignupData
- type ProfileData
- type Scopes
- type Session
- func (a *Session) Invalidate(ctx context.Context, input SessionInvalidateRequest) (*pangea.PangeaResponse[SessionInvalidateResult], error)
- func (a *Session) List(ctx context.Context, input SessionListRequest) (*pangea.PangeaResponse[SessionListResult], error)
- func (a *Session) Logout(ctx context.Context, input SessionLogoutRequest) (*pangea.PangeaResponse[SessionLogoutResult], error)
- type SessionInvalidateRequest
- type SessionInvalidateResult
- type SessionItem
- type SessionListOrderBy
- type SessionListRequest
- type SessionListResult
- type SessionLogoutRequest
- type SessionLogoutResult
- type SessionToken
- type SignupData
- type SocialSignupData
- type TOTPSecretData
- type User
- func (a *User) Create(ctx context.Context, input UserCreateRequest) (*pangea.PangeaResponse[UserCreateResult], error)
- func (a *User) Delete(ctx context.Context, input UserDeleteRequest) (*pangea.PangeaResponse[UserDeleteResult], error)
- func (a *User) Invite(ctx context.Context, input UserInviteRequest) (*pangea.PangeaResponse[UserInviteResult], error)
- func (a *User) List(ctx context.Context, input UserListRequest) (*pangea.PangeaResponse[UserListResult], error)
- func (a *User) Update(ctx context.Context, input UserUpdateRequest) (*pangea.PangeaResponse[UserUpdateResult], error)
- func (a *User) Verify(ctx context.Context, input UserVerifyRequest) (*pangea.PangeaResponse[UserVerifyResult], error)
- type UserCreateRequest
- type UserCreateResult
- type UserDeleteRequest
- type UserDeleteResult
- type UserInfo
- type UserInvite
- type UserInviteData
- type UserInviteDeleteRequest
- type UserInviteDeleteResult
- type UserInviteListOrderBy
- type UserInviteListRequest
- type UserInviteListResult
- type UserInviteRequest
- type UserInviteResult
- type UserListOrderBy
- type UserListRequest
- type UserListResult
- type UserLogin
- type UserLoginPasswordRequest
- type UserLoginResult
- type UserLoginSocialRequest
- type UserMFA
- func (a *UserMFA) Delete(ctx context.Context, input UserMFADeleteRequest) (*pangea.PangeaResponse[UserMFADeleteResult], error)
- func (a *UserMFA) Enroll(ctx context.Context, input UserMFAEnrollRequest) (*pangea.PangeaResponse[UserMFAEnrollResult], error)
- func (a *UserMFA) Start(ctx context.Context, input UserMFAStartRequest) (*pangea.PangeaResponse[UserMFAStartResult], error)
- func (a *UserMFA) Verify(ctx context.Context, input UserMFAVerifyRequest) (*pangea.PangeaResponse[UserMFAVerifyResult], error)
- type UserMFADeleteRequest
- type UserMFADeleteResult
- type UserMFAEnrollRequest
- type UserMFAEnrollResult
- type UserMFAStartRequest
- type UserMFAStartResult
- type UserMFAStartTOTPSecret
- type UserMFAVerifyRequest
- type UserMFAVerifyResult
- type UserPassword
- type UserPasswordResetRequest
- type UserPasswordResetResult
- type UserProfile
- type UserProfileGetRequest
- type UserProfileGetResult
- type UserProfileUpdateRequest
- type UserProfileUpdateResult
- type UserUpdateRequest
- type UserUpdateResult
- type UserVerifyRequest
- type UserVerifyResult
- type VerifyCaptchaData
- type VerifyMFAStartData
- type VerifyPasswordData
- type VerifySocialData
Constants ¶
const ( IDPFacebook IDProvider = "facebook" IDPGithub = "github" IDPGoogle = "google" IDPMicrosoftOnline = "microsoftonline" IDPPassword = "password" )
const ( MFAPTOTP MFAProvider = "totp" MFAPEmailOTP = "email_otp" IDPSMSOTP = "sms_otp" )
const ( ULOBid UserListOrderBy = "id" ULOBcreatedAt = "created_at" ULOBlastLoginAt = "last_login_at" ULOBemail = "email" )
const ( UILOBid UserListOrderBy = "id" UILOBcreatedAt = "created_at" UILOBtype = "type" UILOBexpire = "expire" UILOBcallback = "callback" UILOBstate = "state" UILOBemail = "email" UILOBinviter = "inviter" UILOBinviteOrg = "invite_org" )
const ( SLOBid SessionListOrderBy = "id" SLOBcreatedAt = "created_at" SLOBtype = "type" SLOBidentity = "identity" SLOBemail = "email" SLOBexpire = "expire" SLOBactiveTokenID = "active_token_id" )
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 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
func (*Agreements) Create ¶ added in v2.2.0
func (a *Agreements) Create(ctx context.Context, input AgreementCreateRequest) (*pangea.PangeaResponse[AgreementCreateResult], error)
TODO: docs
func (*Agreements) Delete ¶ added in v2.2.0
func (a *Agreements) Delete(ctx context.Context, input AgreementDeleteRequest) (*pangea.PangeaResponse[AgreementDeleteResult], error)
TODO: docs
func (*Agreements) List ¶ added in v2.2.0
func (a *Agreements) List(ctx context.Context, input AgreementListRequest) (*pangea.PangeaResponse[AgreementListResult], error)
TODO: docs
func (*Agreements) Update ¶ added in v2.2.0
func (a *Agreements) Update(ctx context.Context, input AgreementUpdateRequest) (*pangea.PangeaResponse[AgreementUpdateResult], error)
TODO: docs
type AuthN ¶
type Client ¶
type Client struct { Session *ClientSession Password *ClientPassword Token *ClientToken // contains filtered or unexported fields }
func (*Client) JWKS ¶
func (a *Client) JWKS(ctx context.Context) (*pangea.PangeaResponse[ClientJWKSResult], error)
@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 ¶
func (a *Client) Userinfo(ctx context.Context, input ClientUserinfoRequest) (*pangea.PangeaResponse[ClientUserinfoResult], error)
@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 ClientPassword ¶
func (*ClientPassword) Change ¶
func (a *ClientPassword) Change(ctx context.Context, input ClientPasswordChangeRequest) (*pangea.PangeaResponse[ClientPasswordChangeResult], error)
@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 ¶
func (*ClientSession) Invalidate ¶
func (a *ClientSession) Invalidate(ctx context.Context, input ClientSessionInvalidateRequest) (*pangea.PangeaResponse[ClientSessionInvalidateResult], error)
@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 ¶
func (a *ClientSession) List(ctx context.Context, input ClientSessionListRequest) (*pangea.PangeaResponse[SessionListResult], error)
@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 ¶
func (a *ClientSession) Logout(ctx context.Context, input ClientSessionLogoutRequest) (*pangea.PangeaResponse[ClientSessionLogoutResult], error)
@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 ¶
func (a *ClientSession) Refresh(ctx context.Context, input ClientSessionRefreshRequest) (*pangea.PangeaResponse[ClientSessionRefreshResult], error)
@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 ¶
func (*ClientToken) Check ¶
func (a *ClientToken) Check(ctx context.Context, input ClientTokenCheckRequest) (*pangea.PangeaResponse[ClientTokenCheckResult], error)
@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 (f *FilterAgreementList) Active() *pangea.FilterEqual[bool]
func (*FilterAgreementList) CreatedAt ¶ added in v2.3.0
func (f *FilterAgreementList) CreatedAt() *pangea.FilterRange[string]
func (*FilterAgreementList) ID ¶ added in v2.3.0
func (f *FilterAgreementList) ID() *pangea.FilterMatch[string]
func (*FilterAgreementList) Name ¶ added in v2.3.0
func (f *FilterAgreementList) Name() *pangea.FilterMatch[string]
func (*FilterAgreementList) PublishedAt ¶ added in v2.3.0
func (f *FilterAgreementList) PublishedAt() *pangea.FilterRange[string]
func (*FilterAgreementList) Text ¶ added in v2.3.0
func (f *FilterAgreementList) Text() *pangea.FilterMatch[string]
func (*FilterAgreementList) Type ¶ added in v2.3.0
func (f *FilterAgreementList) Type() *pangea.FilterMatch[string]
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 (f *FilterSessionList) Email() *pangea.FilterMatch[string]
func (*FilterSessionList) Expire ¶ added in v2.3.0
func (f *FilterSessionList) Expire() *pangea.FilterRange[string]
func (*FilterSessionList) ID ¶ added in v2.3.0
func (f *FilterSessionList) ID() *pangea.FilterMatch[string]
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
func (f *FilterSessionList) Type() *pangea.FilterMatch[string]
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 (f *FilterUserInviteList) Callback() *pangea.FilterMatch[string]
func (*FilterUserInviteList) CreatedAt ¶ added in v2.3.0
func (f *FilterUserInviteList) CreatedAt() *pangea.FilterRange[string]
func (*FilterUserInviteList) Email ¶ added in v2.3.0
func (f *FilterUserInviteList) Email() *pangea.FilterMatch[string]
func (*FilterUserInviteList) Expire ¶ added in v2.3.0
func (f *FilterUserInviteList) Expire() *pangea.FilterRange[string]
func (*FilterUserInviteList) ID ¶ added in v2.3.0
func (f *FilterUserInviteList) ID() *pangea.FilterMatch[string]
func (*FilterUserInviteList) InviteOrg ¶ added in v2.3.0
func (f *FilterUserInviteList) InviteOrg() *pangea.FilterMatch[string]
func (*FilterUserInviteList) Inviter ¶ added in v2.3.0
func (f *FilterUserInviteList) Inviter() *pangea.FilterMatch[string]
func (*FilterUserInviteList) RequireMFA ¶ added in v2.3.0
func (f *FilterUserInviteList) RequireMFA() *pangea.FilterEqual[bool]
func (*FilterUserInviteList) Signup ¶ added in v2.3.0
func (f *FilterUserInviteList) Signup() *pangea.FilterEqual[bool]
func (*FilterUserInviteList) State ¶ added in v2.3.0
func (f *FilterUserInviteList) State() *pangea.FilterMatch[string]
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 (fu *FilterUserList) ID() *pangea.FilterMatch[string]
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 ¶
func (a *Flow) Complete(ctx context.Context, input FlowCompleteRequest) (*pangea.PangeaResponse[FlowCompleteResult], error)
@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 ¶
func (a *Flow) Start(ctx context.Context, input FlowStartRequest) (*pangea.PangeaResponse[FlowStartResult], error)
@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 ¶
func (*FlowEnrollMFA) Complete ¶
func (a *FlowEnrollMFA) Complete(ctx context.Context, input FlowEnrollMFACompleteRequest) (*pangea.PangeaResponse[FlowEnrollMFACompleteResult], error)
@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 ¶
func (a *FlowEnrollMFA) Start(ctx context.Context, input FlowEnrollMFAStartRequest) (*pangea.PangeaResponse[FlowEnrollMFAStartResult], error)
@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 ¶
func (*FlowReset) Password ¶
func (a *FlowReset) Password(ctx context.Context, input FlowResetPasswordRequest) (*pangea.PangeaResponse[FlowResetPasswordResult], error)
@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 ¶
func (*FlowSignup) Password ¶
func (a *FlowSignup) Password(ctx context.Context, input FlowSignupPasswordRequest) (*pangea.PangeaResponse[FlowSignupPasswordResult], error)
@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 ¶
func (a *FlowSignup) Social(ctx context.Context, input FlowSignupSocialRequest) (*pangea.PangeaResponse[FlowSignupSocialResult], error)
@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 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 FlowVerify ¶
type FlowVerify struct { *pangea.Client MFA *FlowVerifyMFA }
func (*FlowVerify) Captcha ¶
func (a *FlowVerify) Captcha(ctx context.Context, input FlowVerifyCaptchaRequest) (*pangea.PangeaResponse[FlowVerifyCaptchaResult], error)
@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 ¶
func (a *FlowVerify) Email(ctx context.Context, input FlowVerifyEmailRequest) (*pangea.PangeaResponse[FlowVerifyEmailResult], error)
@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 ¶
func (a *FlowVerify) Password(ctx context.Context, input FlowVerifyPasswordRequest) (*pangea.PangeaResponse[FlowVerifyPasswordResult], error)
@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 ¶
func (a *FlowVerify) Social(ctx context.Context, input FlowVerifySocialRequest) (*pangea.PangeaResponse[FlowVerifySocialResult], error)
@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 ¶
func (*FlowVerifyMFA) Complete ¶
func (a *FlowVerifyMFA) Complete(ctx context.Context, input FlowVerifyMFACompleteRequest) (*pangea.PangeaResponse[FlowVerifyMFACompleteResult], error)
@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 ¶
func (a *FlowVerifyMFA) Start(ctx context.Context, input FlowVerifyMFAStartRequest) (*pangea.PangeaResponse[FlowVerifyMFAStartResult], error)
@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 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 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 Session ¶
func (*Session) Invalidate ¶
func (a *Session) Invalidate(ctx context.Context, input SessionInvalidateRequest) (*pangea.PangeaResponse[SessionInvalidateResult], error)
@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 ¶
func (a *Session) List(ctx context.Context, input SessionListRequest) (*pangea.PangeaResponse[SessionListResult], error)
@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 ¶
func (a *Session) Logout(ctx context.Context, input SessionLogoutRequest) (*pangea.PangeaResponse[SessionLogoutResult], error)
@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 SignupData ¶
type SignupData struct { SocialSignup SocialSignupData `json:"social_signup"` PasswordSignup PasswordSignupData `json:"password_signup"` }
type SocialSignupData ¶
type TOTPSecretData ¶
type User ¶
type User struct { *pangea.Client Profile *UserProfile Invites *UserInvite MFA *UserMFA Login *UserLogin Password *UserPassword }
func (*User) Create ¶
func (a *User) Create(ctx context.Context, input UserCreateRequest) (*pangea.PangeaResponse[UserCreateResult], error)
@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 ¶
func (a *User) Delete(ctx context.Context, input UserDeleteRequest) (*pangea.PangeaResponse[UserDeleteResult], error)
@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 ¶
func (a *User) Invite(ctx context.Context, input UserInviteRequest) (*pangea.PangeaResponse[UserInviteResult], error)
@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 ¶
func (a *User) List(ctx context.Context, input UserListRequest) (*pangea.PangeaResponse[UserListResult], error)
@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 ¶
func (a *User) Update(ctx context.Context, input UserUpdateRequest) (*pangea.PangeaResponse[UserUpdateResult], error)
@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 ¶
func (a *User) Verify(ctx context.Context, input UserVerifyRequest) (*pangea.PangeaResponse[UserVerifyResult], error)
@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 ¶
func (*UserInvite) Delete ¶
func (a *UserInvite) Delete(ctx context.Context, input UserInviteDeleteRequest) (*pangea.PangeaResponse[UserInviteDeleteResult], error)
@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 ¶
func (a *UserInvite) List(ctx context.Context, input UserInviteListRequest) (*pangea.PangeaResponse[UserInviteListResult], error)
@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 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 UserLogin ¶
func (*UserLogin) Password ¶
func (a *UserLogin) Password(ctx context.Context, input UserLoginPasswordRequest) (*pangea.PangeaResponse[UserLoginResult], error)
@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 ¶
func (a *UserLogin) Social(ctx context.Context, input UserLoginSocialRequest) (*pangea.PangeaResponse[UserLoginResult], error)
@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 ¶
func (*UserMFA) Delete ¶
func (a *UserMFA) Delete(ctx context.Context, input UserMFADeleteRequest) (*pangea.PangeaResponse[UserMFADeleteResult], error)
@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 ¶
func (a *UserMFA) Enroll(ctx context.Context, input UserMFAEnrollRequest) (*pangea.PangeaResponse[UserMFAEnrollResult], error)
@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 ¶
func (a *UserMFA) Start(ctx context.Context, input UserMFAStartRequest) (*pangea.PangeaResponse[UserMFAStartResult], error)
@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 ¶
func (a *UserMFA) Verify(ctx context.Context, input UserMFAVerifyRequest) (*pangea.PangeaResponse[UserMFAVerifyResult], error)
@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 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 ¶
func (*UserPassword) Reset ¶
func (a *UserPassword) Reset(ctx context.Context, input UserPasswordResetRequest) (*pangea.PangeaResponse[UserPasswordResetResult], error)
@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 ¶
func (*UserProfile) Get ¶
func (a *UserProfile) Get(ctx context.Context, input UserProfileGetRequest) (*pangea.PangeaResponse[UserProfileGetResult], error)
@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 ¶
func (a *UserProfile) Update(ctx context.Context, input UserProfileUpdateRequest) (*pangea.PangeaResponse[UserProfileUpdateResult], error)
@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"`
}