diff --git a/build.savant b/build.savant index 2694492..3a0fed5 100644 --- a/build.savant +++ b/build.savant @@ -14,7 +14,7 @@ * language governing permissions and limitations under the License. */ -project(group: "io.fusionauth", name: "go-client", version: "1.53.0", licenses: ["ApacheV2_0"]) { +project(group: "io.fusionauth", name: "go-client", version: "1.53.2", licenses: ["ApacheV2_0"]) { workflow { fetch { cache() diff --git a/pkg/fusionauth/Domain.go b/pkg/fusionauth/Domain.go index 2be34ed..30ed81c 100644 --- a/pkg/fusionauth/Domain.go +++ b/pkg/fusionauth/Domain.go @@ -41,950 +41,927 @@ func (b *BaseHTTPResponse) SetStatus(status int) { type LinkedHashMap map[string]interface{} /** - * Webhook attempt log response. + * Authorization Grant types as defined by the The OAuth 2.0 Authorization + * Framework - RFC 6749. + *

+ * Specific names as defined by + * OAuth 2.0 Dynamic Client Registration Protocol - RFC 7591 Section 4.1 * - * @author Spencer Witt + * @author Daniel DeGroff */ -type WebhookAttemptLogResponse struct { - BaseHTTPResponse - WebhookAttemptLog WebhookAttemptLog `json:"webhookAttemptLog,omitempty"` -} +type GrantType string -func (b *WebhookAttemptLogResponse) SetStatus(status int) { - b.StatusCode = status +func (e GrantType) String() string { + return string(e) } +const ( + GrantType_AuthorizationCode GrantType = "authorization_code" + GrantType_Implicit GrantType = "implicit" + GrantType_Password GrantType = "password" + GrantType_ClientCredentials GrantType = "client_credentials" + GrantType_RefreshToken GrantType = "refresh_token" + GrantType_Unknown GrantType = "unknown" + GrantType_DeviceCode GrantType = "urn:ietf:params:oauth:grant-type:device_code" +) + /** - * @author Rob Davis + * Used to indicate what type of attestation was included in the authenticator response for a given WebAuthn credential at the time it was created + * + * @author Spencer Witt */ -type TenantLambdaConfiguration struct { - LoginValidationId string `json:"loginValidationId,omitempty"` - ScimEnterpriseUserRequestConverterId string `json:"scimEnterpriseUserRequestConverterId,omitempty"` - ScimEnterpriseUserResponseConverterId string `json:"scimEnterpriseUserResponseConverterId,omitempty"` - ScimGroupRequestConverterId string `json:"scimGroupRequestConverterId,omitempty"` - ScimGroupResponseConverterId string `json:"scimGroupResponseConverterId,omitempty"` - ScimUserRequestConverterId string `json:"scimUserRequestConverterId,omitempty"` - ScimUserResponseConverterId string `json:"scimUserResponseConverterId,omitempty"` -} +type AttestationType string -type SAMLv2AssertionEncryptionConfiguration struct { - Enableable - DigestAlgorithm string `json:"digestAlgorithm,omitempty"` - EncryptionAlgorithm string `json:"encryptionAlgorithm,omitempty"` - KeyLocation string `json:"keyLocation,omitempty"` - KeyTransportAlgorithm string `json:"keyTransportAlgorithm,omitempty"` - KeyTransportEncryptionKeyId string `json:"keyTransportEncryptionKeyId,omitempty"` - MaskGenerationFunction string `json:"maskGenerationFunction,omitempty"` +func (e AttestationType) String() string { + return string(e) } +const ( + AttestationType_Basic AttestationType = "basic" + AttestationType_Self AttestationType = "self" + AttestationType_AttestationCa AttestationType = "attestationCa" + AttestationType_AnonymizationCa AttestationType = "anonymizationCa" + AttestationType_None AttestationType = "none" +) + /** - * Models action reasons. + * Identity Provider response. * - * @author Brian Pontarelli + * @author Spencer Witt */ -type UserActionReason struct { - Code string `json:"code,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - LocalizedTexts map[string]string `json:"localizedTexts,omitempty"` - Text string `json:"text,omitempty"` +type IdentityProviderSearchResponse struct { + BaseHTTPResponse + IdentityProviders []BaseIdentityProvider `json:"identityProviders,omitempty"` + Total int64 `json:"total,omitempty"` } -type AuthenticationTokenConfiguration struct { - Enableable +func (b *IdentityProviderSearchResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Event to indicate an audit log was created. - * * @author Daniel DeGroff */ -type AuditLogCreateEvent struct { - BaseEvent - AuditLog AuditLog `json:"auditLog,omitempty"` +type BaseExportRequest struct { + DateTimeSecondsFormat string `json:"dateTimeSecondsFormat,omitempty"` + ZoneId string `json:"zoneId,omitempty"` } /** - * Models the FusionAuth connector. + * Models the User Created Registration Event. + *

+ * This is different than the user.registration.create event in that it will be sent after the user has been created. This event cannot be made + * transactional. * - * @author Trevor Smith + * @author Daniel DeGroff */ -type FusionAuthConnectorConfiguration struct { - BaseConnectorConfiguration +type UserRegistrationCreateCompleteEvent struct { + BaseUserEvent + ApplicationId string `json:"applicationId,omitempty"` + Registration UserRegistration `json:"registration,omitempty"` } /** + * The user action response object. + * * @author Brian Pontarelli */ -type AuditLogRequest struct { - BaseEventRequest - AuditLog AuditLog `json:"auditLog,omitempty"` +type ActionResponse struct { + BaseHTTPResponse + Action UserActionLog `json:"action,omitempty"` + Actions []UserActionLog `json:"actions,omitempty"` } -/** - * @author Brett Guy - */ -type IPAccessControlList struct { - Data map[string]interface{} `json:"data,omitempty"` - Entries []IPAccessControlEntry `json:"entries,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - Name string `json:"name,omitempty"` +func (b *ActionResponse) SetStatus(status int) { + b.StatusCode = status } /** - * @author Lyle Schemmerling + * @author Michael Sleevi */ -type SAMLv2DestinationAssertionConfiguration struct { - Alternates []string `json:"alternates,omitempty"` - Policy SAMLv2DestinationAssertionPolicy `json:"policy,omitempty"` +type SMSMessage struct { + PhoneNumber string `json:"phoneNumber,omitempty"` + TextMessage string `json:"textMessage,omitempty"` } /** - * Form response. - * * @author Daniel DeGroff */ -type FormRequest struct { - Form Form `json:"form,omitempty"` +type MessengerTransport struct { } /** - * @author Seth Musselman + * User registration information for a single application. + * + * @author Brian Pontarelli */ -type UserCommentRequest struct { - UserComment UserComment `json:"userComment,omitempty"` +type UserRegistration struct { + ApplicationId string `json:"applicationId,omitempty"` + AuthenticationToken string `json:"authenticationToken,omitempty"` + CleanSpeakId string `json:"cleanSpeakId,omitempty"` + Data map[string]interface{} `json:"data,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastLoginInstant int64 `json:"lastLoginInstant,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + PreferredLanguages []string `json:"preferredLanguages,omitempty"` + Roles []string `json:"roles,omitempty"` + Timezone string `json:"timezone,omitempty"` + Tokens map[string]string `json:"tokens,omitempty"` + Username string `json:"username,omitempty"` + UsernameStatus ContentStatus `json:"usernameStatus,omitempty"` + Verified bool `json:"verified"` + VerifiedInstant int64 `json:"verifiedInstant,omitempty"` } /** - * IdP Initiated login configuration + * Base class for requests that can contain event information. This event information is used when sending Webhooks or emails + * during the transaction. The caller is responsible for ensuring that the event information is correct. * - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type SAMLv2IdPInitiatedLoginConfiguration struct { - Enableable - NameIdFormat string `json:"nameIdFormat,omitempty"` +type BaseEventRequest struct { + EventInfo EventInfo `json:"eventInfo,omitempty"` } -type DeleteConfiguration struct { - Enableable - NumberOfDaysToRetain int `json:"numberOfDaysToRetain,omitempty"` +/** + * A webhook call attempt log. + * + * @author Spencer Witt + */ +type WebhookAttemptLog struct { + AttemptResult WebhookAttemptResult `json:"attemptResult,omitempty"` + Data map[string]interface{} `json:"data,omitempty"` + EndInstant int64 `json:"endInstant,omitempty"` + Id string `json:"id,omitempty"` + StartInstant int64 `json:"startInstant,omitempty"` + WebhookCallResponse WebhookCallResponse `json:"webhookCallResponse,omitempty"` + WebhookEventLogId string `json:"webhookEventLogId,omitempty"` + WebhookId string `json:"webhookId,omitempty"` } /** * @author Daniel DeGroff */ -type FormDataType string - -func (e FormDataType) String() string { - return string(e) +type JWTVendRequest struct { + Claims map[string]interface{} `json:"claims,omitempty"` + KeyId string `json:"keyId,omitempty"` + TimeToLiveInSeconds int `json:"timeToLiveInSeconds,omitempty"` } -const ( - FormDataType_Bool FormDataType = "bool" - FormDataType_Consent FormDataType = "consent" - FormDataType_Date FormDataType = "date" - FormDataType_Email FormDataType = "email" - FormDataType_Number FormDataType = "number" - FormDataType_String FormDataType = "string" -) - /** - * Key search response + * Event log used internally by FusionAuth to help developers debug hooks, Webhooks, email templates, etc. * - * @author Spencer Witt + * @author Brian Pontarelli */ -type KeySearchResponse struct { +type EventLog struct { + Id int64 `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + Message string `json:"message,omitempty"` + Type EventLogType `json:"type,omitempty"` +} + +/** + * @author Daniel DeGroff + */ +type LookupResponse struct { BaseHTTPResponse - Keys []Key `json:"keys,omitempty"` - Total int64 `json:"total,omitempty"` + IdentityProvider IdentityProviderDetails `json:"identityProvider,omitempty"` } -func (b *KeySearchResponse) SetStatus(status int) { +func (b *LookupResponse) SetStatus(status int) { b.StatusCode = status } +type IdentityProviderDetails struct { + ApplicationIds []string `json:"applicationIds,omitempty"` + Id string `json:"id,omitempty"` + IdpEndpoint string `json:"idpEndpoint,omitempty"` + Name string `json:"name,omitempty"` + Oauth2 IdentityProviderOauth2Configuration `json:"oauth2,omitempty"` + Type IdentityProviderType `json:"type,omitempty"` +} + /** - * A Application-level policy for deleting Users. + * Models the Group Member Update Event. * - * @author Trevor Smith + * @author Daniel DeGroff */ -type ApplicationRegistrationDeletePolicy struct { - Unverified TimeBasedDeletePolicy `json:"unverified,omitempty"` +type GroupMemberUpdateEvent struct { + BaseGroupEvent + Members []GroupMember `json:"members,omitempty"` } /** - * Models the User Delete Registration Event. + * Search request for webhooks * - * @author Daniel DeGroff + * @author Spencer Witt */ -type UserRegistrationDeleteEvent struct { - BaseUserEvent - ApplicationId string `json:"applicationId,omitempty"` - Registration UserRegistration `json:"registration,omitempty"` +type WebhookSearchRequest struct { + Search WebhookSearchCriteria `json:"search,omitempty"` } /** + * Change password response object. + * * @author Daniel DeGroff */ -type AccessToken struct { +type ChangePasswordResponse struct { BaseHTTPResponse - AccessToken string `json:"access_token,omitempty"` - ExpiresIn int `json:"expires_in,omitempty"` - IdToken string `json:"id_token,omitempty"` - RefreshToken string `json:"refresh_token,omitempty"` - RefreshTokenId string `json:"refresh_token_id,omitempty"` - Scope string `json:"scope,omitempty"` - TokenType TokenType `json:"token_type,omitempty"` - UserId string `json:"userId,omitempty"` + OneTimePassword string `json:"oneTimePassword,omitempty"` + State map[string]interface{} `json:"state,omitempty"` } -func (b *AccessToken) SetStatus(status int) { +func (b *ChangePasswordResponse) SetStatus(status int) { b.StatusCode = status } /** - * Search request for Group Members. - * - * @author Daniel DeGroff - */ -type GroupMemberSearchRequest struct { - Search GroupMemberSearchCriteria `json:"search,omitempty"` -} - -type MultiFactorSMSTemplate struct { - TemplateId string `json:"templateId,omitempty"` -} - -/** - * A log for an event that happened to a User. + * A server where events are sent. This includes user action events and any other events sent by FusionAuth. * * @author Brian Pontarelli */ -type UserComment struct { - Comment string `json:"comment,omitempty"` - CommenterId string `json:"commenterId,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - UserId string `json:"userId,omitempty"` +type Webhook struct { + ConnectTimeout int `json:"connectTimeout,omitempty"` + Data map[string]interface{} `json:"data,omitempty"` + Description string `json:"description,omitempty"` + EventsEnabled map[EventType]bool `json:"eventsEnabled,omitempty"` + Global bool `json:"global"` + Headers map[string]string `json:"headers,omitempty"` + HttpAuthenticationPassword string `json:"httpAuthenticationPassword,omitempty"` + HttpAuthenticationUsername string `json:"httpAuthenticationUsername,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + ReadTimeout int `json:"readTimeout,omitempty"` + SignatureConfiguration WebhookSignatureConfiguration `json:"signatureConfiguration,omitempty"` + SslCertificate string `json:"sslCertificate,omitempty"` + SslCertificateKeyId string `json:"sslCertificateKeyId,omitempty"` + TenantIds []string `json:"tenantIds,omitempty"` + Url string `json:"url,omitempty"` } /** - * Models the Group Create Complete Event. + * Available Integrations * * @author Daniel DeGroff */ -type GroupDeleteCompleteEvent struct { - BaseGroupEvent -} - -/** - * Email template search response - * - * @author Mark Manes - */ -type EmailTemplateSearchResponse struct { - BaseHTTPResponse - EmailTemplates []EmailTemplate `json:"emailTemplates,omitempty"` - Total int64 `json:"total,omitempty"` -} - -func (b *EmailTemplateSearchResponse) SetStatus(status int) { - b.StatusCode = status +type Integrations struct { + Cleanspeak CleanSpeakConfiguration `json:"cleanspeak,omitempty"` + Kafka KafkaConfiguration `json:"kafka,omitempty"` } /** - * A marker interface indicating this event is not scoped to a tenant and will be sent to all webhooks. + * Search criteria for the event log. * - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type InstanceEvent struct { - NonTransactionalEvent +type EventLogSearchCriteria struct { + BaseSearchCriteria + End int64 `json:"end,omitempty"` + Message string `json:"message,omitempty"` + Start int64 `json:"start,omitempty"` + Type EventLogType `json:"type,omitempty"` } /** - * Models the user action Event. - * * @author Brian Pontarelli */ -type UserActionEvent struct { - BaseEvent - Action string `json:"action,omitempty"` - ActioneeUserId string `json:"actioneeUserId,omitempty"` - ActionerUserId string `json:"actionerUserId,omitempty"` - ActionId string `json:"actionId,omitempty"` - ApplicationIds []string `json:"applicationIds,omitempty"` - Comment string `json:"comment,omitempty"` - Email Email `json:"email,omitempty"` - EmailedUser bool `json:"emailedUser"` - Expiry int64 `json:"expiry,omitempty"` - LocalizedAction string `json:"localizedAction,omitempty"` - LocalizedDuration string `json:"localizedDuration,omitempty"` - LocalizedOption string `json:"localizedOption,omitempty"` - LocalizedReason string `json:"localizedReason,omitempty"` - NotifyUser bool `json:"notifyUser"` - Option string `json:"option,omitempty"` - Phase UserActionPhase `json:"phase,omitempty"` - Reason string `json:"reason,omitempty"` - ReasonCode string `json:"reasonCode,omitempty"` +type EmailConfiguration struct { + AdditionalHeaders []EmailHeader `json:"additionalHeaders,omitempty"` + Debug bool `json:"debug"` + DefaultFromEmail string `json:"defaultFromEmail,omitempty"` + DefaultFromName string `json:"defaultFromName,omitempty"` + EmailUpdateEmailTemplateId string `json:"emailUpdateEmailTemplateId,omitempty"` + EmailVerifiedEmailTemplateId string `json:"emailVerifiedEmailTemplateId,omitempty"` + ForgotPasswordEmailTemplateId string `json:"forgotPasswordEmailTemplateId,omitempty"` + Host string `json:"host,omitempty"` + ImplicitEmailVerificationAllowed bool `json:"implicitEmailVerificationAllowed"` + LoginIdInUseOnCreateEmailTemplateId string `json:"loginIdInUseOnCreateEmailTemplateId,omitempty"` + LoginIdInUseOnUpdateEmailTemplateId string `json:"loginIdInUseOnUpdateEmailTemplateId,omitempty"` + LoginNewDeviceEmailTemplateId string `json:"loginNewDeviceEmailTemplateId,omitempty"` + LoginSuspiciousEmailTemplateId string `json:"loginSuspiciousEmailTemplateId,omitempty"` + Password string `json:"password,omitempty"` + PasswordlessEmailTemplateId string `json:"passwordlessEmailTemplateId,omitempty"` + PasswordResetSuccessEmailTemplateId string `json:"passwordResetSuccessEmailTemplateId,omitempty"` + PasswordUpdateEmailTemplateId string `json:"passwordUpdateEmailTemplateId,omitempty"` + Port int `json:"port,omitempty"` + Properties string `json:"properties,omitempty"` + Security EmailSecurityType `json:"security,omitempty"` + SetPasswordEmailTemplateId string `json:"setPasswordEmailTemplateId,omitempty"` + TwoFactorMethodAddEmailTemplateId string `json:"twoFactorMethodAddEmailTemplateId,omitempty"` + TwoFactorMethodRemoveEmailTemplateId string `json:"twoFactorMethodRemoveEmailTemplateId,omitempty"` + Unverified EmailUnverifiedOptions `json:"unverified,omitempty"` + Username string `json:"username,omitempty"` + VerificationEmailTemplateId string `json:"verificationEmailTemplateId,omitempty"` + VerificationStrategy VerificationStrategy `json:"verificationStrategy,omitempty"` + VerifyEmail bool `json:"verifyEmail"` + VerifyEmailWhenChanged bool `json:"verifyEmailWhenChanged"` } -/** - * @author Daniel DeGroff - */ -type BreachedPasswordStatus string +type EmailSecurityType string -func (e BreachedPasswordStatus) String() string { +func (e EmailSecurityType) String() string { return string(e) } const ( - BreachedPasswordStatus_None BreachedPasswordStatus = "None" - BreachedPasswordStatus_ExactMatch BreachedPasswordStatus = "ExactMatch" - BreachedPasswordStatus_SubAddressMatch BreachedPasswordStatus = "SubAddressMatch" - BreachedPasswordStatus_PasswordOnly BreachedPasswordStatus = "PasswordOnly" - BreachedPasswordStatus_CommonPassword BreachedPasswordStatus = "CommonPassword" + EmailSecurityType_NONE EmailSecurityType = "NONE" + EmailSecurityType_SSL EmailSecurityType = "SSL" + EmailSecurityType_TLS EmailSecurityType = "TLS" ) /** - * @author Michael Sleevi + * @author Brett Pontarelli */ -type SMSMessage struct { - PhoneNumber string `json:"phoneNumber,omitempty"` - TextMessage string `json:"textMessage,omitempty"` +type TwitchApplicationConfiguration struct { + BaseIdentityProviderApplicationConfiguration + ButtonText string `json:"buttonText,omitempty"` + ClientId string `json:"client_id,omitempty"` + ClientSecret string `json:"client_secret,omitempty"` + Scope string `json:"scope,omitempty"` } /** - * @author Daniel DeGroff + * @author Brett Pontarelli */ -type TwitterApplicationConfiguration struct { +type XboxApplicationConfiguration struct { BaseIdentityProviderApplicationConfiguration - ButtonText string `json:"buttonText,omitempty"` - ConsumerKey string `json:"consumerKey,omitempty"` - ConsumerSecret string `json:"consumerSecret,omitempty"` + ButtonText string `json:"buttonText,omitempty"` + ClientId string `json:"client_id,omitempty"` + ClientSecret string `json:"client_secret,omitempty"` + Scope string `json:"scope,omitempty"` } /** - * A User's WebAuthnCredential. Contains all data required to complete WebAuthn authentication ceremonies. + * Models a generic connector. * - * @author Spencer Witt + * @author Trevor Smith */ -type WebAuthnCredential struct { - Algorithm CoseAlgorithmIdentifier `json:"algorithm,omitempty"` - AttestationType AttestationType `json:"attestationType,omitempty"` - AuthenticatorSupportsUserVerification bool `json:"authenticatorSupportsUserVerification"` - CredentialId string `json:"credentialId,omitempty"` - Data map[string]interface{} `json:"data,omitempty"` - Discoverable bool `json:"discoverable"` - DisplayName string `json:"displayName,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastUseInstant int64 `json:"lastUseInstant,omitempty"` - Name string `json:"name,omitempty"` - PublicKey string `json:"publicKey,omitempty"` - RelyingPartyId string `json:"relyingPartyId,omitempty"` - SignCount int `json:"signCount,omitempty"` - TenantId string `json:"tenantId,omitempty"` - Transports []string `json:"transports,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - UserId string `json:"userId,omitempty"` -} - -type LambdaConfiguration struct { - AccessTokenPopulateId string `json:"accessTokenPopulateId,omitempty"` - IdTokenPopulateId string `json:"idTokenPopulateId,omitempty"` - Samlv2PopulateId string `json:"samlv2PopulateId,omitempty"` - SelfServiceRegistrationValidationId string `json:"selfServiceRegistrationValidationId,omitempty"` - UserinfoPopulateId string `json:"userinfoPopulateId,omitempty"` +type GenericConnectorConfiguration struct { + BaseConnectorConfiguration + AuthenticationURL string `json:"authenticationURL,omitempty"` + ConnectTimeout int `json:"connectTimeout,omitempty"` + Headers map[string]string `json:"headers,omitempty"` + HttpAuthenticationPassword string `json:"httpAuthenticationPassword,omitempty"` + HttpAuthenticationUsername string `json:"httpAuthenticationUsername,omitempty"` + ReadTimeout int `json:"readTimeout,omitempty"` + SslCertificateKeyId string `json:"sslCertificateKeyId,omitempty"` } /** + * An Event "event" to indicate an event log was created. + * * @author Daniel DeGroff */ -type RegistrationUnverifiedOptions struct { - Behavior UnverifiedBehavior `json:"behavior,omitempty"` +type EventLogCreateEvent struct { + BaseEvent + EventLog EventLog `json:"eventLog,omitempty"` } /** - * Models a consent. - * - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type ConsentStatus string - -func (e ConsentStatus) String() string { - return string(e) +type SystemConfiguration struct { + AuditLogConfiguration AuditLogConfiguration `json:"auditLogConfiguration,omitempty"` + CorsConfiguration CORSConfiguration `json:"corsConfiguration,omitempty"` + Data map[string]interface{} `json:"data,omitempty"` + EventLogConfiguration EventLogConfiguration `json:"eventLogConfiguration,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + LoginRecordConfiguration LoginRecordConfiguration `json:"loginRecordConfiguration,omitempty"` + ReportTimezone string `json:"reportTimezone,omitempty"` + TrustedProxyConfiguration SystemTrustedProxyConfiguration `json:"trustedProxyConfiguration,omitempty"` + UiConfiguration UIConfiguration `json:"uiConfiguration,omitempty"` + WebhookEventLogConfiguration WebhookEventLogConfiguration `json:"webhookEventLogConfiguration,omitempty"` } -const ( - ConsentStatus_Active ConsentStatus = "Active" - ConsentStatus_Revoked ConsentStatus = "Revoked" -) +type AuditLogConfiguration struct { + Delete DeleteConfiguration `json:"delete,omitempty"` +} -/** - * Contains the output for the {@code credProps} extension - * - * @author Spencer Witt - */ -type CredentialPropertiesOutput struct { - Rk bool `json:"rk"` +type DeleteConfiguration struct { + Enableable + NumberOfDaysToRetain int `json:"numberOfDaysToRetain,omitempty"` } -/** - * @author Daniel DeGroff - */ -type VerifyRegistrationRequest struct { - BaseEventRequest - OneTimeCode string `json:"oneTimeCode,omitempty"` - VerificationId string `json:"verificationId,omitempty"` +type EventLogConfiguration struct { + NumberToRetain int `json:"numberToRetain,omitempty"` } -/** - * Stores an email template used to send emails to users. - * - * @author Brian Pontarelli - */ -type EmailTemplate struct { - DefaultFromName string `json:"defaultFromName,omitempty"` - DefaultHtmlTemplate string `json:"defaultHtmlTemplate,omitempty"` - DefaultSubject string `json:"defaultSubject,omitempty"` - DefaultTextTemplate string `json:"defaultTextTemplate,omitempty"` - FromEmail string `json:"fromEmail,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - LocalizedFromNames map[string]string `json:"localizedFromNames,omitempty"` - LocalizedHtmlTemplates map[string]string `json:"localizedHtmlTemplates,omitempty"` - LocalizedSubjects map[string]string `json:"localizedSubjects,omitempty"` - LocalizedTextTemplates map[string]string `json:"localizedTextTemplates,omitempty"` - Name string `json:"name,omitempty"` +type LoginRecordConfiguration struct { + Delete DeleteConfiguration `json:"delete,omitempty"` } -/** - * Models the User Email Verify Event. - * - * @author Trevor Smith - */ -type UserEmailVerifiedEvent struct { - BaseUserEvent +type UIConfiguration struct { + HeaderColor string `json:"headerColor,omitempty"` + LogoURL string `json:"logoURL,omitempty"` + MenuFontColor string `json:"menuFontColor,omitempty"` } /** * @author Daniel DeGroff */ -type ApplicationAccessControlConfiguration struct { - UiIPAccessControlListId string `json:"uiIPAccessControlListId,omitempty"` +type TenantUsernameConfiguration struct { + Unique UniqueUsernameConfiguration `json:"unique,omitempty"` +} + +type UniqueUsernameStrategy string + +func (e UniqueUsernameStrategy) String() string { + return string(e) +} + +const ( + UniqueUsernameStrategy_Always UniqueUsernameStrategy = "Always" + UniqueUsernameStrategy_OnCollision UniqueUsernameStrategy = "OnCollision" +) + +type UniqueUsernameConfiguration struct { + Enableable + NumberOfDigits int `json:"numberOfDigits,omitempty"` + Separator string `json:"separator,omitempty"` + Strategy UniqueUsernameStrategy `json:"strategy,omitempty"` } /** - * Form response. + * Consent search response * - * @author Daniel DeGroff + * @author Spencer Witt */ -type FormResponse struct { +type ConsentSearchResponse struct { BaseHTTPResponse - Form Form `json:"form,omitempty"` - Forms []Form `json:"forms,omitempty"` + Consents []Consent `json:"consents,omitempty"` + Total int64 `json:"total,omitempty"` } -func (b *FormResponse) SetStatus(status int) { +func (b *ConsentSearchResponse) SetStatus(status int) { b.StatusCode = status } /** + *

+ * * @author Daniel DeGroff */ -type ApplicationMultiFactorTrustPolicy string +type TokenType string -func (e ApplicationMultiFactorTrustPolicy) String() string { +func (e TokenType) String() string { return string(e) } const ( - ApplicationMultiFactorTrustPolicy_Any ApplicationMultiFactorTrustPolicy = "Any" - ApplicationMultiFactorTrustPolicy_This ApplicationMultiFactorTrustPolicy = "This" - ApplicationMultiFactorTrustPolicy_None ApplicationMultiFactorTrustPolicy = "None" + TokenType_Bearer TokenType = "Bearer" + TokenType_MAC TokenType = "MAC" ) /** - * A JSON Web Key as defined by RFC 7517 JSON Web Key (JWK) - * Section 4 and RFC 7518 JSON Web Algorithms (JWA). + * A grant for an entity to a user or another entity. * - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type JSONWebKey struct { - Alg Algorithm `json:"alg,omitempty"` - Crv string `json:"crv,omitempty"` - D string `json:"d,omitempty"` - Dp string `json:"dp,omitempty"` - Dq string `json:"dq,omitempty"` - E string `json:"e,omitempty"` - Kid string `json:"kid,omitempty"` - Kty KeyType `json:"kty,omitempty"` - N string `json:"n,omitempty"` - Other map[string]interface{} `json:"other,omitempty"` - P string `json:"p,omitempty"` - Q string `json:"q,omitempty"` - Qi string `json:"qi,omitempty"` - Use string `json:"use,omitempty"` - X string `json:"x,omitempty"` - X5c []string `json:"x5c,omitempty"` - X5t string `json:"x5t,omitempty"` - X5t_S256 string `json:"x5t#S256,omitempty"` - Y string `json:"y,omitempty"` +type EntityGrant struct { + Data map[string]interface{} `json:"data,omitempty"` + Entity Entity `json:"entity,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + Permissions []string `json:"permissions,omitempty"` + RecipientEntityId string `json:"recipientEntityId,omitempty"` + UserId string `json:"userId,omitempty"` } /** - * Search request for Consents + * Search criteria for user comments. * * @author Spencer Witt */ -type ConsentSearchRequest struct { - Search ConsentSearchCriteria `json:"search,omitempty"` +type UserCommentSearchCriteria struct { + BaseSearchCriteria + Comment string `json:"comment,omitempty"` + CommenterId string `json:"commenterId,omitempty"` + TenantId string `json:"tenantId,omitempty"` + UserId string `json:"userId,omitempty"` } /** - * Models the User Reactivate Event. + * Models the User Email Verify Event. * - * @author Brian Pontarelli + * @author Trevor Smith */ -type UserReactivateEvent struct { +type UserEmailVerifiedEvent struct { BaseUserEvent } /** - * OpenID Connect Configuration as described by the OpenID - * Provider Metadata. + * @author Derek Klatt + */ +type PasswordValidationRules struct { + BreachDetection PasswordBreachDetection `json:"breachDetection,omitempty"` + MaxLength int `json:"maxLength,omitempty"` + MinLength int `json:"minLength,omitempty"` + RememberPreviousPasswords RememberPreviousPasswords `json:"rememberPreviousPasswords,omitempty"` + RequireMixedCase bool `json:"requireMixedCase"` + RequireNonAlpha bool `json:"requireNonAlpha"` + RequireNumber bool `json:"requireNumber"` + ValidateOnLogin bool `json:"validateOnLogin"` +} + +/** + * API response for User consent. * * @author Daniel DeGroff */ -type OpenIdConfiguration struct { +type UserConsentResponse struct { BaseHTTPResponse - AuthorizationEndpoint string `json:"authorization_endpoint,omitempty"` - BackchannelLogoutSupported bool `json:"backchannel_logout_supported"` - ClaimsSupported []string `json:"claims_supported,omitempty"` - DeviceAuthorizationEndpoint string `json:"device_authorization_endpoint,omitempty"` - EndSessionEndpoint string `json:"end_session_endpoint,omitempty"` - FrontchannelLogoutSupported bool `json:"frontchannel_logout_supported"` - GrantTypesSupported []string `json:"grant_types_supported,omitempty"` - IdTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported,omitempty"` - Issuer string `json:"issuer,omitempty"` - JwksUri string `json:"jwks_uri,omitempty"` - ResponseModesSupported []string `json:"response_modes_supported,omitempty"` - ResponseTypesSupported []string `json:"response_types_supported,omitempty"` - ScopesSupported []string `json:"scopes_supported,omitempty"` - SubjectTypesSupported []string `json:"subject_types_supported,omitempty"` - TokenEndpoint string `json:"token_endpoint,omitempty"` - TokenEndpointAuthMethodsSupported []string `json:"token_endpoint_auth_methods_supported,omitempty"` - UserinfoEndpoint string `json:"userinfo_endpoint,omitempty"` - UserinfoSigningAlgValuesSupported []string `json:"userinfo_signing_alg_values_supported,omitempty"` + UserConsent UserConsent `json:"userConsent,omitempty"` + UserConsents []UserConsent `json:"userConsents,omitempty"` } -func (b *OpenIdConfiguration) SetStatus(status int) { +func (b *UserConsentResponse) SetStatus(status int) { b.StatusCode = status } /** - * This class is the user query. It provides a build pattern as well as public fields for use on forms and in actions. - * * @author Brian Pontarelli */ -type UserSearchCriteria struct { - BaseElasticSearchCriteria +type PreviewRequest struct { + EmailTemplate EmailTemplate `json:"emailTemplate,omitempty"` + Locale string `json:"locale,omitempty"` } /** - * @author Daniel DeGroff + * @author Mikey Sleevi */ -type UserState string +type TenantMultiFactorConfiguration struct { + Authenticator MultiFactorAuthenticatorMethod `json:"authenticator,omitempty"` + Email MultiFactorEmailMethod `json:"email,omitempty"` + LoginPolicy MultiFactorLoginPolicy `json:"loginPolicy,omitempty"` + Sms MultiFactorSMSMethod `json:"sms,omitempty"` +} -func (e UserState) String() string { - return string(e) +type MultiFactorAuthenticatorMethod struct { + Enableable + Algorithm TOTPAlgorithm `json:"algorithm,omitempty"` + CodeLength int `json:"codeLength,omitempty"` + TimeStep int `json:"timeStep,omitempty"` } -const ( - UserState_Authenticated UserState = "Authenticated" - UserState_AuthenticatedNotRegistered UserState = "AuthenticatedNotRegistered" - UserState_AuthenticatedNotVerified UserState = "AuthenticatedNotVerified" - UserState_AuthenticatedRegistrationNotVerified UserState = "AuthenticatedRegistrationNotVerified" -) +type MultiFactorEmailMethod struct { + Enableable + TemplateId string `json:"templateId,omitempty"` +} -/** - * Models a JWT Refresh Token. - * - * @author Daniel DeGroff - */ -type RefreshToken struct { - ApplicationId string `json:"applicationId,omitempty"` - Data map[string]interface{} `json:"data,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - MetaData MetaData `json:"metaData,omitempty"` - StartInstant int64 `json:"startInstant,omitempty"` - TenantId string `json:"tenantId,omitempty"` - Token string `json:"token,omitempty"` - UserId string `json:"userId,omitempty"` +type MultiFactorSMSMethod struct { + Enableable + MessengerId string `json:"messengerId,omitempty"` + TemplateId string `json:"templateId,omitempty"` } /** - * Search criteria for entity grants. + * Entity grant API response object. * * @author Brian Pontarelli */ -type EntityGrantSearchCriteria struct { - BaseSearchCriteria - EntityId string `json:"entityId,omitempty"` - Name string `json:"name,omitempty"` - UserId string `json:"userId,omitempty"` +type EntityGrantResponse struct { + BaseHTTPResponse + Grant EntityGrant `json:"grant,omitempty"` + Grants []EntityGrant `json:"grants,omitempty"` +} + +func (b *EntityGrantResponse) SetStatus(status int) { + b.StatusCode = status } /** - * This class is an abstraction of a simple email message. + * API request to start a WebAuthn authentication ceremony * - * @author Brian Pontarelli + * @author Spencer Witt */ -type Email struct { - Attachments []Attachment `json:"attachments,omitempty"` - Bcc []EmailAddress `json:"bcc,omitempty"` - Cc []EmailAddress `json:"cc,omitempty"` - From EmailAddress `json:"from,omitempty"` - Html string `json:"html,omitempty"` - ReplyTo EmailAddress `json:"replyTo,omitempty"` - Subject string `json:"subject,omitempty"` - Text string `json:"text,omitempty"` - To []EmailAddress `json:"to,omitempty"` +type WebAuthnStartRequest struct { + ApplicationId string `json:"applicationId,omitempty"` + CredentialId string `json:"credentialId,omitempty"` + LoginId string `json:"loginId,omitempty"` + State map[string]interface{} `json:"state,omitempty"` + UserId string `json:"userId,omitempty"` + Workflow WebAuthnWorkflow `json:"workflow,omitempty"` } /** - * An audit log. + * API response for consent. * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type AuditLog struct { +type ConsentResponse struct { + BaseHTTPResponse + Consent Consent `json:"consent,omitempty"` + Consents []Consent `json:"consents,omitempty"` +} + +func (b *ConsentResponse) SetStatus(status int) { + b.StatusCode = status +} + +/** + * A User's membership into a Group + * + * @author Daniel DeGroff + */ +type GroupMember struct { Data map[string]interface{} `json:"data,omitempty"` - Id int64 `json:"id,omitempty"` + GroupId string `json:"groupId,omitempty"` + Id string `json:"id,omitempty"` InsertInstant int64 `json:"insertInstant,omitempty"` - InsertUser string `json:"insertUser,omitempty"` - Message string `json:"message,omitempty"` - NewValue interface{} `json:"newValue,omitempty"` - OldValue interface{} `json:"oldValue,omitempty"` - Reason string `json:"reason,omitempty"` + User User `json:"user,omitempty"` + UserId string `json:"userId,omitempty"` } /** - * Models the User Identity Provider Link Event. + * Models an entity that a user can be granted permissions to. Or an entity that can be granted permissions to another entity. + * + * @author Brian Pontarelli + */ +type Entity struct { + ClientId string `json:"clientId,omitempty"` + ClientSecret string `json:"clientSecret,omitempty"` + Data map[string]interface{} `json:"data,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + Name string `json:"name,omitempty"` + ParentId string `json:"parentId,omitempty"` + TenantId string `json:"tenantId,omitempty"` + Type EntityType `json:"type,omitempty"` +} + +/** + * @author Daniel DeGroff + */ +type ReactorResponse struct { + BaseHTTPResponse + Status ReactorStatus `json:"status,omitempty"` +} + +func (b *ReactorResponse) SetStatus(status int) { + b.StatusCode = status +} + +/** + * Models the User Identity Provider Unlink Event. * * @author Rob Davis */ -type UserIdentityProviderLinkEvent struct { +type UserIdentityProviderUnlinkEvent struct { BaseUserEvent IdentityProviderLink IdentityProviderLink `json:"identityProviderLink,omitempty"` } /** - * Application search response + * Login API request object. + * + * @author Seth Musselman + */ +type LoginRequest struct { + BaseLoginRequest + LoginId string `json:"loginId,omitempty"` + OneTimePassword string `json:"oneTimePassword,omitempty"` + Password string `json:"password,omitempty"` + TwoFactorTrustId string `json:"twoFactorTrustId,omitempty"` +} + +/** + * WebAuthn Credential API response * * @author Spencer Witt */ -type ApplicationSearchResponse struct { +type WebAuthnCredentialResponse struct { BaseHTTPResponse - ExpandableResponse - Applications []Application `json:"applications,omitempty"` - Total int64 `json:"total,omitempty"` + Credential WebAuthnCredential `json:"credential,omitempty"` + Credentials []WebAuthnCredential `json:"credentials,omitempty"` } -func (b *ApplicationSearchResponse) SetStatus(status int) { +func (b *WebAuthnCredentialResponse) SetStatus(status int) { b.StatusCode = status } /** - * @author Daniel DeGroff + * Contains the output for the {@code credProps} extension + * + * @author Spencer Witt */ -type OAuthConfigurationResponse struct { - BaseHTTPResponse - HttpSessionMaxInactiveInterval int `json:"httpSessionMaxInactiveInterval,omitempty"` - LogoutURL string `json:"logoutURL,omitempty"` - OauthConfiguration OAuth2Configuration `json:"oauthConfiguration,omitempty"` +type CredentialPropertiesOutput struct { + Rk bool `json:"rk"` } -func (b *OAuthConfigurationResponse) SetStatus(status int) { - b.StatusCode = status +/** + * IdP Initiated login configuration + * + * @author Daniel DeGroff + */ +type SAMLv2IdPInitiatedLoginConfiguration struct { + Enableable + NameIdFormat string `json:"nameIdFormat,omitempty"` } /** - * Contains attributes for the Relying Party to refer to an existing public key credential as an input parameter. + * Entity Type API response object. * - * @author Spencer Witt + * @author Brian Pontarelli */ -type PublicKeyCredentialDescriptor struct { - Id string `json:"id,omitempty"` - Transports []string `json:"transports,omitempty"` - Type PublicKeyCredentialType `json:"type,omitempty"` +type EntityTypeResponse struct { + BaseHTTPResponse + EntityType EntityType `json:"entityType,omitempty"` + EntityTypes []EntityType `json:"entityTypes,omitempty"` + Permission EntityTypePermission `json:"permission,omitempty"` +} + +func (b *EntityTypeResponse) SetStatus(status int) { + b.StatusCode = status } /** + * User API response object. + * * @author Brian Pontarelli */ -type PendingResponse struct { +type UserResponse struct { BaseHTTPResponse - Users []User `json:"users,omitempty"` + EmailVerificationId string `json:"emailVerificationId,omitempty"` + EmailVerificationOneTimeCode string `json:"emailVerificationOneTimeCode,omitempty"` + RegistrationVerificationIds map[string]string `json:"registrationVerificationIds,omitempty"` + RegistrationVerificationOneTimeCodes map[string]string `json:"registrationVerificationOneTimeCodes,omitempty"` + Token string `json:"token,omitempty"` + TokenExpirationInstant int64 `json:"tokenExpirationInstant,omitempty"` + User User `json:"user,omitempty"` } -func (b *PendingResponse) SetStatus(status int) { +func (b *UserResponse) SetStatus(status int) { b.StatusCode = status } /** - * Steam gaming login provider. + * Status for content like usernames, profile attributes, etc. * - * @author Brett Pontarelli + * @author Brian Pontarelli */ -type SteamIdentityProvider struct { - BaseIdentityProvider - ApiMode SteamAPIMode `json:"apiMode,omitempty"` - ButtonText string `json:"buttonText,omitempty"` - ClientId string `json:"client_id,omitempty"` - Scope string `json:"scope,omitempty"` - WebAPIKey string `json:"webAPIKey,omitempty"` +type ContentStatus string + +func (e ContentStatus) String() string { + return string(e) } +const ( + ContentStatus_ACTIVE ContentStatus = "ACTIVE" + ContentStatus_PENDING ContentStatus = "PENDING" + ContentStatus_REJECTED ContentStatus = "REJECTED" +) + /** - * Allows the Relying Party to specify desired attributes of a new credential. + * Search request for Keys * * @author Spencer Witt */ -type PublicKeyCredentialCreationOptions struct { - Attestation AttestationConveyancePreference `json:"attestation,omitempty"` - AuthenticatorSelection AuthenticatorSelectionCriteria `json:"authenticatorSelection,omitempty"` - Challenge string `json:"challenge,omitempty"` - ExcludeCredentials []PublicKeyCredentialDescriptor `json:"excludeCredentials,omitempty"` - Extensions WebAuthnRegistrationExtensionOptions `json:"extensions,omitempty"` - PubKeyCredParams []PublicKeyCredentialParameters `json:"pubKeyCredParams,omitempty"` - Rp PublicKeyCredentialRelyingPartyEntity `json:"rp,omitempty"` - Timeout int64 `json:"timeout,omitempty"` - User PublicKeyCredentialUserEntity `json:"user,omitempty"` +type KeySearchRequest struct { + Search KeySearchCriteria `json:"search,omitempty"` } /** - * Authorization Grant types as defined by the The OAuth 2.0 Authorization - * Framework - RFC 6749. - *

- * Specific names as defined by - * OAuth 2.0 Dynamic Client Registration Protocol - RFC 7591 Section 4.1 - * - * @author Daniel DeGroff + * @author Matthew Altman */ -type GrantType string +type LogoutBehavior string -func (e GrantType) String() string { +func (e LogoutBehavior) String() string { return string(e) } const ( - GrantType_AuthorizationCode GrantType = "authorization_code" - GrantType_Implicit GrantType = "implicit" - GrantType_Password GrantType = "password" - GrantType_ClientCredentials GrantType = "client_credentials" - GrantType_RefreshToken GrantType = "refresh_token" - GrantType_Unknown GrantType = "unknown" - GrantType_DeviceCode GrantType = "urn:ietf:params:oauth:grant-type:device_code" + LogoutBehavior_RedirectOnly LogoutBehavior = "RedirectOnly" + LogoutBehavior_AllApplications LogoutBehavior = "AllApplications" ) /** - * A User's membership into a Group - * - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type GroupMember struct { - Data map[string]interface{} `json:"data,omitempty"` - GroupId string `json:"groupId,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - User User `json:"user,omitempty"` - UserId string `json:"userId,omitempty"` +type Tenantable struct { } /** - * Models the User Update Event. + * Models the User Bulk Create Event. * * @author Brian Pontarelli */ -type UserUpdateEvent struct { - BaseUserEvent - Original User `json:"original,omitempty"` +type UserBulkCreateEvent struct { + BaseEvent + Users []User `json:"users,omitempty"` } /** - * The application's relationship to the authorization server. First-party applications will be granted implicit permission for requested scopes. - * Third-party applications will use the {@link OAuthScopeConsentMode} policy. + * Models a single family member. * - * @author Spencer Witt + * @author Brian Pontarelli */ -type OAuthApplicationRelationship string +type FamilyMember struct { + Data map[string]interface{} `json:"data,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + Owner bool `json:"owner"` + Role FamilyRole `json:"role,omitempty"` + UserId string `json:"userId,omitempty"` +} -func (e OAuthApplicationRelationship) String() string { +type FamilyRole string + +func (e FamilyRole) String() string { return string(e) } const ( - OAuthApplicationRelationship_FirstParty OAuthApplicationRelationship = "FirstParty" - OAuthApplicationRelationship_ThirdParty OAuthApplicationRelationship = "ThirdParty" + FamilyRole_Child FamilyRole = "Child" + FamilyRole_Teen FamilyRole = "Teen" + FamilyRole_Adult FamilyRole = "Adult" ) /** - * The summary of the action that is preventing login to be returned on the login response. - * - * @author Daniel DeGroff - */ -type LoginPreventedResponse struct { - BaseHTTPResponse - ActionerUserId string `json:"actionerUserId,omitempty"` - ActionId string `json:"actionId,omitempty"` - Expiry int64 `json:"expiry,omitempty"` - LocalizedName string `json:"localizedName,omitempty"` - LocalizedOption string `json:"localizedOption,omitempty"` - LocalizedReason string `json:"localizedReason,omitempty"` - Name string `json:"name,omitempty"` - Option string `json:"option,omitempty"` - Reason string `json:"reason,omitempty"` - ReasonCode string `json:"reasonCode,omitempty"` -} - -func (b *LoginPreventedResponse) SetStatus(status int) { - b.StatusCode = status -} - -/** - * This class is the entity query. It provides a build pattern as well as public fields for use on forms and in actions. + * An email address. * * @author Brian Pontarelli */ -type EntitySearchCriteria struct { - BaseElasticSearchCriteria -} - -/** - * Theme API request object. - * - * @author Trevor Smith - */ -type ThemeRequest struct { - SourceThemeId string `json:"sourceThemeId,omitempty"` - Theme Theme `json:"theme,omitempty"` +type EmailAddress struct { + Address string `json:"address,omitempty"` + Display string `json:"display,omitempty"` } /** * @author Daniel DeGroff */ -type PasswordlessSendRequest struct { - ApplicationId string `json:"applicationId,omitempty"` - Code string `json:"code,omitempty"` - LoginId string `json:"loginId,omitempty"` - State map[string]interface{} `json:"state,omitempty"` +type ExternalJWTApplicationConfiguration struct { + BaseIdentityProviderApplicationConfiguration } /** - * Models the User Login event for a new device (un-recognized) + * Search request for Tenants * - * @author Daniel DeGroff + * @author Mark Manes */ -type UserLoginNewDeviceEvent struct { - UserLoginSuccessEvent +type TenantSearchRequest struct { + Search TenantSearchCriteria `json:"search,omitempty"` } /** - * Key API response object. - * * @author Daniel DeGroff */ -type KeyResponse struct { - BaseHTTPResponse - Key Key `json:"key,omitempty"` - Keys []Key `json:"keys,omitempty"` -} - -func (b *KeyResponse) SetStatus(status int) { - b.StatusCode = status -} - -/** - * @author Brett Guy - */ -type TwoFactorStartRequest struct { - ApplicationId string `json:"applicationId,omitempty"` - Code string `json:"code,omitempty"` - LoginId string `json:"loginId,omitempty"` - State map[string]interface{} `json:"state,omitempty"` - TrustChallenge string `json:"trustChallenge,omitempty"` - UserId string `json:"userId,omitempty"` +type FacebookApplicationConfiguration struct { + BaseIdentityProviderApplicationConfiguration + AppId string `json:"appId,omitempty"` + ButtonText string `json:"buttonText,omitempty"` + ClientSecret string `json:"client_secret,omitempty"` + Fields string `json:"fields,omitempty"` + LoginMethod IdentityProviderLoginMethod `json:"loginMethod,omitempty"` + Permissions string `json:"permissions,omitempty"` } /** - * Models the Group Create Event. + * Models the user action Event. * - * @author Daniel DeGroff - */ -type GroupCreateEvent struct { - BaseGroupEvent -} - -/** - * @author Trevor Smith - */ -type ConnectorPolicy struct { - ConnectorId string `json:"connectorId,omitempty"` - Data map[string]interface{} `json:"data,omitempty"` - Domains []string `json:"domains,omitempty"` - Migrate bool `json:"migrate"` -} - -/** - * @author Daniel DeGroff - */ -type FormField struct { - Confirm bool `json:"confirm"` - ConsentId string `json:"consentId,omitempty"` - Control FormControl `json:"control,omitempty"` - Data map[string]interface{} `json:"data,omitempty"` - Description string `json:"description,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - Key string `json:"key,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - Name string `json:"name,omitempty"` - Options []string `json:"options,omitempty"` - Required bool `json:"required"` - Type FormDataType `json:"type,omitempty"` - Validator FormFieldValidator `json:"validator,omitempty"` -} - -/** * @author Brian Pontarelli */ -type FamilyConfiguration struct { - Enableable - AllowChildRegistrations bool `json:"allowChildRegistrations"` - ConfirmChildEmailTemplateId string `json:"confirmChildEmailTemplateId,omitempty"` - DeleteOrphanedAccounts bool `json:"deleteOrphanedAccounts"` - DeleteOrphanedAccountsDays int `json:"deleteOrphanedAccountsDays,omitempty"` - FamilyRequestEmailTemplateId string `json:"familyRequestEmailTemplateId,omitempty"` - MaximumChildAge int `json:"maximumChildAge,omitempty"` - MinimumOwnerAge int `json:"minimumOwnerAge,omitempty"` - ParentEmailRequired bool `json:"parentEmailRequired"` - ParentRegistrationEmailTemplateId string `json:"parentRegistrationEmailTemplateId,omitempty"` +type UserActionEvent struct { + BaseEvent + Action string `json:"action,omitempty"` + ActioneeUserId string `json:"actioneeUserId,omitempty"` + ActionerUserId string `json:"actionerUserId,omitempty"` + ActionId string `json:"actionId,omitempty"` + ApplicationIds []string `json:"applicationIds,omitempty"` + Comment string `json:"comment,omitempty"` + Email Email `json:"email,omitempty"` + EmailedUser bool `json:"emailedUser"` + Expiry int64 `json:"expiry,omitempty"` + LocalizedAction string `json:"localizedAction,omitempty"` + LocalizedDuration string `json:"localizedDuration,omitempty"` + LocalizedOption string `json:"localizedOption,omitempty"` + LocalizedReason string `json:"localizedReason,omitempty"` + NotifyUser bool `json:"notifyUser"` + Option string `json:"option,omitempty"` + Phase UserActionPhase `json:"phase,omitempty"` + Reason string `json:"reason,omitempty"` + ReasonCode string `json:"reasonCode,omitempty"` } /** - * @author Brett Pontarelli + * Models the User Create Registration Event. + * + * @author Daniel DeGroff */ -type TwitchApplicationConfiguration struct { - BaseIdentityProviderApplicationConfiguration - ButtonText string `json:"buttonText,omitempty"` - ClientId string `json:"client_id,omitempty"` - ClientSecret string `json:"client_secret,omitempty"` - Scope string `json:"scope,omitempty"` +type UserRegistrationCreateEvent struct { + BaseUserEvent + ApplicationId string `json:"applicationId,omitempty"` + Registration UserRegistration `json:"registration,omitempty"` } /** @@ -999,53 +976,62 @@ type DisplayableRawLogin struct { LoginId string `json:"loginId,omitempty"` } -type SAMLv2SingleLogout struct { - Enableable - KeyId string `json:"keyId,omitempty"` - Url string `json:"url,omitempty"` - XmlSignatureC14nMethod CanonicalizationMethod `json:"xmlSignatureC14nMethod,omitempty"` -} - /** - * @author Daniel DeGroff + * A number identifying a cryptographic algorithm. Values should be registered with the IANA COSE Algorithms registry + * + * @author Spencer Witt */ -type OpenIdConnectApplicationConfiguration struct { - BaseIdentityProviderApplicationConfiguration - ButtonImageURL string `json:"buttonImageURL,omitempty"` - ButtonText string `json:"buttonText,omitempty"` - Oauth2 IdentityProviderOauth2Configuration `json:"oauth2,omitempty"` +type CoseAlgorithmIdentifier string + +func (e CoseAlgorithmIdentifier) String() string { + return string(e) } +const ( + CoseAlgorithmIdentifier_ES256 CoseAlgorithmIdentifier = "ES256" + CoseAlgorithmIdentifier_ES384 CoseAlgorithmIdentifier = "ES384" + CoseAlgorithmIdentifier_ES512 CoseAlgorithmIdentifier = "ES512" + CoseAlgorithmIdentifier_RS256 CoseAlgorithmIdentifier = "RS256" + CoseAlgorithmIdentifier_RS384 CoseAlgorithmIdentifier = "RS384" + CoseAlgorithmIdentifier_RS512 CoseAlgorithmIdentifier = "RS512" + CoseAlgorithmIdentifier_PS256 CoseAlgorithmIdentifier = "PS256" + CoseAlgorithmIdentifier_PS384 CoseAlgorithmIdentifier = "PS384" + CoseAlgorithmIdentifier_PS512 CoseAlgorithmIdentifier = "PS512" +) + /** - * @author Daniel DeGroff + * @author Brett Pontarelli */ -type ApplicationFormConfiguration struct { - AdminRegistrationFormId string `json:"adminRegistrationFormId,omitempty"` - SelfServiceFormConfiguration SelfServiceFormConfiguration `json:"selfServiceFormConfiguration,omitempty"` - SelfServiceFormId string `json:"selfServiceFormId,omitempty"` +type SteamApplicationConfiguration struct { + BaseIdentityProviderApplicationConfiguration + ApiMode SteamAPIMode `json:"apiMode,omitempty"` + ButtonText string `json:"buttonText,omitempty"` + ClientId string `json:"client_id,omitempty"` + Scope string `json:"scope,omitempty"` + WebAPIKey string `json:"webAPIKey,omitempty"` } /** - * A policy for deleting Users based upon some external criteria. - * - * @author Trevor Smith + * @author Daniel DeGroff */ -type TimeBasedDeletePolicy struct { - Enableable - EnabledInstant int64 `json:"enabledInstant,omitempty"` - NumberOfDaysToRetain int `json:"numberOfDaysToRetain,omitempty"` +type TwoFactorSendRequest struct { + ApplicationId string `json:"applicationId,omitempty"` + Email string `json:"email,omitempty"` + Method string `json:"method,omitempty"` + MethodId string `json:"methodId,omitempty"` + MobilePhone string `json:"mobilePhone,omitempty"` + UserId string `json:"userId,omitempty"` } /** - * Search criteria for Keys + * Search criteria for Email templates * - * @author Spencer Witt + * @author Mark Manes */ -type KeySearchCriteria struct { +type EmailTemplateSearchCriteria struct { BaseSearchCriteria - Algorithm KeyAlgorithm `json:"algorithm,omitempty"` - Name string `json:"name,omitempty"` - Type KeyType `json:"type,omitempty"` + Name string `json:"name,omitempty"` } /** @@ -1066,1096 +1052,882 @@ const ( ) /** - * @author Daniel DeGroff + * @author Brett Pontarelli */ -type RefreshRequest struct { - BaseEventRequest - RefreshToken string `json:"refreshToken,omitempty"` - Token string `json:"token,omitempty"` +type SonyPSNApplicationConfiguration struct { + BaseIdentityProviderApplicationConfiguration + ButtonText string `json:"buttonText,omitempty"` + ClientId string `json:"client_id,omitempty"` + ClientSecret string `json:"client_secret,omitempty"` + Scope string `json:"scope,omitempty"` } /** - * Models an event where a user is being created with an "in-use" login Id (email or username). + * An audit log. * - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type UserLoginIdDuplicateOnCreateEvent struct { - BaseUserEvent - DuplicateEmail string `json:"duplicateEmail,omitempty"` - DuplicateUsername string `json:"duplicateUsername,omitempty"` - Existing User `json:"existing,omitempty"` -} - -type ThemeType string - -func (e ThemeType) String() string { - return string(e) +type AuditLog struct { + Data map[string]interface{} `json:"data,omitempty"` + Id int64 `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + InsertUser string `json:"insertUser,omitempty"` + Message string `json:"message,omitempty"` + NewValue interface{} `json:"newValue,omitempty"` + OldValue interface{} `json:"oldValue,omitempty"` + Reason string `json:"reason,omitempty"` } -const ( - ThemeType_Advanced ThemeType = "advanced" - ThemeType_Simple ThemeType = "simple" -) - /** - * Login API request object. + * A webhook call response. * - * @author Seth Musselman + * @author Spencer Witt */ -type LoginRequest struct { - BaseLoginRequest - LoginId string `json:"loginId,omitempty"` - OneTimePassword string `json:"oneTimePassword,omitempty"` - Password string `json:"password,omitempty"` - TwoFactorTrustId string `json:"twoFactorTrustId,omitempty"` +type WebhookCallResponse struct { + BaseHTTPResponse + Exception string `json:"exception,omitempty"` + StatusCode int `json:"statusCode,omitempty"` + Url string `json:"url,omitempty"` } -/** - * The reason for the login failure. - * - * @author Daniel DeGroff - */ -type UserLoginFailedReason struct { - Code string `json:"code,omitempty"` - LambdaId string `json:"lambdaId,omitempty"` - LambdaResult Errors `json:"lambdaResult,omitempty"` +func (b *WebhookCallResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Response for the user login report. + * Provides the authenticator with the data it needs to generate an assertion. * - * @author Seth Musselman + * @author Spencer Witt */ -type RecentLoginResponse struct { - BaseHTTPResponse - Logins []DisplayableRawLogin `json:"logins,omitempty"` -} - -func (b *RecentLoginResponse) SetStatus(status int) { - b.StatusCode = status +type PublicKeyCredentialRequestOptions struct { + AllowCredentials []PublicKeyCredentialDescriptor `json:"allowCredentials,omitempty"` + Challenge string `json:"challenge,omitempty"` + RpId string `json:"rpId,omitempty"` + Timeout int64 `json:"timeout,omitempty"` + UserVerification UserVerificationRequirement `json:"userVerification,omitempty"` } /** - * Theme object for values used in the css variables for simple themes. + * Search request for user comments * - * @author Lyle Schemmerling + * @author Spencer Witt */ -type SimpleThemeVariables struct { - AlertBackgroundColor string `json:"alertBackgroundColor,omitempty"` - AlertFontColor string `json:"alertFontColor,omitempty"` - BackgroundImageURL string `json:"backgroundImageURL,omitempty"` - BackgroundSize string `json:"backgroundSize,omitempty"` - BorderRadius string `json:"borderRadius,omitempty"` - DeleteButtonColor string `json:"deleteButtonColor,omitempty"` - DeleteButtonFocusColor string `json:"deleteButtonFocusColor,omitempty"` - DeleteButtonTextColor string `json:"deleteButtonTextColor,omitempty"` - DeleteButtonTextFocusColor string `json:"deleteButtonTextFocusColor,omitempty"` - ErrorFontColor string `json:"errorFontColor,omitempty"` - ErrorIconColor string `json:"errorIconColor,omitempty"` - FontColor string `json:"fontColor,omitempty"` - FontFamily string `json:"fontFamily,omitempty"` - FooterDisplay bool `json:"footerDisplay"` - IconBackgroundColor string `json:"iconBackgroundColor,omitempty"` - IconColor string `json:"iconColor,omitempty"` - InfoIconColor string `json:"infoIconColor,omitempty"` - InputBackgroundColor string `json:"inputBackgroundColor,omitempty"` - InputIconColor string `json:"inputIconColor,omitempty"` - InputTextColor string `json:"inputTextColor,omitempty"` - LinkTextColor string `json:"linkTextColor,omitempty"` - LinkTextFocusColor string `json:"linkTextFocusColor,omitempty"` - LogoImageSize string `json:"logoImageSize,omitempty"` - LogoImageURL string `json:"logoImageURL,omitempty"` - MonoFontColor string `json:"monoFontColor,omitempty"` - MonoFontFamily string `json:"monoFontFamily,omitempty"` - PageBackgroundColor string `json:"pageBackgroundColor,omitempty"` - PanelBackgroundColor string `json:"panelBackgroundColor,omitempty"` - PrimaryButtonColor string `json:"primaryButtonColor,omitempty"` - PrimaryButtonFocusColor string `json:"primaryButtonFocusColor,omitempty"` - PrimaryButtonTextColor string `json:"primaryButtonTextColor,omitempty"` - PrimaryButtonTextFocusColor string `json:"primaryButtonTextFocusColor,omitempty"` +type UserCommentSearchRequest struct { + Search UserCommentSearchCriteria `json:"search,omitempty"` } /** - * API response for User consent. - * * @author Daniel DeGroff */ -type UserConsentRequest struct { - UserConsent UserConsent `json:"userConsent,omitempty"` +type UnverifiedBehavior string + +func (e UnverifiedBehavior) String() string { + return string(e) } +const ( + UnverifiedBehavior_Allow UnverifiedBehavior = "Allow" + UnverifiedBehavior_Gated UnverifiedBehavior = "Gated" +) + /** - * API request for sending out family requests to parent's. + * Models the Group Member Remove Event. * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type FamilyEmailRequest struct { - ParentEmail string `json:"parentEmail,omitempty"` +type GroupMemberRemoveEvent struct { + BaseGroupEvent + Members []GroupMember `json:"members,omitempty"` } /** - * Search request for entities - * * @author Brett Guy */ -type EntitySearchRequest struct { - Search EntitySearchCriteria `json:"search,omitempty"` +type MessengerType string + +func (e MessengerType) String() string { + return string(e) } +const ( + MessengerType_Generic MessengerType = "Generic" + MessengerType_Kafka MessengerType = "Kafka" + MessengerType_Twilio MessengerType = "Twilio" +) + /** - * Interface describing the need for CORS configuration. - * - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type RequiresCORSConfiguration struct { +type EventLogSearchRequest struct { + Search EventLogSearchCriteria `json:"search,omitempty"` } /** - * Audit log response. + * Event log response. * * @author Brian Pontarelli */ -type AuditLogResponse struct { +type EventLogSearchResponse struct { BaseHTTPResponse - AuditLog AuditLog `json:"auditLog,omitempty"` + EventLogs []EventLog `json:"eventLogs,omitempty"` + Total int64 `json:"total,omitempty"` } -func (b *AuditLogResponse) SetStatus(status int) { +func (b *EventLogSearchResponse) SetStatus(status int) { b.StatusCode = status } /** - * @author Brett Pontarelli + * Webhook event log response. + * + * @author Spencer Witt */ -type SteamApplicationConfiguration struct { - BaseIdentityProviderApplicationConfiguration - ApiMode SteamAPIMode `json:"apiMode,omitempty"` - ButtonText string `json:"buttonText,omitempty"` - ClientId string `json:"client_id,omitempty"` - Scope string `json:"scope,omitempty"` - WebAPIKey string `json:"webAPIKey,omitempty"` +type WebhookEventLogResponse struct { + BaseHTTPResponse + WebhookEventLog WebhookEventLog `json:"webhookEventLog,omitempty"` } -/** - * @author Mikey Sleevi - */ -type TenantMultiFactorConfiguration struct { - Authenticator MultiFactorAuthenticatorMethod `json:"authenticator,omitempty"` - Email MultiFactorEmailMethod `json:"email,omitempty"` - LoginPolicy MultiFactorLoginPolicy `json:"loginPolicy,omitempty"` - Sms MultiFactorSMSMethod `json:"sms,omitempty"` +func (b *WebhookEventLogResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Xbox gaming login provider. - * - * @author Brett Pontarelli + * @author Daniel DeGroff */ -type XboxIdentityProvider struct { - BaseIdentityProvider - ButtonText string `json:"buttonText,omitempty"` - ClientId string `json:"client_id,omitempty"` - ClientSecret string `json:"client_secret,omitempty"` - Scope string `json:"scope,omitempty"` +type TwoFactorRecoveryCodeResponse struct { + BaseHTTPResponse + RecoveryCodes []string `json:"recoveryCodes,omitempty"` } -/** - * @author Brett Guy - */ -type ProofKeyForCodeExchangePolicy string - -func (e ProofKeyForCodeExchangePolicy) String() string { - return string(e) +func (b *TwoFactorRecoveryCodeResponse) SetStatus(status int) { + b.StatusCode = status } -const ( - ProofKeyForCodeExchangePolicy_Required ProofKeyForCodeExchangePolicy = "Required" - ProofKeyForCodeExchangePolicy_NotRequired ProofKeyForCodeExchangePolicy = "NotRequired" - ProofKeyForCodeExchangePolicy_NotRequiredWhenUsingClientAuthentication ProofKeyForCodeExchangePolicy = "NotRequiredWhenUsingClientAuthentication" -) - /** - * Audit log response. + * An expandable API response. * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type AuditLogSearchResponse struct { +type ExpandableResponse struct { BaseHTTPResponse - AuditLogs []AuditLog `json:"auditLogs,omitempty"` - Total int64 `json:"total,omitempty"` + Expandable []string `json:"expandable,omitempty"` } -func (b *AuditLogSearchResponse) SetStatus(status int) { +func (b *ExpandableResponse) SetStatus(status int) { b.StatusCode = status } /** - *

+ * Model a user event when a two-factor method has been added. * * @author Daniel DeGroff */ -type TokenType string - -func (e TokenType) String() string { - return string(e) +type UserTwoFactorMethodRemoveEvent struct { + BaseUserEvent + Method TwoFactorMethod `json:"method,omitempty"` } -const ( - TokenType_Bearer TokenType = "Bearer" - TokenType_MAC TokenType = "MAC" -) - /** - * Search response for Groups + * The response from the total report. This report stores the total numbers for each application. * - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type GroupSearchResponse struct { +type TotalsReportResponse struct { BaseHTTPResponse - Groups []Group `json:"groups,omitempty"` - Total int64 `json:"total,omitempty"` + ApplicationTotals map[string]Totals `json:"applicationTotals,omitempty"` + GlobalRegistrations int64 `json:"globalRegistrations,omitempty"` + TotalGlobalRegistrations int64 `json:"totalGlobalRegistrations,omitempty"` } -func (b *GroupSearchResponse) SetStatus(status int) { +func (b *TotalsReportResponse) SetStatus(status int) { b.StatusCode = status } -/** - * Configuration for signing webhooks. - * - * @author Brent Halsey - */ -type WebhookSignatureConfiguration struct { - Enableable - SigningKeyId string `json:"signingKeyId,omitempty"` +type Totals struct { + Logins int64 `json:"logins,omitempty"` + Registrations int64 `json:"registrations,omitempty"` + TotalRegistrations int64 `json:"totalRegistrations,omitempty"` } -type XMLSignatureLocation string - -func (e XMLSignatureLocation) String() string { - return string(e) +/** + * @author Brett Guy + */ +type IPAccessControlListResponse struct { + BaseHTTPResponse + IpAccessControlList IPAccessControlList `json:"ipAccessControlList,omitempty"` + IpAccessControlLists []IPAccessControlList `json:"ipAccessControlLists,omitempty"` } -const ( - XMLSignatureLocation_Assertion XMLSignatureLocation = "Assertion" - XMLSignatureLocation_Response XMLSignatureLocation = "Response" -) +func (b *IPAccessControlListResponse) SetStatus(status int) { + b.StatusCode = status +} /** - * Search criteria for user comments. + * API request to start a WebAuthn registration ceremony * * @author Spencer Witt */ -type UserCommentSearchCriteria struct { - BaseSearchCriteria - Comment string `json:"comment,omitempty"` - CommenterId string `json:"commenterId,omitempty"` - TenantId string `json:"tenantId,omitempty"` - UserId string `json:"userId,omitempty"` +type WebAuthnRegisterStartRequest struct { + DisplayName string `json:"displayName,omitempty"` + Name string `json:"name,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + UserId string `json:"userId,omitempty"` + Workflow WebAuthnWorkflow `json:"workflow,omitempty"` } /** + * Models the User Login event that is suspicious. + * * @author Daniel DeGroff */ -type LinkedInIdentityProvider struct { - BaseIdentityProvider - ButtonText string `json:"buttonText,omitempty"` - ClientId string `json:"client_id,omitempty"` - ClientSecret string `json:"client_secret,omitempty"` - Scope string `json:"scope,omitempty"` +type UserLoginSuspiciousEvent struct { + UserLoginSuccessEvent + ThreatsDetected []AuthenticationThreats `json:"threatsDetected,omitempty"` } /** - * A server where events are sent. This includes user action events and any other events sent by FusionAuth. + * User API delete request object for a single user. * * @author Brian Pontarelli */ -type Webhook struct { - ConnectTimeout int `json:"connectTimeout,omitempty"` - Data map[string]interface{} `json:"data,omitempty"` - Description string `json:"description,omitempty"` - EventsEnabled map[EventType]bool `json:"eventsEnabled,omitempty"` - Global bool `json:"global"` - Headers map[string]string `json:"headers,omitempty"` - HttpAuthenticationPassword string `json:"httpAuthenticationPassword,omitempty"` - HttpAuthenticationUsername string `json:"httpAuthenticationUsername,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - ReadTimeout int `json:"readTimeout,omitempty"` - SignatureConfiguration WebhookSignatureConfiguration `json:"signatureConfiguration,omitempty"` - SslCertificate string `json:"sslCertificate,omitempty"` - SslCertificateKeyId string `json:"sslCertificateKeyId,omitempty"` - TenantIds []string `json:"tenantIds,omitempty"` - Url string `json:"url,omitempty"` +type UserDeleteSingleRequest struct { + BaseEventRequest + HardDelete bool `json:"hardDelete"` } /** + * API response for refreshing a JWT with a Refresh Token. + *

+ * Using a different response object from RefreshTokenResponse because the retrieve response will return an object for refreshToken, and this is a + * string. + * * @author Daniel DeGroff */ -type TwoFactorLoginRequest struct { - BaseLoginRequest - Code string `json:"code,omitempty"` - TrustComputer bool `json:"trustComputer"` - TwoFactorId string `json:"twoFactorId,omitempty"` - UserId string `json:"userId,omitempty"` +type JWTRefreshResponse struct { + BaseHTTPResponse + RefreshToken string `json:"refreshToken,omitempty"` + RefreshTokenId string `json:"refreshTokenId,omitempty"` + Token string `json:"token,omitempty"` +} + +func (b *JWTRefreshResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Entity grant API request object. - * * @author Brian Pontarelli */ -type EntityGrantRequest struct { - Grant EntityGrant `json:"grant,omitempty"` +type AuditLogSearchRequest struct { + Search AuditLogSearchCriteria `json:"search,omitempty"` } /** - * @author Daniel DeGroff + * @author Brett Guy */ -type IdentityProviderLinkResponse struct { +type IPAccessControlListSearchResponse struct { BaseHTTPResponse - IdentityProviderLink IdentityProviderLink `json:"identityProviderLink,omitempty"` - IdentityProviderLinks []IdentityProviderLink `json:"identityProviderLinks,omitempty"` + IpAccessControlLists []IPAccessControlList `json:"ipAccessControlLists,omitempty"` + Total int64 `json:"total,omitempty"` } -func (b *IdentityProviderLinkResponse) SetStatus(status int) { +func (b *IPAccessControlListSearchResponse) SetStatus(status int) { b.StatusCode = status } /** - * The handling policy for scopes provided by FusionAuth - * - * @author Spencer Witt + * @author Daniel DeGroff */ -type ProvidedScopePolicy struct { - Address Requirable `json:"address,omitempty"` - Email Requirable `json:"email,omitempty"` - Phone Requirable `json:"phone,omitempty"` - Profile Requirable `json:"profile,omitempty"` +type VersionResponse struct { + BaseHTTPResponse + Version string `json:"version,omitempty"` } -type HistoryItem struct { - ActionerUserId string `json:"actionerUserId,omitempty"` - Comment string `json:"comment,omitempty"` - CreateInstant int64 `json:"createInstant,omitempty"` - Expiry int64 `json:"expiry,omitempty"` +func (b *VersionResponse) SetStatus(status int) { + b.StatusCode = status } /** - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type BaseExportRequest struct { - DateTimeSecondsFormat string `json:"dateTimeSecondsFormat,omitempty"` - ZoneId string `json:"zoneId,omitempty"` +type TwoFactorDisableRequest struct { + BaseEventRequest + ApplicationId string `json:"applicationId,omitempty"` + Code string `json:"code,omitempty"` + MethodId string `json:"methodId,omitempty"` } /** - * Google social login provider parameters. - * - * @author Daniel DeGroff + * @author Brett Pontarelli */ -type GoogleIdentityProviderProperties struct { - Api string `json:"api,omitempty"` - Button string `json:"button,omitempty"` +type NintendoApplicationConfiguration struct { + BaseIdentityProviderApplicationConfiguration + ButtonText string `json:"buttonText,omitempty"` + ClientId string `json:"client_id,omitempty"` + ClientSecret string `json:"client_secret,omitempty"` + EmailClaim string `json:"emailClaim,omitempty"` + Scope string `json:"scope,omitempty"` + UniqueIdClaim string `json:"uniqueIdClaim,omitempty"` + UsernameClaim string `json:"usernameClaim,omitempty"` } /** * @author Daniel DeGroff */ -type OAuthError struct { - ChangePasswordId string `json:"change_password_id,omitempty"` - Error OAuthErrorType `json:"error,omitempty"` - ErrorDescription string `json:"error_description,omitempty"` - ErrorReason OAuthErrorReason `json:"error_reason,omitempty"` - ErrorUri string `json:"error_uri,omitempty"` - TwoFactorId string `json:"two_factor_id,omitempty"` - TwoFactorMethods []TwoFactorMethod `json:"two_factor_methods,omitempty"` +type PasswordBreachDetection struct { + Enableable + MatchMode BreachMatchMode `json:"matchMode,omitempty"` + NotifyUserEmailTemplateId string `json:"notifyUserEmailTemplateId,omitempty"` + OnLogin BreachAction `json:"onLogin,omitempty"` +} + +type BreachAction string + +func (e BreachAction) String() string { + return string(e) +} + +const ( + BreachAction_Off BreachAction = "Off" + BreachAction_RecordOnly BreachAction = "RecordOnly" + BreachAction_NotifyUser BreachAction = "NotifyUser" + BreachAction_RequireChange BreachAction = "RequireChange" +) + +type BreachMatchMode string + +func (e BreachMatchMode) String() string { + return string(e) } +const ( + BreachMatchMode_Low BreachMatchMode = "Low" + BreachMatchMode_Medium BreachMatchMode = "Medium" + BreachMatchMode_High BreachMatchMode = "High" +) + /** * @author Daniel DeGroff */ -type TwoFactorRecoveryCodeResponse struct { - BaseHTTPResponse - RecoveryCodes []string `json:"recoveryCodes,omitempty"` -} +type FormFieldAdminPolicy string -func (b *TwoFactorRecoveryCodeResponse) SetStatus(status int) { - b.StatusCode = status +func (e FormFieldAdminPolicy) String() string { + return string(e) } +const ( + FormFieldAdminPolicy_Edit FormFieldAdminPolicy = "Edit" + FormFieldAdminPolicy_View FormFieldAdminPolicy = "View" +) + /** - * Describes the authenticator attachment modality preference for a WebAuthn workflow. See {@link AuthenticatorAttachment} + * Used to communicate whether and how authenticator attestation should be delivered to the Relying Party * * @author Spencer Witt */ -type AuthenticatorAttachmentPreference string +type AttestationConveyancePreference string -func (e AuthenticatorAttachmentPreference) String() string { +func (e AttestationConveyancePreference) String() string { return string(e) } const ( - AuthenticatorAttachmentPreference_Any AuthenticatorAttachmentPreference = "any" - AuthenticatorAttachmentPreference_Platform AuthenticatorAttachmentPreference = "platform" - AuthenticatorAttachmentPreference_CrossPlatform AuthenticatorAttachmentPreference = "crossPlatform" + AttestationConveyancePreference_None AttestationConveyancePreference = "none" + AttestationConveyancePreference_Indirect AttestationConveyancePreference = "indirect" + AttestationConveyancePreference_Direct AttestationConveyancePreference = "direct" + AttestationConveyancePreference_Enterprise AttestationConveyancePreference = "enterprise" ) /** - * Models the Group Update Complete Event. + * A policy to configure if and when the user-action is canceled prior to the expiration of the action. * * @author Daniel DeGroff */ -type GroupUpdateCompleteEvent struct { - BaseGroupEvent - Original Group `json:"original,omitempty"` -} - -type ConnectorLambdaConfiguration struct { - ReconcileId string `json:"reconcileId,omitempty"` +type FailedAuthenticationActionCancelPolicy struct { + OnPasswordReset bool `json:"onPasswordReset"` } /** - * Search criteria for Lambdas + * The possible result states of a webhook event. This tracks the success of the overall webhook transaction according to the {@link TransactionType} + * and configured webhooks. * - * @author Mark Manes + * @author Spencer Witt */ -type LambdaSearchCriteria struct { - BaseSearchCriteria - Body string `json:"body,omitempty"` - Name string `json:"name,omitempty"` - Type LambdaType `json:"type,omitempty"` +type WebhookEventResult string + +func (e WebhookEventResult) String() string { + return string(e) } +const ( + WebhookEventResult_Failed WebhookEventResult = "Failed" + WebhookEventResult_Running WebhookEventResult = "Running" + WebhookEventResult_Succeeded WebhookEventResult = "Succeeded" +) + /** * @author Brian Pontarelli */ -type SystemConfiguration struct { - AuditLogConfiguration AuditLogConfiguration `json:"auditLogConfiguration,omitempty"` - CorsConfiguration CORSConfiguration `json:"corsConfiguration,omitempty"` - Data map[string]interface{} `json:"data,omitempty"` - EventLogConfiguration EventLogConfiguration `json:"eventLogConfiguration,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - LoginRecordConfiguration LoginRecordConfiguration `json:"loginRecordConfiguration,omitempty"` - ReportTimezone string `json:"reportTimezone,omitempty"` - TrustedProxyConfiguration SystemTrustedProxyConfiguration `json:"trustedProxyConfiguration,omitempty"` - UiConfiguration UIConfiguration `json:"uiConfiguration,omitempty"` - WebhookEventLogConfiguration WebhookEventLogConfiguration `json:"webhookEventLogConfiguration,omitempty"` -} - -/** - * @author Brett Guy - */ -type IPAccessControlEntryAction string - -func (e IPAccessControlEntryAction) String() string { - return string(e) +type BaseSearchCriteria struct { + NumberOfResults int `json:"numberOfResults,omitempty"` + OrderBy string `json:"orderBy,omitempty"` + StartRow int `json:"startRow,omitempty"` } -const ( - IPAccessControlEntryAction_Allow IPAccessControlEntryAction = "Allow" - IPAccessControlEntryAction_Block IPAccessControlEntryAction = "Block" -) - /** - * Webhook API request object. + * Forgot password request object. * * @author Brian Pontarelli */ -type WebhookRequest struct { - Webhook Webhook `json:"webhook,omitempty"` +type ForgotPasswordRequest struct { + BaseEventRequest + ApplicationId string `json:"applicationId,omitempty"` + ChangePasswordId string `json:"changePasswordId,omitempty"` + Email string `json:"email,omitempty"` + LoginId string `json:"loginId,omitempty"` + SendForgotPasswordEmail bool `json:"sendForgotPasswordEmail"` + State map[string]interface{} `json:"state,omitempty"` + Username string `json:"username,omitempty"` } /** - * Form field response. + * The FormField API request object. * * @author Brett Guy */ -type FormFieldResponse struct { - BaseHTTPResponse +type FormFieldRequest struct { Field FormField `json:"field,omitempty"` Fields []FormField `json:"fields,omitempty"` } -func (b *FormFieldResponse) SetStatus(status int) { - b.StatusCode = status +/** + * @author Daniel DeGroff + */ +type SendRequest struct { + ApplicationId string `json:"applicationId,omitempty"` + BccAddresses []string `json:"bccAddresses,omitempty"` + CcAddresses []string `json:"ccAddresses,omitempty"` + PreferredLanguages []string `json:"preferredLanguages,omitempty"` + RequestData map[string]interface{} `json:"requestData,omitempty"` + ToAddresses []EmailAddress `json:"toAddresses,omitempty"` + UserIds []string `json:"userIds,omitempty"` } /** - * @author Mikey Sleevi + * Identifies the WebAuthn workflow. This will affect the parameters used for credential creation + * and request based on the Tenant configuration. + * + * @author Spencer Witt */ -type MessageType string +type WebAuthnWorkflow string -func (e MessageType) String() string { +func (e WebAuthnWorkflow) String() string { return string(e) } const ( - MessageType_SMS MessageType = "SMS" + WebAuthnWorkflow_Bootstrap WebAuthnWorkflow = "bootstrap" + WebAuthnWorkflow_General WebAuthnWorkflow = "general" + WebAuthnWorkflow_Reauthentication WebAuthnWorkflow = "reauthentication" ) -// Do not require a setter for 'type', it is defined by the concrete class and is not mutable -type BaseConnectorConfiguration struct { - Data map[string]interface{} `json:"data,omitempty"` - Debug bool `json:"debug"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - Name string `json:"name,omitempty"` - Type ConnectorType `json:"type,omitempty"` -} - -/** - * Configuration for the behavior of failed login attempts. This helps us protect against brute force password attacks. - * - * @author Daniel DeGroff - */ -type FailedAuthenticationConfiguration struct { - ActionCancelPolicy FailedAuthenticationActionCancelPolicy `json:"actionCancelPolicy,omitempty"` - ActionDuration int64 `json:"actionDuration,omitempty"` - ActionDurationUnit ExpiryUnit `json:"actionDurationUnit,omitempty"` - EmailUser bool `json:"emailUser"` - ResetCountInSeconds int `json:"resetCountInSeconds,omitempty"` - TooManyAttempts int `json:"tooManyAttempts,omitempty"` - UserActionId string `json:"userActionId,omitempty"` -} - /** - * Search criteria for Tenants - * - * @author Mark Manes - */ -type TenantSearchCriteria struct { - BaseSearchCriteria - Name string `json:"name,omitempty"` -} - -/** - * @author Rob Davis + * @author Michael Sleevi */ -type TenantSCIMServerConfiguration struct { - Enableable - ClientEntityTypeId string `json:"clientEntityTypeId,omitempty"` - Schemas map[string]interface{} `json:"schemas,omitempty"` - ServerEntityTypeId string `json:"serverEntityTypeId,omitempty"` +type MessageTemplateResponse struct { + BaseHTTPResponse + MessageTemplate MessageTemplate `json:"messageTemplate,omitempty"` + MessageTemplates []MessageTemplate `json:"messageTemplates,omitempty"` } -/** - * An email address. - * - * @author Brian Pontarelli - */ -type EmailAddress struct { - Address string `json:"address,omitempty"` - Display string `json:"display,omitempty"` +func (b *MessageTemplateResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Status for content like usernames, profile attributes, etc. + * Models a consent. * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type ContentStatus string +type ConsentStatus string -func (e ContentStatus) String() string { +func (e ConsentStatus) String() string { return string(e) } const ( - ContentStatus_ACTIVE ContentStatus = "ACTIVE" - ContentStatus_PENDING ContentStatus = "PENDING" - ContentStatus_REJECTED ContentStatus = "REJECTED" + ConsentStatus_Active ConsentStatus = "Active" + ConsentStatus_Revoked ConsentStatus = "Revoked" ) -/** - * @author Brett Guy - */ -type GenericMessengerConfiguration struct { - BaseMessengerConfiguration - ConnectTimeout int `json:"connectTimeout,omitempty"` - Headers map[string]string `json:"headers,omitempty"` - HttpAuthenticationPassword string `json:"httpAuthenticationPassword,omitempty"` - HttpAuthenticationUsername string `json:"httpAuthenticationUsername,omitempty"` - ReadTimeout int `json:"readTimeout,omitempty"` - SslCertificate string `json:"sslCertificate,omitempty"` - Url string `json:"url,omitempty"` -} - /** * @author Daniel DeGroff */ -type FormControl string - -func (e FormControl) String() string { - return string(e) -} - -const ( - FormControl_Checkbox FormControl = "checkbox" - FormControl_Number FormControl = "number" - FormControl_Password FormControl = "password" - FormControl_Radio FormControl = "radio" - FormControl_Select FormControl = "select" - FormControl_Textarea FormControl = "textarea" - FormControl_Text FormControl = "text" -) - -type BreachMatchMode string +type HTTPMethod string -func (e BreachMatchMode) String() string { +func (e HTTPMethod) String() string { return string(e) } const ( - BreachMatchMode_Low BreachMatchMode = "Low" - BreachMatchMode_Medium BreachMatchMode = "Medium" - BreachMatchMode_High BreachMatchMode = "High" + HTTPMethod_GET HTTPMethod = "GET" + HTTPMethod_POST HTTPMethod = "POST" + HTTPMethod_PUT HTTPMethod = "PUT" + HTTPMethod_DELETE HTTPMethod = "DELETE" + HTTPMethod_HEAD HTTPMethod = "HEAD" + HTTPMethod_OPTIONS HTTPMethod = "OPTIONS" + HTTPMethod_PATCH HTTPMethod = "PATCH" ) /** - * Search criteria for Group Members + * Models the User Deleted Registration Event. + *

+ * This is different than user.registration.delete in that it is sent after the TX has been committed. This event cannot be transactional. * * @author Daniel DeGroff */ -type GroupMemberSearchCriteria struct { - BaseSearchCriteria - GroupId string `json:"groupId,omitempty"` - TenantId string `json:"tenantId,omitempty"` - UserId string `json:"userId,omitempty"` +type UserRegistrationDeleteCompleteEvent struct { + BaseUserEvent + ApplicationId string `json:"applicationId,omitempty"` + Registration UserRegistration `json:"registration,omitempty"` } /** - * COSE key type + * Steam gaming login provider. * - * @author Spencer Witt + * @author Brett Pontarelli */ -type CoseKeyType string +type SteamIdentityProvider struct { + BaseIdentityProvider + ApiMode SteamAPIMode `json:"apiMode,omitempty"` + ButtonText string `json:"buttonText,omitempty"` + ClientId string `json:"client_id,omitempty"` + Scope string `json:"scope,omitempty"` + WebAPIKey string `json:"webAPIKey,omitempty"` +} -func (e CoseKeyType) String() string { - return string(e) +/** + * Nintendo gaming login provider. + * + * @author Brett Pontarelli + */ +type NintendoIdentityProvider struct { + BaseIdentityProvider + ButtonText string `json:"buttonText,omitempty"` + ClientId string `json:"client_id,omitempty"` + ClientSecret string `json:"client_secret,omitempty"` + EmailClaim string `json:"emailClaim,omitempty"` + Scope string `json:"scope,omitempty"` + UniqueIdClaim string `json:"uniqueIdClaim,omitempty"` + UsernameClaim string `json:"usernameClaim,omitempty"` } -const ( - CoseKeyType_Reserved CoseKeyType = "Reserved" - CoseKeyType_OKP CoseKeyType = "OKP" - CoseKeyType_EC2 CoseKeyType = "EC2" - CoseKeyType_RSA CoseKeyType = "RSA" - CoseKeyType_Symmetric CoseKeyType = "Symmetric" -) +/** + * @author Daniel DeGroff + */ +type TwoFactorLoginRequest struct { + BaseLoginRequest + Code string `json:"code,omitempty"` + TrustComputer bool `json:"trustComputer"` + TwoFactorId string `json:"twoFactorId,omitempty"` + UserId string `json:"userId,omitempty"` +} /** - * User API request object. + * Search API request. * * @author Brian Pontarelli */ -type UserRequest struct { - BaseEventRequest - ApplicationId string `json:"applicationId,omitempty"` - CurrentPassword string `json:"currentPassword,omitempty"` - DisableDomainBlock bool `json:"disableDomainBlock"` - SendSetPasswordEmail bool `json:"sendSetPasswordEmail"` - SkipVerification bool `json:"skipVerification"` - User User `json:"user,omitempty"` +type SearchRequest struct { + ExpandableRequest + Search UserSearchCriteria `json:"search,omitempty"` } /** - * User API bulk response object. - * - * @author Trevor Smith + * @author Daniel DeGroff */ -type UserDeleteResponse struct { - BaseHTTPResponse - DryRun bool `json:"dryRun"` - HardDelete bool `json:"hardDelete"` - Total int `json:"total,omitempty"` - UserIds []string `json:"userIds,omitempty"` -} - -func (b *UserDeleteResponse) SetStatus(status int) { - b.StatusCode = status +type BaseIdentityProviderApplicationConfiguration struct { + Enableable + CreateRegistration bool `json:"createRegistration"` + Data map[string]interface{} `json:"data,omitempty"` } /** - * Change password request object. + * This class is an abstraction of a simple email message. * * @author Brian Pontarelli */ -type ChangePasswordRequest struct { - BaseEventRequest - ApplicationId string `json:"applicationId,omitempty"` - ChangePasswordId string `json:"changePasswordId,omitempty"` - CurrentPassword string `json:"currentPassword,omitempty"` - LoginId string `json:"loginId,omitempty"` - Password string `json:"password,omitempty"` - RefreshToken string `json:"refreshToken,omitempty"` - TrustChallenge string `json:"trustChallenge,omitempty"` - TrustToken string `json:"trustToken,omitempty"` -} - -type SAMLv2Configuration struct { - Enableable - AssertionEncryptionConfiguration SAMLv2AssertionEncryptionConfiguration `json:"assertionEncryptionConfiguration,omitempty"` - Audience string `json:"audience,omitempty"` - AuthorizedRedirectURLs []string `json:"authorizedRedirectURLs,omitempty"` - CallbackURL string `json:"callbackURL,omitempty"` - Debug bool `json:"debug"` - DefaultVerificationKeyId string `json:"defaultVerificationKeyId,omitempty"` - InitiatedLogin SAMLv2IdPInitiatedLoginConfiguration `json:"initiatedLogin,omitempty"` - Issuer string `json:"issuer,omitempty"` - KeyId string `json:"keyId,omitempty"` - LoginHintConfiguration LoginHintConfiguration `json:"loginHintConfiguration,omitempty"` - Logout SAMLv2Logout `json:"logout,omitempty"` - LogoutURL string `json:"logoutURL,omitempty"` - RequireSignedRequests bool `json:"requireSignedRequests"` - XmlSignatureC14nMethod CanonicalizationMethod `json:"xmlSignatureC14nMethod,omitempty"` - XmlSignatureLocation XMLSignatureLocation `json:"xmlSignatureLocation,omitempty"` +type Email struct { + Attachments []Attachment `json:"attachments,omitempty"` + Bcc []EmailAddress `json:"bcc,omitempty"` + Cc []EmailAddress `json:"cc,omitempty"` + From EmailAddress `json:"from,omitempty"` + Html string `json:"html,omitempty"` + ReplyTo EmailAddress `json:"replyTo,omitempty"` + Subject string `json:"subject,omitempty"` + Text string `json:"text,omitempty"` + To []EmailAddress `json:"to,omitempty"` } /** - * CleanSpeak configuration at the system and application level. + * Search request for Lambdas * - * @author Brian Pontarelli + * @author Mark Manes */ -type CleanSpeakConfiguration struct { - Enableable - ApiKey string `json:"apiKey,omitempty"` - ApplicationIds []string `json:"applicationIds,omitempty"` - Url string `json:"url,omitempty"` - UsernameModeration UsernameModeration `json:"usernameModeration,omitempty"` +type LambdaSearchRequest struct { + Search LambdaSearchCriteria `json:"search,omitempty"` } /** - * User Action API response object. - * - * @author Brian Pontarelli + * User login failed reason codes. */ -type UserActionResponse struct { - BaseHTTPResponse - UserAction UserAction `json:"userAction,omitempty"` - UserActions []UserAction `json:"userActions,omitempty"` -} - -func (b *UserActionResponse) SetStatus(status int) { - b.StatusCode = status +type UserLoginFailedReasonCode struct { } /** - * @author Lyle Schemmerling + * @author Brian Pontarelli */ -type SAMLv2DestinationAssertionPolicy string - -func (e SAMLv2DestinationAssertionPolicy) String() string { - return string(e) +type BaseElasticSearchCriteria struct { + BaseSearchCriteria + AccurateTotal bool `json:"accurateTotal"` + Ids []string `json:"ids,omitempty"` + NextResults string `json:"nextResults,omitempty"` + Query string `json:"query,omitempty"` + QueryString string `json:"queryString,omitempty"` + SortFields []SortField `json:"sortFields,omitempty"` } -const ( - SAMLv2DestinationAssertionPolicy_Enabled SAMLv2DestinationAssertionPolicy = "Enabled" - SAMLv2DestinationAssertionPolicy_Disabled SAMLv2DestinationAssertionPolicy = "Disabled" - SAMLv2DestinationAssertionPolicy_AllowAlternates SAMLv2DestinationAssertionPolicy = "AllowAlternates" -) - /** - * API response for starting a WebAuthn authentication ceremony + * Application search response * * @author Spencer Witt */ -type WebAuthnStartResponse struct { +type ApplicationSearchResponse struct { BaseHTTPResponse - Options PublicKeyCredentialRequestOptions `json:"options,omitempty"` + ExpandableResponse + Applications []Application `json:"applications,omitempty"` + Total int64 `json:"total,omitempty"` } -func (b *WebAuthnStartResponse) SetStatus(status int) { +func (b *ApplicationSearchResponse) SetStatus(status int) { b.StatusCode = status } /** - * Theme API response object. + * Lambda search response * - * @author Trevor Smith + * @author Mark Manes */ -type ThemeResponse struct { +type LambdaSearchResponse struct { BaseHTTPResponse - Theme Theme `json:"theme,omitempty"` - Themes []Theme `json:"themes,omitempty"` + Lambdas []Lambda `json:"lambdas,omitempty"` + Total int64 `json:"total,omitempty"` } -func (b *ThemeResponse) SetStatus(status int) { +func (b *LambdaSearchResponse) SetStatus(status int) { b.StatusCode = status } /** - * Defines valid credential types. This is an extension point in the WebAuthn spec. The only defined value at this time is "public-key" + * Webhook attempt log response. * * @author Spencer Witt */ -type PublicKeyCredentialType string - -func (e PublicKeyCredentialType) String() string { - return string(e) -} - -const ( - PublicKeyCredentialType_PublicKey PublicKeyCredentialType = "publicKey" -) - -/** - * @author Daniel DeGroff - */ -type OAuthResponse struct { +type WebhookAttemptLogResponse struct { BaseHTTPResponse + WebhookAttemptLog WebhookAttemptLog `json:"webhookAttemptLog,omitempty"` } -func (b *OAuthResponse) SetStatus(status int) { +func (b *WebhookAttemptLogResponse) SetStatus(status int) { b.StatusCode = status } /** + * Password Encryption Scheme Configuration + * * @author Daniel DeGroff */ -type FormFieldAdminPolicy string - -func (e FormFieldAdminPolicy) String() string { - return string(e) +type PasswordEncryptionConfiguration struct { + EncryptionScheme string `json:"encryptionScheme,omitempty"` + EncryptionSchemeFactor int `json:"encryptionSchemeFactor,omitempty"` + ModifyEncryptionSchemeOnLogin bool `json:"modifyEncryptionSchemeOnLogin"` } -const ( - FormFieldAdminPolicy_Edit FormFieldAdminPolicy = "Edit" - FormFieldAdminPolicy_View FormFieldAdminPolicy = "View" -) +/** + * The Application API response. + * + * @author Brian Pontarelli + */ +type ApplicationResponse struct { + BaseHTTPResponse + Application Application `json:"application,omitempty"` + Applications []Application `json:"applications,omitempty"` + Role ApplicationRole `json:"role,omitempty"` +} -type EmailPlus struct { - Enableable - EmailTemplateId string `json:"emailTemplateId,omitempty"` - MaximumTimeToSendEmailInHours int `json:"maximumTimeToSendEmailInHours,omitempty"` - MinimumTimeToSendEmailInHours int `json:"minimumTimeToSendEmailInHours,omitempty"` +func (b *ApplicationResponse) SetStatus(status int) { + b.StatusCode = status } /** - * API response for managing families and members. + * Response for the daily active user report. * * @author Brian Pontarelli */ -type FamilyResponse struct { +type MonthlyActiveUserReportResponse struct { BaseHTTPResponse - Families []Family `json:"families,omitempty"` - Family Family `json:"family,omitempty"` + MonthlyActiveUsers []Count `json:"monthlyActiveUsers,omitempty"` + Total int64 `json:"total,omitempty"` } -func (b *FamilyResponse) SetStatus(status int) { +func (b *MonthlyActiveUserReportResponse) SetStatus(status int) { b.StatusCode = status } /** - * Models a specific entity type permission. This permission can be granted to users or other entities. - * - * @author Brian Pontarelli + * @author Tyler Scott */ -type EntityTypePermission struct { +type Group struct { + Data map[string]interface{} `json:"data,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + Name string `json:"name,omitempty"` + Roles map[string][]ApplicationRole `json:"roles,omitempty"` + TenantId string `json:"tenantId,omitempty"` +} + +/** + * @author Daniel DeGroff + */ +type Form struct { Data map[string]interface{} `json:"data,omitempty"` - Description string `json:"description,omitempty"` Id string `json:"id,omitempty"` InsertInstant int64 `json:"insertInstant,omitempty"` - IsDefault bool `json:"isDefault"` LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` Name string `json:"name,omitempty"` + Steps []FormStep `json:"steps,omitempty"` + Type FormType `json:"type,omitempty"` } /** - * @author Daniel DeGroff + * Base class for all {@link User}-related events. + * + * @author Spencer Witt */ -type RateLimitedRequestConfiguration struct { - Enableable - Limit int `json:"limit,omitempty"` - TimePeriodInSeconds int `json:"timePeriodInSeconds,omitempty"` +type BaseUserEvent struct { + BaseEvent + User User `json:"user,omitempty"` } /** * @author Daniel DeGroff */ -type ReactorStatus struct { - AdvancedIdentityProviders ReactorFeatureStatus `json:"advancedIdentityProviders,omitempty"` - AdvancedLambdas ReactorFeatureStatus `json:"advancedLambdas,omitempty"` - AdvancedMultiFactorAuthentication ReactorFeatureStatus `json:"advancedMultiFactorAuthentication,omitempty"` - AdvancedOAuthScopes ReactorFeatureStatus `json:"advancedOAuthScopes,omitempty"` - AdvancedOAuthScopesCustomScopes ReactorFeatureStatus `json:"advancedOAuthScopesCustomScopes,omitempty"` - AdvancedOAuthScopesThirdPartyApplications ReactorFeatureStatus `json:"advancedOAuthScopesThirdPartyApplications,omitempty"` - AdvancedRegistration ReactorFeatureStatus `json:"advancedRegistration,omitempty"` - ApplicationMultiFactorAuthentication ReactorFeatureStatus `json:"applicationMultiFactorAuthentication,omitempty"` - ApplicationThemes ReactorFeatureStatus `json:"applicationThemes,omitempty"` - BreachedPasswordDetection ReactorFeatureStatus `json:"breachedPasswordDetection,omitempty"` - Connectors ReactorFeatureStatus `json:"connectors,omitempty"` - EntityManagement ReactorFeatureStatus `json:"entityManagement,omitempty"` - Expiration string `json:"expiration,omitempty"` - LicenseAttributes map[string]string `json:"licenseAttributes,omitempty"` - Licensed bool `json:"licensed"` - ScimServer ReactorFeatureStatus `json:"scimServer,omitempty"` - ThreatDetection ReactorFeatureStatus `json:"threatDetection,omitempty"` - WebAuthn ReactorFeatureStatus `json:"webAuthn,omitempty"` - WebAuthnPlatformAuthenticators ReactorFeatureStatus `json:"webAuthnPlatformAuthenticators,omitempty"` - WebAuthnRoamingAuthenticators ReactorFeatureStatus `json:"webAuthnRoamingAuthenticators,omitempty"` +type UserState string + +func (e UserState) String() string { + return string(e) } +const ( + UserState_Authenticated UserState = "Authenticated" + UserState_AuthenticatedNotRegistered UserState = "AuthenticatedNotRegistered" + UserState_AuthenticatedNotVerified UserState = "AuthenticatedNotVerified" + UserState_AuthenticatedRegistrationNotVerified UserState = "AuthenticatedRegistrationNotVerified" +) + /** - * Models a single family member. + * The system configuration for Webhook Event Log data. * - * @author Brian Pontarelli + * @author Spencer Witt */ -type FamilyMember struct { - Data map[string]interface{} `json:"data,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - Owner bool `json:"owner"` - Role FamilyRole `json:"role,omitempty"` - UserId string `json:"userId,omitempty"` -} - -type CertificateInformation struct { - Issuer string `json:"issuer,omitempty"` - Md5Fingerprint string `json:"md5Fingerprint,omitempty"` - SerialNumber string `json:"serialNumber,omitempty"` - Sha1Fingerprint string `json:"sha1Fingerprint,omitempty"` - Sha1Thumbprint string `json:"sha1Thumbprint,omitempty"` - Sha256Fingerprint string `json:"sha256Fingerprint,omitempty"` - Sha256Thumbprint string `json:"sha256Thumbprint,omitempty"` - Subject string `json:"subject,omitempty"` - ValidFrom int64 `json:"validFrom,omitempty"` - ValidTo int64 `json:"validTo,omitempty"` +type WebhookEventLogConfiguration struct { + Delete DeleteConfiguration `json:"delete,omitempty"` } /** * @author Daniel DeGroff */ -type PasswordlessStartResponse struct { - BaseHTTPResponse - Code string `json:"code,omitempty"` -} - -func (b *PasswordlessStartResponse) SetStatus(status int) { - b.StatusCode = status +type LinkedInApplicationConfiguration struct { + BaseIdentityProviderApplicationConfiguration + ButtonText string `json:"buttonText,omitempty"` + ClientId string `json:"client_id,omitempty"` + ClientSecret string `json:"client_secret,omitempty"` + Scope string `json:"scope,omitempty"` } /** - * Response for the daily active user report. + * Model a user event when a two-factor method has been removed. * - * @author Brian Pontarelli - */ -type DailyActiveUserReportResponse struct { - BaseHTTPResponse - DailyActiveUsers []Count `json:"dailyActiveUsers,omitempty"` - Total int64 `json:"total,omitempty"` -} - -func (b *DailyActiveUserReportResponse) SetStatus(status int) { - b.StatusCode = status -} - -/** * @author Daniel DeGroff */ -type VersionResponse struct { - BaseHTTPResponse - Version string `json:"version,omitempty"` -} - -func (b *VersionResponse) SetStatus(status int) { - b.StatusCode = status +type UserTwoFactorMethodAddEvent struct { + BaseUserEvent + Method TwoFactorMethod `json:"method,omitempty"` } /** - * @author Michael Sleevi + * @author Lyle Schemmerling */ -type PreviewMessageTemplateRequest struct { - Locale string `json:"locale,omitempty"` - MessageTemplate MessageTemplate `json:"messageTemplate,omitempty"` +type SAMLv2AssertionConfiguration struct { + Destination SAMLv2DestinationAssertionConfiguration `json:"destination,omitempty"` } /** - * @author Daniel DeGroff + * Theme API response object. + * + * @author Trevor Smith */ -type IssueResponse struct { +type ThemeResponse struct { BaseHTTPResponse - RefreshToken string `json:"refreshToken,omitempty"` - Token string `json:"token,omitempty"` + Theme Theme `json:"theme,omitempty"` + Themes []Theme `json:"themes,omitempty"` } -func (b *IssueResponse) SetStatus(status int) { +func (b *ThemeResponse) SetStatus(status int) { b.StatusCode = status } /** - * Response for the login report. + * The authenticator's response for the authentication ceremony in its encoded format * - * @author Brian Pontarelli + * @author Spencer Witt */ -type LoginReportResponse struct { +type WebAuthnAuthenticatorAuthenticationResponse struct { BaseHTTPResponse - HourlyCounts []Count `json:"hourlyCounts,omitempty"` - Total int64 `json:"total,omitempty"` + AuthenticatorData string `json:"authenticatorData,omitempty"` + ClientDataJSON string `json:"clientDataJSON,omitempty"` + Signature string `json:"signature,omitempty"` + UserHandle string `json:"userHandle,omitempty"` } -func (b *LoginReportResponse) SetStatus(status int) { +func (b *WebAuthnAuthenticatorAuthenticationResponse) SetStatus(status int) { b.StatusCode = status } /** * @author Daniel DeGroff */ -type HTTPMethod string - -func (e HTTPMethod) String() string { - return string(e) +type SecureGeneratorConfiguration struct { + Length int `json:"length,omitempty"` + Type SecureGeneratorType `json:"type,omitempty"` } -const ( - HTTPMethod_GET HTTPMethod = "GET" - HTTPMethod_POST HTTPMethod = "POST" - HTTPMethod_PUT HTTPMethod = "PUT" - HTTPMethod_DELETE HTTPMethod = "DELETE" - HTTPMethod_HEAD HTTPMethod = "HEAD" - HTTPMethod_OPTIONS HTTPMethod = "OPTIONS" - HTTPMethod_PATCH HTTPMethod = "PATCH" -) - /** - * @author Mikey Sleevi + * Webhook API request object. + * + * @author Brian Pontarelli */ -type Message struct { -} - -// Do not require a setter for 'type', it is defined by the concrete class and is not mutable -type BaseIdentityProvider struct { - Enableable - ApplicationConfiguration map[string]interface{} `json:"applicationConfiguration,omitempty"` - Data map[string]interface{} `json:"data,omitempty"` - Debug bool `json:"debug"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LambdaConfiguration ProviderLambdaConfiguration `json:"lambdaConfiguration,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - LinkingStrategy IdentityProviderLinkingStrategy `json:"linkingStrategy,omitempty"` - Name string `json:"name,omitempty"` - TenantConfiguration map[string]IdentityProviderTenantConfiguration `json:"tenantConfiguration,omitempty"` - Type IdentityProviderType `json:"type,omitempty"` -} - -type MultiFactorEmailMethod struct { - Enableable - TemplateId string `json:"templateId,omitempty"` +type WebhookRequest struct { + Webhook Webhook `json:"webhook,omitempty"` } /** - * @author Trevor Smith + * The Application Scope API request object. + * + * @author Spencer Witt */ -type ConnectorRequest struct { - Connector BaseConnectorConfiguration `json:"connector,omitempty"` +type ApplicationOAuthScopeRequest struct { + Scope ApplicationOAuthScope `json:"scope,omitempty"` } /** @@ -2170,42 +1942,43 @@ type UserCreateCompleteEvent struct { } /** - * A number identifying a cryptographic algorithm. Values should be registered with the IANA COSE Algorithms registry + * Models the User Password Reset Start Event. * - * @author Spencer Witt + * @author Daniel DeGroff */ -type CoseAlgorithmIdentifier string - -func (e CoseAlgorithmIdentifier) String() string { - return string(e) +type UserPasswordResetStartEvent struct { + BaseUserEvent } -const ( - CoseAlgorithmIdentifier_ES256 CoseAlgorithmIdentifier = "ES256" - CoseAlgorithmIdentifier_ES384 CoseAlgorithmIdentifier = "ES384" - CoseAlgorithmIdentifier_ES512 CoseAlgorithmIdentifier = "ES512" - CoseAlgorithmIdentifier_RS256 CoseAlgorithmIdentifier = "RS256" - CoseAlgorithmIdentifier_RS384 CoseAlgorithmIdentifier = "RS384" - CoseAlgorithmIdentifier_RS512 CoseAlgorithmIdentifier = "RS512" - CoseAlgorithmIdentifier_PS256 CoseAlgorithmIdentifier = "PS256" - CoseAlgorithmIdentifier_PS384 CoseAlgorithmIdentifier = "PS384" - CoseAlgorithmIdentifier_PS512 CoseAlgorithmIdentifier = "PS512" -) - /** - * @author andrewpai + * Webhook event log search response. + * + * @author Spencer Witt */ -type SelfServiceFormConfiguration struct { - RequireCurrentPasswordOnPasswordChange bool `json:"requireCurrentPasswordOnPasswordChange"` +type WebhookEventLogSearchResponse struct { + BaseHTTPResponse + Total int64 `json:"total,omitempty"` + WebhookEventLogs []WebhookEventLog `json:"webhookEventLogs,omitempty"` +} + +func (b *WebhookEventLogSearchResponse) SetStatus(status int) { + b.StatusCode = status } /** - * @author Daniel DeGroff + * A JavaScript lambda function that is executed during certain events inside FusionAuth. + * + * @author Brian Pontarelli */ -type RememberPreviousPasswords struct { - Enableable - Count int `json:"count,omitempty"` +type Lambda struct { + Body string `json:"body,omitempty"` + Debug bool `json:"debug"` + EngineType LambdaEngineType `json:"engineType,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + Name string `json:"name,omitempty"` + Type LambdaType `json:"type,omitempty"` } /** @@ -2218,723 +1991,636 @@ type HYPRApplicationConfiguration struct { } /** - * @author Brett Guy + * @author Daniel DeGroff */ -type KafkaMessengerConfiguration struct { - BaseMessengerConfiguration - DefaultTopic string `json:"defaultTopic,omitempty"` - Producer map[string]string `json:"producer,omitempty"` +type FormFieldValidator struct { + Enableable + Expression string `json:"expression,omitempty"` } /** - * Models the User Created Registration Event. - *

- * This is different than the user.registration.create event in that it will be sent after the user has been created. This event cannot be made - * transactional. - * * @author Daniel DeGroff */ -type UserRegistrationCreateCompleteEvent struct { - BaseUserEvent - ApplicationId string `json:"applicationId,omitempty"` - Registration UserRegistration `json:"registration,omitempty"` +type PasswordValidationRulesResponse struct { + BaseHTTPResponse + PasswordValidationRules PasswordValidationRules `json:"passwordValidationRules,omitempty"` } -/** - * @author Daniel DeGroff - */ -type LoginRecordSearchRequest struct { - RetrieveTotal bool `json:"retrieveTotal"` - Search LoginRecordSearchCriteria `json:"search,omitempty"` +func (b *PasswordValidationRulesResponse) SetStatus(status int) { + b.StatusCode = status } /** - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type KafkaConfiguration struct { +type EventConfiguration struct { + Events map[EventType]EventConfigurationData `json:"events,omitempty"` +} + +type EventConfigurationData struct { Enableable - DefaultTopic string `json:"defaultTopic,omitempty"` - Producer map[string]string `json:"producer,omitempty"` + TransactionType TransactionType `json:"transactionType,omitempty"` } /** - * This class contains the managed fields that are also put into the database during FusionAuth setup. - *

- * Internal Note: These fields are also declared in SQL in order to bootstrap the system. These need to stay in sync. - * Any changes to these fields needs to also be reflected in mysql.sql and postgresql.sql + * Models the User Deactivate Event. * * @author Brian Pontarelli */ -type ManagedFields struct { +type UserDeactivateEvent struct { + BaseUserEvent } /** - * Response for the daily active user report. + * Models the User Update Registration Event. * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type MonthlyActiveUserReportResponse struct { - BaseHTTPResponse - MonthlyActiveUsers []Count `json:"monthlyActiveUsers,omitempty"` - Total int64 `json:"total,omitempty"` -} - -func (b *MonthlyActiveUserReportResponse) SetStatus(status int) { - b.StatusCode = status +type UserRegistrationUpdateEvent struct { + BaseUserEvent + ApplicationId string `json:"applicationId,omitempty"` + Original UserRegistration `json:"original,omitempty"` + Registration UserRegistration `json:"registration,omitempty"` } /** - * @author Daniel DeGroff + * Search request for entities + * + * @author Brett Guy */ -type IdentityProviderLinkRequest struct { - BaseEventRequest - IdentityProviderLink IdentityProviderLink `json:"identityProviderLink,omitempty"` - PendingIdPLinkId string `json:"pendingIdPLinkId,omitempty"` +type EntitySearchRequest struct { + Search EntitySearchCriteria `json:"search,omitempty"` } /** - * The types of lambdas that indicate how they are invoked by FusionAuth. + * The user action request object. * * @author Brian Pontarelli */ -type LambdaType string - -func (e LambdaType) String() string { - return string(e) -} - -const ( - LambdaType_JWTPopulate LambdaType = "JWTPopulate" - LambdaType_OpenIDReconcile LambdaType = "OpenIDReconcile" - LambdaType_SAMLv2Reconcile LambdaType = "SAMLv2Reconcile" - LambdaType_SAMLv2Populate LambdaType = "SAMLv2Populate" - LambdaType_AppleReconcile LambdaType = "AppleReconcile" - LambdaType_ExternalJWTReconcile LambdaType = "ExternalJWTReconcile" - LambdaType_FacebookReconcile LambdaType = "FacebookReconcile" - LambdaType_GoogleReconcile LambdaType = "GoogleReconcile" - LambdaType_HYPRReconcile LambdaType = "HYPRReconcile" - LambdaType_TwitterReconcile LambdaType = "TwitterReconcile" - LambdaType_LDAPConnectorReconcile LambdaType = "LDAPConnectorReconcile" - LambdaType_LinkedInReconcile LambdaType = "LinkedInReconcile" - LambdaType_EpicGamesReconcile LambdaType = "EpicGamesReconcile" - LambdaType_NintendoReconcile LambdaType = "NintendoReconcile" - LambdaType_SonyPSNReconcile LambdaType = "SonyPSNReconcile" - LambdaType_SteamReconcile LambdaType = "SteamReconcile" - LambdaType_TwitchReconcile LambdaType = "TwitchReconcile" - LambdaType_XboxReconcile LambdaType = "XboxReconcile" - LambdaType_ClientCredentialsJWTPopulate LambdaType = "ClientCredentialsJWTPopulate" - LambdaType_SCIMServerGroupRequestConverter LambdaType = "SCIMServerGroupRequestConverter" - LambdaType_SCIMServerGroupResponseConverter LambdaType = "SCIMServerGroupResponseConverter" - LambdaType_SCIMServerUserRequestConverter LambdaType = "SCIMServerUserRequestConverter" - LambdaType_SCIMServerUserResponseConverter LambdaType = "SCIMServerUserResponseConverter" - LambdaType_SelfServiceRegistrationValidation LambdaType = "SelfServiceRegistrationValidation" - LambdaType_UserInfoPopulate LambdaType = "UserInfoPopulate" - LambdaType_LoginValidation LambdaType = "LoginValidation" -) - -/** - * @author Daniel DeGroff - */ -type SecureGeneratorConfiguration struct { - Length int `json:"length,omitempty"` - Type SecureGeneratorType `json:"type,omitempty"` +type ActionRequest struct { + BaseEventRequest + Action ActionData `json:"action,omitempty"` + Broadcast bool `json:"broadcast"` } -/** - * Models an LDAP connector. - * - * @author Trevor Smith - */ -type LDAPConnectorConfiguration struct { - BaseConnectorConfiguration - AuthenticationURL string `json:"authenticationURL,omitempty"` - BaseStructure string `json:"baseStructure,omitempty"` - ConnectTimeout int `json:"connectTimeout,omitempty"` - IdentifyingAttribute string `json:"identifyingAttribute,omitempty"` - LambdaConfiguration ConnectorLambdaConfiguration `json:"lambdaConfiguration,omitempty"` - LoginIdAttribute string `json:"loginIdAttribute,omitempty"` - ReadTimeout int `json:"readTimeout,omitempty"` - RequestedAttributes []string `json:"requestedAttributes,omitempty"` - SecurityMethod LDAPSecurityMethod `json:"securityMethod,omitempty"` - SystemAccountDN string `json:"systemAccountDN,omitempty"` - SystemAccountPassword string `json:"systemAccountPassword,omitempty"` +type ActionData struct { + ActioneeUserId string `json:"actioneeUserId,omitempty"` + ActionerUserId string `json:"actionerUserId,omitempty"` + ApplicationIds []string `json:"applicationIds,omitempty"` + Comment string `json:"comment,omitempty"` + EmailUser bool `json:"emailUser"` + Expiry int64 `json:"expiry,omitempty"` + NotifyUser bool `json:"notifyUser"` + Option string `json:"option,omitempty"` + ReasonId string `json:"reasonId,omitempty"` + UserActionId string `json:"userActionId,omitempty"` } /** - * External JWT-only identity provider. + * The Integration Response * - * @author Daniel DeGroff and Brian Pontarelli + * @author Daniel DeGroff */ -type ExternalJWTIdentityProvider struct { - BaseIdentityProvider - ClaimMap map[string]string `json:"claimMap,omitempty"` - DefaultKeyId string `json:"defaultKeyId,omitempty"` - Domains []string `json:"domains,omitempty"` - HeaderKeyParameter string `json:"headerKeyParameter,omitempty"` - Oauth2 IdentityProviderOauth2Configuration `json:"oauth2,omitempty"` - UniqueIdentityClaim string `json:"uniqueIdentityClaim,omitempty"` +type IntegrationResponse struct { + BaseHTTPResponse + Integrations Integrations `json:"integrations,omitempty"` } -/** - * Lambda API request object. - * - * @author Brian Pontarelli - */ -type LambdaRequest struct { - Lambda Lambda `json:"lambda,omitempty"` +func (b *IntegrationResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Models an event where a user's email is updated outside of a forgot / change password workflow. + * Models the User Password Update Event. * * @author Daniel DeGroff */ -type UserEmailUpdateEvent struct { +type UserPasswordUpdateEvent struct { BaseUserEvent - PreviousEmail string `json:"previousEmail,omitempty"` } /** - * Raw login information for each time a user logs into an application. + * Models the Group Create Event. * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type RawLogin struct { - ApplicationId string `json:"applicationId,omitempty"` - Instant int64 `json:"instant,omitempty"` - IpAddress string `json:"ipAddress,omitempty"` - UserId string `json:"userId,omitempty"` +type GroupCreateEvent struct { + BaseGroupEvent } /** - * Search response for Group Members - * * @author Daniel DeGroff */ -type GroupMemberSearchResponse struct { +type IdentityProviderResponse struct { BaseHTTPResponse - Members []GroupMember `json:"members,omitempty"` - Total int64 `json:"total,omitempty"` + IdentityProvider BaseIdentityProvider `json:"identityProvider,omitempty"` + IdentityProviders []BaseIdentityProvider `json:"identityProviders,omitempty"` } -func (b *GroupMemberSearchResponse) SetStatus(status int) { +func (b *IdentityProviderResponse) SetStatus(status int) { b.StatusCode = status } /** - * API response for retrieving Refresh Tokens + * Something that can be enabled and thus also disabled. * * @author Daniel DeGroff */ -type RefreshTokenResponse struct { - BaseHTTPResponse - RefreshToken RefreshToken `json:"refreshToken,omitempty"` - RefreshTokens []RefreshToken `json:"refreshTokens,omitempty"` +type Enableable struct { + Enabled bool `json:"enabled"` } -func (b *RefreshTokenResponse) SetStatus(status int) { - b.StatusCode = status +/** + * Models the Group Member Add Event. + * + * @author Daniel DeGroff + */ +type GroupMemberAddEvent struct { + BaseGroupEvent + Members []GroupMember `json:"members,omitempty"` } /** + * The public Status API response + * * @author Daniel DeGroff */ -type DeviceApprovalResponse struct { +type StatusResponse struct { BaseHTTPResponse - DeviceGrantStatus string `json:"deviceGrantStatus,omitempty"` - DeviceInfo DeviceInfo `json:"deviceInfo,omitempty"` - IdentityProviderLink IdentityProviderLink `json:"identityProviderLink,omitempty"` - TenantId string `json:"tenantId,omitempty"` - UserId string `json:"userId,omitempty"` + LinkedHashMap } -func (b *DeviceApprovalResponse) SetStatus(status int) { +func (b *StatusResponse) SetStatus(status int) { b.StatusCode = status } /** - * JSON Web Token (JWT) as defined by RFC 7519. - *

- * From RFC 7519 Section 1. Introduction:
- *    The suggested pronunciation of JWT is the same as the English word "jot".
- * 
- * The JWT is not Thread-Safe and should not be re-used. + * Models the User Password Reset Success Event. * * @author Daniel DeGroff */ -type JWT struct { - Aud interface{} `json:"aud,omitempty"` - Exp int64 `json:"exp,omitempty"` - Iat int64 `json:"iat,omitempty"` - Iss string `json:"iss,omitempty"` - Jti string `json:"jti,omitempty"` - Nbf int64 `json:"nbf,omitempty"` - OtherClaims map[string]interface{} `json:"otherClaims,omitempty"` - Sub string `json:"sub,omitempty"` +type UserPasswordResetSuccessEvent struct { + BaseUserEvent } /** - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type Tenantable struct { +type RefreshTokenExpirationPolicy string + +func (e RefreshTokenExpirationPolicy) String() string { + return string(e) } +const ( + RefreshTokenExpirationPolicy_Fixed RefreshTokenExpirationPolicy = "Fixed" + RefreshTokenExpirationPolicy_SlidingWindow RefreshTokenExpirationPolicy = "SlidingWindow" + RefreshTokenExpirationPolicy_SlidingWindowWithMaximumLifetime RefreshTokenExpirationPolicy = "SlidingWindowWithMaximumLifetime" +) + /** - * Used by the Relying Party to specify their requirements for authenticator attributes. Fields use the deprecated "resident key" terminology to refer - * to client-side discoverable credentials to maintain backwards compatibility with WebAuthn Level 1. - * - * @author Spencer Witt + * @author Brett Guy */ -type AuthenticatorSelectionCriteria struct { - AuthenticatorAttachment AuthenticatorAttachment `json:"authenticatorAttachment,omitempty"` - RequireResidentKey bool `json:"requireResidentKey"` - ResidentKey ResidentKeyRequirement `json:"residentKey,omitempty"` - UserVerification UserVerificationRequirement `json:"userVerification,omitempty"` +type KafkaMessengerConfiguration struct { + BaseMessengerConfiguration + DefaultTopic string `json:"defaultTopic,omitempty"` + Producer map[string]string `json:"producer,omitempty"` } /** - * @author Daniel DeGroff + * Models the User Password Breach Event. + * + * @author Matthew Altman */ -type ApplicationWebAuthnWorkflowConfiguration struct { - Enableable +type UserPasswordBreachEvent struct { + BaseUserEvent } /** - * Used to communicate whether and how authenticator attestation should be delivered to the Relying Party + * The use type of a key. * - * @author Spencer Witt + * @author Daniel DeGroff */ -type AttestationConveyancePreference string +type KeyUse string -func (e AttestationConveyancePreference) String() string { +func (e KeyUse) String() string { return string(e) } const ( - AttestationConveyancePreference_None AttestationConveyancePreference = "none" - AttestationConveyancePreference_Indirect AttestationConveyancePreference = "indirect" - AttestationConveyancePreference_Direct AttestationConveyancePreference = "direct" - AttestationConveyancePreference_Enterprise AttestationConveyancePreference = "enterprise" + KeyUse_SignOnly KeyUse = "SignOnly" + KeyUse_SignAndVerify KeyUse = "SignAndVerify" + KeyUse_VerifyOnly KeyUse = "VerifyOnly" ) /** - * SAML v2 identity provider configuration. + * @author Daniel DeGroff + */ +type ApplicationWebAuthnWorkflowConfiguration struct { + Enableable +} + +/** + * Models an entity type that has a specific set of permissions. These are global objects and can be used across tenants. * * @author Brian Pontarelli */ -type SAMLv2IdentityProvider struct { - BaseSAMLv2IdentityProvider - AssertionConfiguration SAMLv2AssertionConfiguration `json:"assertionConfiguration,omitempty"` - ButtonImageURL string `json:"buttonImageURL,omitempty"` - ButtonText string `json:"buttonText,omitempty"` - Domains []string `json:"domains,omitempty"` - IdpEndpoint string `json:"idpEndpoint,omitempty"` - IdpInitiatedConfiguration SAMLv2IdpInitiatedConfiguration `json:"idpInitiatedConfiguration,omitempty"` - Issuer string `json:"issuer,omitempty"` - LoginHintConfiguration LoginHintConfiguration `json:"loginHintConfiguration,omitempty"` - NameIdFormat string `json:"nameIdFormat,omitempty"` - PostRequest bool `json:"postRequest"` - RequestSigningKeyId string `json:"requestSigningKeyId,omitempty"` - SignRequest bool `json:"signRequest"` - XmlSignatureC14nMethod CanonicalizationMethod `json:"xmlSignatureC14nMethod,omitempty"` +type EntityType struct { + Data map[string]interface{} `json:"data,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + JwtConfiguration EntityJWTConfiguration `json:"jwtConfiguration,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + Name string `json:"name,omitempty"` + Permissions []EntityTypePermission `json:"permissions,omitempty"` } /** - * Facebook social login provider. + * JWT Configuration for entities. + */ +type EntityJWTConfiguration struct { + Enableable + AccessTokenKeyId string `json:"accessTokenKeyId,omitempty"` + TimeToLiveInSeconds int `json:"timeToLiveInSeconds,omitempty"` +} + +/** + * Search criteria for Consents * - * @author Brian Pontarelli + * @author Spencer Witt */ -type FacebookIdentityProvider struct { - BaseIdentityProvider - AppId string `json:"appId,omitempty"` - ButtonText string `json:"buttonText,omitempty"` - ClientSecret string `json:"client_secret,omitempty"` - Fields string `json:"fields,omitempty"` - LoginMethod IdentityProviderLoginMethod `json:"loginMethod,omitempty"` - Permissions string `json:"permissions,omitempty"` +type ConsentSearchCriteria struct { + BaseSearchCriteria + Name string `json:"name,omitempty"` } /** - * An expandable API request. + * Models the Group Member Update Complete Event. * * @author Daniel DeGroff */ -type ExpandableRequest struct { - Expand []string `json:"expand,omitempty"` +type GroupMemberUpdateCompleteEvent struct { + BaseGroupEvent + Members []GroupMember `json:"members,omitempty"` } /** - * Interface for all identity providers that can be domain based. + * A policy for deleting Users based upon some external criteria. + * + * @author Trevor Smith */ -type DomainBasedIdentityProvider struct { +type TimeBasedDeletePolicy struct { + Enableable + EnabledInstant int64 `json:"enabledInstant,omitempty"` + NumberOfDaysToRetain int `json:"numberOfDaysToRetain,omitempty"` +} + +/** + * Raw login information for each time a user logs into an application. + * + * @author Brian Pontarelli + */ +type RawLogin struct { + ApplicationId string `json:"applicationId,omitempty"` + Instant int64 `json:"instant,omitempty"` + IpAddress string `json:"ipAddress,omitempty"` + UserId string `json:"userId,omitempty"` } /** * @author Daniel DeGroff */ -type ObjectState string +type BreachedPasswordStatus string -func (e ObjectState) String() string { +func (e BreachedPasswordStatus) String() string { return string(e) } const ( - ObjectState_Active ObjectState = "Active" - ObjectState_Inactive ObjectState = "Inactive" - ObjectState_PendingDelete ObjectState = "PendingDelete" + BreachedPasswordStatus_None BreachedPasswordStatus = "None" + BreachedPasswordStatus_ExactMatch BreachedPasswordStatus = "ExactMatch" + BreachedPasswordStatus_SubAddressMatch BreachedPasswordStatus = "SubAddressMatch" + BreachedPasswordStatus_PasswordOnly BreachedPasswordStatus = "PasswordOnly" + BreachedPasswordStatus_CommonPassword BreachedPasswordStatus = "CommonPassword" ) /** - * Email template request. + * Base class for all FusionAuth events. * * @author Brian Pontarelli */ -type EmailTemplateRequest struct { - EmailTemplate EmailTemplate `json:"emailTemplate,omitempty"` +type BaseEvent struct { + CreateInstant int64 `json:"createInstant,omitempty"` + Id string `json:"id,omitempty"` + Info EventInfo `json:"info,omitempty"` + TenantId string `json:"tenantId,omitempty"` + Type EventType `json:"type,omitempty"` } /** - * API response for completing WebAuthn credential registration or assertion + * @author Daniel DeGroff + */ +type SystemTrustedProxyConfiguration struct { + Trusted []string `json:"trusted,omitempty"` + TrustPolicy SystemTrustedProxyConfigurationPolicy `json:"trustPolicy,omitempty"` +} + +/** + * Authentication key response object. * - * @author Spencer Witt + * @author Sanjay */ -type WebAuthnRegisterCompleteResponse struct { +type APIKeyResponse struct { BaseHTTPResponse - Credential WebAuthnCredential `json:"credential,omitempty"` + ApiKey APIKey `json:"apiKey,omitempty"` } -func (b *WebAuthnRegisterCompleteResponse) SetStatus(status int) { +func (b *APIKeyResponse) SetStatus(status int) { b.StatusCode = status } -type IdentityProviderDetails struct { - ApplicationIds []string `json:"applicationIds,omitempty"` - Id string `json:"id,omitempty"` - IdpEndpoint string `json:"idpEndpoint,omitempty"` - Name string `json:"name,omitempty"` - Oauth2 IdentityProviderOauth2Configuration `json:"oauth2,omitempty"` - Type IdentityProviderType `json:"type,omitempty"` +/** + * @author Daniel DeGroff + */ +type LoginRecordExportRequest struct { + BaseExportRequest + Criteria LoginRecordSearchCriteria `json:"criteria,omitempty"` } /** - * @author Brett Pontarelli + * Search criteria for the webhook event log. + * + * @author Spencer Witt */ -type AuthenticationThreats string - -func (e AuthenticationThreats) String() string { - return string(e) +type WebhookEventLogSearchCriteria struct { + BaseSearchCriteria + End int64 `json:"end,omitempty"` + Event string `json:"event,omitempty"` + EventResult WebhookEventResult `json:"eventResult,omitempty"` + EventType EventType `json:"eventType,omitempty"` + Start int64 `json:"start,omitempty"` } -const ( - AuthenticationThreats_ImpossibleTravel AuthenticationThreats = "ImpossibleTravel" -) - /** + * Application-level configuration for WebAuthn + * * @author Daniel DeGroff */ -type TenantRequest struct { - BaseEventRequest - SourceTenantId string `json:"sourceTenantId,omitempty"` - Tenant Tenant `json:"tenant,omitempty"` - WebhookIds []string `json:"webhookIds,omitempty"` +type ApplicationWebAuthnConfiguration struct { + Enableable + BootstrapWorkflow ApplicationWebAuthnWorkflowConfiguration `json:"bootstrapWorkflow,omitempty"` + ReauthenticationWorkflow ApplicationWebAuthnWorkflowConfiguration `json:"reauthenticationWorkflow,omitempty"` } /** - * @author Brett Guy + * @author Daniel DeGroff */ -type IPAccessControlListSearchCriteria struct { - BaseSearchCriteria - Name string `json:"name,omitempty"` +type VerifyEmailRequest struct { + BaseEventRequest + OneTimeCode string `json:"oneTimeCode,omitempty"` + UserId string `json:"userId,omitempty"` + VerificationId string `json:"verificationId,omitempty"` } /** * @author Daniel DeGroff */ -type AppleApplicationConfiguration struct { - BaseIdentityProviderApplicationConfiguration - BundleId string `json:"bundleId,omitempty"` - ButtonText string `json:"buttonText,omitempty"` - KeyId string `json:"keyId,omitempty"` - Scope string `json:"scope,omitempty"` - ServicesId string `json:"servicesId,omitempty"` - TeamId string `json:"teamId,omitempty"` +type SecureIdentity struct { + BreachedPasswordLastCheckedInstant int64 `json:"breachedPasswordLastCheckedInstant,omitempty"` + BreachedPasswordStatus BreachedPasswordStatus `json:"breachedPasswordStatus,omitempty"` + ConnectorId string `json:"connectorId,omitempty"` + EncryptionScheme string `json:"encryptionScheme,omitempty"` + Factor int `json:"factor,omitempty"` + Id string `json:"id,omitempty"` + LastLoginInstant int64 `json:"lastLoginInstant,omitempty"` + Password string `json:"password,omitempty"` + PasswordChangeReason ChangePasswordReason `json:"passwordChangeReason,omitempty"` + PasswordChangeRequired bool `json:"passwordChangeRequired"` + PasswordLastUpdateInstant int64 `json:"passwordLastUpdateInstant,omitempty"` + Salt string `json:"salt,omitempty"` + UniqueUsername string `json:"uniqueUsername,omitempty"` + Username string `json:"username,omitempty"` + UsernameStatus ContentStatus `json:"usernameStatus,omitempty"` + Verified bool `json:"verified"` + VerifiedInstant int64 `json:"verifiedInstant,omitempty"` } /** - * @author Spencer Witt + * @author Daniel DeGroff */ -type TenantWebAuthnWorkflowConfiguration struct { - Enableable - AuthenticatorAttachmentPreference AuthenticatorAttachmentPreference `json:"authenticatorAttachmentPreference,omitempty"` - UserVerificationRequirement UserVerificationRequirement `json:"userVerificationRequirement,omitempty"` +type FormControl string + +func (e FormControl) String() string { + return string(e) } +const ( + FormControl_Checkbox FormControl = "checkbox" + FormControl_Number FormControl = "number" + FormControl_Password FormControl = "password" + FormControl_Radio FormControl = "radio" + FormControl_Select FormControl = "select" + FormControl_Textarea FormControl = "textarea" + FormControl_Text FormControl = "text" +) + /** - * Model a user event when a two-factor method has been added. + * A raw login record response * * @author Daniel DeGroff */ -type UserTwoFactorMethodRemoveEvent struct { - BaseUserEvent - Method TwoFactorMethod `json:"method,omitempty"` +type LoginRecordSearchResponse struct { + BaseHTTPResponse + Logins []DisplayableRawLogin `json:"logins,omitempty"` + Total int64 `json:"total,omitempty"` } -type UsernameModeration struct { - Enableable - ApplicationId string `json:"applicationId,omitempty"` +func (b *LoginRecordSearchResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Authentication key request object. + * Response for the registration report. * - * @author Sanjay + * @author Brian Pontarelli */ -type APIKeyRequest struct { - ApiKey APIKey `json:"apiKey,omitempty"` - SourceKeyId string `json:"sourceKeyId,omitempty"` +type RegistrationReportResponse struct { + BaseHTTPResponse + HourlyCounts []Count `json:"hourlyCounts,omitempty"` + Total int64 `json:"total,omitempty"` } -type EventConfigurationData struct { - Enableable - TransactionType TransactionType `json:"transactionType,omitempty"` +func (b *RegistrationReportResponse) SetStatus(status int) { + b.StatusCode = status } /** - * The authenticator's response for the registration ceremony in its encoded format + * Forgot password response object. * - * @author Spencer Witt + * @author Daniel DeGroff */ -type WebAuthnAuthenticatorRegistrationResponse struct { +type ForgotPasswordResponse struct { BaseHTTPResponse - AttestationObject string `json:"attestationObject,omitempty"` - ClientDataJSON string `json:"clientDataJSON,omitempty"` + ChangePasswordId string `json:"changePasswordId,omitempty"` } -func (b *WebAuthnAuthenticatorRegistrationResponse) SetStatus(status int) { +func (b *ForgotPasswordResponse) SetStatus(status int) { b.StatusCode = status } /** + * Models a User consent. + * * @author Daniel DeGroff */ -type PasswordlessLoginRequest struct { - BaseLoginRequest - Code string `json:"code,omitempty"` - TwoFactorTrustId string `json:"twoFactorTrustId,omitempty"` +type UserConsent struct { + Consent Consent `json:"consent,omitempty"` + ConsentId string `json:"consentId,omitempty"` + Data map[string]interface{} `json:"data,omitempty"` + GiverUserId string `json:"giverUserId,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + Status ConsentStatus `json:"status,omitempty"` + UserId string `json:"userId,omitempty"` + Values []string `json:"values,omitempty"` } /** - * Search criteria for Consents + * Twitch gaming login provider. * - * @author Spencer Witt + * @author Brett Pontarelli */ -type ConsentSearchCriteria struct { - BaseSearchCriteria - Name string `json:"name,omitempty"` +type TwitchIdentityProvider struct { + BaseIdentityProvider + ButtonText string `json:"buttonText,omitempty"` + ClientId string `json:"client_id,omitempty"` + ClientSecret string `json:"client_secret,omitempty"` + Scope string `json:"scope,omitempty"` } /** - * JWT Configuration. A JWT Configuration for an Application may not be active if it is using the global configuration, the configuration - * may be enabled = false. - * * @author Daniel DeGroff */ -type JWTConfiguration struct { - Enableable - AccessTokenKeyId string `json:"accessTokenKeyId,omitempty"` - IdTokenKeyId string `json:"idTokenKeyId,omitempty"` - RefreshTokenExpirationPolicy RefreshTokenExpirationPolicy `json:"refreshTokenExpirationPolicy,omitempty"` - RefreshTokenRevocationPolicy RefreshTokenRevocationPolicy `json:"refreshTokenRevocationPolicy,omitempty"` - RefreshTokenSlidingWindowConfiguration RefreshTokenSlidingWindowConfiguration `json:"refreshTokenSlidingWindowConfiguration,omitempty"` - RefreshTokenTimeToLiveInMinutes int `json:"refreshTokenTimeToLiveInMinutes,omitempty"` - RefreshTokenUsagePolicy RefreshTokenUsagePolicy `json:"refreshTokenUsagePolicy,omitempty"` - TimeToLiveInSeconds int `json:"timeToLiveInSeconds,omitempty"` +type IdentityProviderStartLoginResponse struct { + BaseHTTPResponse + Code string `json:"code,omitempty"` } -type EmailTemplateErrors struct { - ParseErrors map[string]string `json:"parseErrors,omitempty"` - RenderErrors map[string]string `json:"renderErrors,omitempty"` +func (b *IdentityProviderStartLoginResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Models the User Login event that is suspicious. + * Form response. * * @author Daniel DeGroff */ -type UserLoginSuspiciousEvent struct { - UserLoginSuccessEvent - ThreatsDetected []AuthenticationThreats `json:"threatsDetected,omitempty"` +type FormRequest struct { + Form Form `json:"form,omitempty"` } /** - * Describes the Relying Party's requirements for client-side - * discoverable credentials (formerly known as "resident keys") + * Tenant search response * - * @author Spencer Witt + * @author Mark Manes */ -type ResidentKeyRequirement string - -func (e ResidentKeyRequirement) String() string { - return string(e) +type TenantSearchResponse struct { + BaseHTTPResponse + Tenants []Tenant `json:"tenants,omitempty"` + Total int64 `json:"total,omitempty"` } -const ( - ResidentKeyRequirement_Discouraged ResidentKeyRequirement = "discouraged" - ResidentKeyRequirement_Preferred ResidentKeyRequirement = "preferred" - ResidentKeyRequirement_Required ResidentKeyRequirement = "required" -) - -/** - * @author Daniel DeGroff - */ -type TestEvent struct { - BaseEvent - Message string `json:"message,omitempty"` +func (b *TenantSearchResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Webhook API response object. + * Key API request object. * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type WebhookResponse struct { - BaseHTTPResponse - Webhook Webhook `json:"webhook,omitempty"` - Webhooks []Webhook `json:"webhooks,omitempty"` -} - -func (b *WebhookResponse) SetStatus(status int) { - b.StatusCode = status +type KeyRequest struct { + Key Key `json:"key,omitempty"` } /** - * Information about a user event (login, register, etc) that helps identify the source of the event (location, device type, OS, etc). + * Models an event where a user is being updated and tries to use an "in-use" login Id (email or username). * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type EventInfo struct { - Data map[string]interface{} `json:"data,omitempty"` - DeviceDescription string `json:"deviceDescription,omitempty"` - DeviceName string `json:"deviceName,omitempty"` - DeviceType string `json:"deviceType,omitempty"` - IpAddress string `json:"ipAddress,omitempty"` - Location Location `json:"location,omitempty"` - Os string `json:"os,omitempty"` - UserAgent string `json:"userAgent,omitempty"` +type UserLoginIdDuplicateOnUpdateEvent struct { + UserLoginIdDuplicateOnCreateEvent } /** - * Lambda API response object. + * Location information. Useful for IP addresses and other displayable data objects. * * @author Brian Pontarelli */ -type LambdaResponse struct { - BaseHTTPResponse - Lambda Lambda `json:"lambda,omitempty"` - Lambdas []Lambda `json:"lambdas,omitempty"` -} - -func (b *LambdaResponse) SetStatus(status int) { - b.StatusCode = status +type Location struct { + City string `json:"city,omitempty"` + Country string `json:"country,omitempty"` + DisplayString string `json:"displayString,omitempty"` + Latitude float64 `json:"latitude,omitempty"` + Longitude float64 `json:"longitude,omitempty"` + Region string `json:"region,omitempty"` + Zipcode string `json:"zipcode,omitempty"` } /** * @author Brett Guy */ -type ClientAuthenticationPolicy string - -func (e ClientAuthenticationPolicy) String() string { - return string(e) +type IPAccessControlListRequest struct { + IpAccessControlList IPAccessControlList `json:"ipAccessControlList,omitempty"` } -const ( - ClientAuthenticationPolicy_Required ClientAuthenticationPolicy = "Required" - ClientAuthenticationPolicy_NotRequired ClientAuthenticationPolicy = "NotRequired" - ClientAuthenticationPolicy_NotRequiredWhenUsingPKCE ClientAuthenticationPolicy = "NotRequiredWhenUsingPKCE" -) - /** - * @author Daniel DeGroff + * Controls the policy for whether OAuth workflows will more strictly adhere to the OAuth and OIDC specification + * or run in backwards compatibility mode. + * + * @author David Charles */ -type RefreshTokenUsagePolicy string +type OAuthScopeHandlingPolicy string -func (e RefreshTokenUsagePolicy) String() string { +func (e OAuthScopeHandlingPolicy) String() string { return string(e) } const ( - RefreshTokenUsagePolicy_Reusable RefreshTokenUsagePolicy = "Reusable" - RefreshTokenUsagePolicy_OneTimeUse RefreshTokenUsagePolicy = "OneTimeUse" + OAuthScopeHandlingPolicy_Compatibility OAuthScopeHandlingPolicy = "Compatibility" + OAuthScopeHandlingPolicy_Strict OAuthScopeHandlingPolicy = "Strict" ) /** - * Container for the event information. This is the JSON that is sent from FusionAuth to webhooks. + * Import request. * * @author Brian Pontarelli */ -type EventRequest struct { - Event BaseEvent `json:"event,omitempty"` -} - -/** - * Available Integrations - * - * @author Daniel DeGroff - */ -type Integrations struct { - Cleanspeak CleanSpeakConfiguration `json:"cleanspeak,omitempty"` - Kafka KafkaConfiguration `json:"kafka,omitempty"` +type ImportRequest struct { + BaseEventRequest + EncryptionScheme string `json:"encryptionScheme,omitempty"` + Factor int `json:"factor,omitempty"` + Users []User `json:"users,omitempty"` + ValidateDbConstraints bool `json:"validateDbConstraints"` } /** - * Models the User Password Update Event. + * Models an event where a user's email is updated outside of a forgot / change password workflow. * * @author Daniel DeGroff */ -type UserPasswordUpdateEvent struct { +type UserEmailUpdateEvent struct { BaseUserEvent + PreviousEmail string `json:"previousEmail,omitempty"` } /** - * Standard error domain object that can also be used as the response from an API call. - * - * @author Brian Pontarelli - */ -type Errors struct { - FieldErrors map[string][]Error `json:"fieldErrors,omitempty"` - GeneralErrors []Error `json:"generalErrors,omitempty"` -} - -func (e Errors) Present() bool { - return len(e.FieldErrors) != 0 || len(e.GeneralErrors) != 0 -} - -func (e Errors) Error() string { - var messages []string - for _, generalError := range e.GeneralErrors { - messages = append(messages, generalError.Message) - } - for fieldName, fieldErrors := range e.FieldErrors { - var fieldMessages []string - for _, fieldError := range fieldErrors { - fieldMessages = append(fieldMessages, fieldError.Message) - } - messages = append(messages, fmt.Sprintf("%s: %s", fieldName, strings.Join(fieldMessages, ","))) - } - return strings.Join(messages, " ") -} - -/** - * @author Michael Sleevi + * @author Lyle Schemmerling */ -type PreviewMessageTemplateResponse struct { - BaseHTTPResponse - Errors Errors `json:"errors,omitempty"` - Message SMSMessage `json:"message,omitempty"` -} - -func (b *PreviewMessageTemplateResponse) SetStatus(status int) { - b.StatusCode = status +type SAMLv2DestinationAssertionConfiguration struct { + Alternates []string `json:"alternates,omitempty"` + Policy SAMLv2DestinationAssertionPolicy `json:"policy,omitempty"` } /** @@ -2955,1387 +2641,1622 @@ const ( ) /** + * Models the User Login Success Event. + * * @author Daniel DeGroff */ -type TenantFormConfiguration struct { - AdminUserFormId string `json:"adminUserFormId,omitempty"` -} - -type DeviceType string - -func (e DeviceType) String() string { - return string(e) +type UserLoginSuccessEvent struct { + BaseUserEvent + ApplicationId string `json:"applicationId,omitempty"` + AuthenticationType string `json:"authenticationType,omitempty"` + ConnectorId string `json:"connectorId,omitempty"` + IdentityProviderId string `json:"identityProviderId,omitempty"` + IdentityProviderName string `json:"identityProviderName,omitempty"` + IpAddress string `json:"ipAddress,omitempty"` } -const ( - DeviceType_BROWSER DeviceType = "BROWSER" - DeviceType_DESKTOP DeviceType = "DESKTOP" - DeviceType_LAPTOP DeviceType = "LAPTOP" - DeviceType_MOBILE DeviceType = "MOBILE" - DeviceType_OTHER DeviceType = "OTHER" - DeviceType_SERVER DeviceType = "SERVER" - DeviceType_TABLET DeviceType = "TABLET" - DeviceType_TV DeviceType = "TV" - DeviceType_UNKNOWN DeviceType = "UNKNOWN" -) - /** - * Event log used internally by FusionAuth to help developers debug hooks, Webhooks, email templates, etc. + * Models the User Update Registration Event. + *

+ * This is different than user.registration.update in that it is sent after this event completes, this cannot be transactional. * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type EventLog struct { - Id int64 `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - Message string `json:"message,omitempty"` - Type EventLogType `json:"type,omitempty"` +type UserRegistrationUpdateCompleteEvent struct { + BaseUserEvent + ApplicationId string `json:"applicationId,omitempty"` + Original UserRegistration `json:"original,omitempty"` + Registration UserRegistration `json:"registration,omitempty"` } /** - * This class is a simple attachment with a byte array, name and MIME type. + * Group API response object. * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type Attachment struct { - Attachment []byte `json:"attachment,omitempty"` - Mime string `json:"mime,omitempty"` - Name string `json:"name,omitempty"` +type GroupResponse struct { + BaseHTTPResponse + Group Group `json:"group,omitempty"` + Groups []Group `json:"groups,omitempty"` +} + +func (b *GroupResponse) SetStatus(status int) { + b.StatusCode = status } /** - * A grant for an entity to a user or another entity. - * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type EntityGrant struct { - Data map[string]interface{} `json:"data,omitempty"` - Entity Entity `json:"entity,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - Permissions []string `json:"permissions,omitempty"` - RecipientEntityId string `json:"recipientEntityId,omitempty"` - UserId string `json:"userId,omitempty"` +type GoogleApplicationConfiguration struct { + BaseIdentityProviderApplicationConfiguration + ButtonText string `json:"buttonText,omitempty"` + ClientId string `json:"client_id,omitempty"` + ClientSecret string `json:"client_secret,omitempty"` + LoginMethod IdentityProviderLoginMethod `json:"loginMethod,omitempty"` + Properties GoogleIdentityProviderProperties `json:"properties,omitempty"` + Scope string `json:"scope,omitempty"` } /** - * User comment search response + * Event Log Type * - * @author Spencer Witt + * @author Daniel DeGroff */ -type UserCommentSearchResponse struct { - BaseHTTPResponse - Total int64 `json:"total,omitempty"` - UserComments []UserComment `json:"userComments,omitempty"` -} +type EventLogType string -func (b *UserCommentSearchResponse) SetStatus(status int) { - b.StatusCode = status +func (e EventLogType) String() string { + return string(e) } +const ( + EventLogType_Information EventLogType = "Information" + EventLogType_Debug EventLogType = "Debug" + EventLogType_Error EventLogType = "Error" +) + /** - * @author Brett Pontarelli + * The transaction types for Webhooks and other event systems within FusionAuth. + * + * @author Brian Pontarelli */ -type CaptchaMethod string +type TransactionType string -func (e CaptchaMethod) String() string { +func (e TransactionType) String() string { return string(e) } const ( - CaptchaMethod_GoogleRecaptchaV2 CaptchaMethod = "GoogleRecaptchaV2" - CaptchaMethod_GoogleRecaptchaV3 CaptchaMethod = "GoogleRecaptchaV3" - CaptchaMethod_HCaptcha CaptchaMethod = "HCaptcha" - CaptchaMethod_HCaptchaEnterprise CaptchaMethod = "HCaptchaEnterprise" + TransactionType_None TransactionType = "None" + TransactionType_Any TransactionType = "Any" + TransactionType_SimpleMajority TransactionType = "SimpleMajority" + TransactionType_SuperMajority TransactionType = "SuperMajority" + TransactionType_AbsoluteMajority TransactionType = "AbsoluteMajority" ) /** - * @author Seth Musselman + * @author Daniel DeGroff */ -type Application struct { - AccessControlConfiguration ApplicationAccessControlConfiguration `json:"accessControlConfiguration,omitempty"` - Active bool `json:"active"` - AuthenticationTokenConfiguration AuthenticationTokenConfiguration `json:"authenticationTokenConfiguration,omitempty"` - CleanSpeakConfiguration CleanSpeakConfiguration `json:"cleanSpeakConfiguration,omitempty"` - Data map[string]interface{} `json:"data,omitempty"` - EmailConfiguration ApplicationEmailConfiguration `json:"emailConfiguration,omitempty"` - ExternalIdentifierConfiguration ApplicationExternalIdentifierConfiguration `json:"externalIdentifierConfiguration,omitempty"` - FormConfiguration ApplicationFormConfiguration `json:"formConfiguration,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - JwtConfiguration JWTConfiguration `json:"jwtConfiguration,omitempty"` - LambdaConfiguration LambdaConfiguration `json:"lambdaConfiguration,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - LoginConfiguration LoginConfiguration `json:"loginConfiguration,omitempty"` - MultiFactorConfiguration ApplicationMultiFactorConfiguration `json:"multiFactorConfiguration,omitempty"` - Name string `json:"name,omitempty"` - OauthConfiguration OAuth2Configuration `json:"oauthConfiguration,omitempty"` - PasswordlessConfiguration PasswordlessConfiguration `json:"passwordlessConfiguration,omitempty"` - RegistrationConfiguration RegistrationConfiguration `json:"registrationConfiguration,omitempty"` - RegistrationDeletePolicy ApplicationRegistrationDeletePolicy `json:"registrationDeletePolicy,omitempty"` - Roles []ApplicationRole `json:"roles,omitempty"` - Samlv2Configuration SAMLv2Configuration `json:"samlv2Configuration,omitempty"` - Scopes []ApplicationOAuthScope `json:"scopes,omitempty"` - State ObjectState `json:"state,omitempty"` - TenantId string `json:"tenantId,omitempty"` - ThemeId string `json:"themeId,omitempty"` - Unverified RegistrationUnverifiedOptions `json:"unverified,omitempty"` - VerificationEmailTemplateId string `json:"verificationEmailTemplateId,omitempty"` - VerificationStrategy VerificationStrategy `json:"verificationStrategy,omitempty"` - VerifyRegistration bool `json:"verifyRegistration"` - WebAuthnConfiguration ApplicationWebAuthnConfiguration `json:"webAuthnConfiguration,omitempty"` +type TenantFormConfiguration struct { + AdminUserFormId string `json:"adminUserFormId,omitempty"` } /** - * @author Daniel DeGroff + * Facebook social login provider. + * + * @author Brian Pontarelli */ -type SortField struct { - Missing string `json:"missing,omitempty"` - Name string `json:"name,omitempty"` - Order Sort `json:"order,omitempty"` +type FacebookIdentityProvider struct { + BaseIdentityProvider + AppId string `json:"appId,omitempty"` + ButtonText string `json:"buttonText,omitempty"` + ClientSecret string `json:"client_secret,omitempty"` + Fields string `json:"fields,omitempty"` + LoginMethod IdentityProviderLoginMethod `json:"loginMethod,omitempty"` + Permissions string `json:"permissions,omitempty"` } /** - * SAML v2 IdP Initiated identity provider configuration. + * Request for the system configuration API. * - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type SAMLv2IdPInitiatedIdentityProvider struct { - BaseSAMLv2IdentityProvider - Issuer string `json:"issuer,omitempty"` +type SystemConfigurationRequest struct { + SystemConfiguration SystemConfiguration `json:"systemConfiguration,omitempty"` } /** - * Search criteria for the event log. + * Email template search response * - * @author Brian Pontarelli + * @author Mark Manes */ -type EventLogSearchCriteria struct { - BaseSearchCriteria - End int64 `json:"end,omitempty"` - Message string `json:"message,omitempty"` - Start int64 `json:"start,omitempty"` - Type EventLogType `json:"type,omitempty"` +type EmailTemplateSearchResponse struct { + BaseHTTPResponse + EmailTemplates []EmailTemplate `json:"emailTemplates,omitempty"` + Total int64 `json:"total,omitempty"` } -type KeyAlgorithm string +func (b *EmailTemplateSearchResponse) SetStatus(status int) { + b.StatusCode = status +} -func (e KeyAlgorithm) String() string { +/** + * @author Daniel DeGroff + */ +type EmailUnverifiedOptions struct { + AllowEmailChangeWhenGated bool `json:"allowEmailChangeWhenGated"` + Behavior UnverifiedBehavior `json:"behavior,omitempty"` +} + +/** + * COSE key type + * + * @author Spencer Witt + */ +type CoseKeyType string + +func (e CoseKeyType) String() string { return string(e) } const ( - KeyAlgorithm_ES256 KeyAlgorithm = "ES256" - KeyAlgorithm_ES384 KeyAlgorithm = "ES384" - KeyAlgorithm_ES512 KeyAlgorithm = "ES512" - KeyAlgorithm_HS256 KeyAlgorithm = "HS256" - KeyAlgorithm_HS384 KeyAlgorithm = "HS384" - KeyAlgorithm_HS512 KeyAlgorithm = "HS512" - KeyAlgorithm_RS256 KeyAlgorithm = "RS256" - KeyAlgorithm_RS384 KeyAlgorithm = "RS384" - KeyAlgorithm_RS512 KeyAlgorithm = "RS512" + CoseKeyType_Reserved CoseKeyType = "Reserved" + CoseKeyType_OKP CoseKeyType = "OKP" + CoseKeyType_EC2 CoseKeyType = "EC2" + CoseKeyType_RSA CoseKeyType = "RSA" + CoseKeyType_Symmetric CoseKeyType = "Symmetric" ) /** - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type JWTVendResponse struct { +type FamilyConfiguration struct { + Enableable + AllowChildRegistrations bool `json:"allowChildRegistrations"` + ConfirmChildEmailTemplateId string `json:"confirmChildEmailTemplateId,omitempty"` + DeleteOrphanedAccounts bool `json:"deleteOrphanedAccounts"` + DeleteOrphanedAccountsDays int `json:"deleteOrphanedAccountsDays,omitempty"` + FamilyRequestEmailTemplateId string `json:"familyRequestEmailTemplateId,omitempty"` + MaximumChildAge int `json:"maximumChildAge,omitempty"` + MinimumOwnerAge int `json:"minimumOwnerAge,omitempty"` + ParentEmailRequired bool `json:"parentEmailRequired"` + ParentRegistrationEmailTemplateId string `json:"parentRegistrationEmailTemplateId,omitempty"` +} + +/** + * API response for completing WebAuthn credential registration or assertion + * + * @author Spencer Witt + */ +type WebAuthnRegisterCompleteResponse struct { BaseHTTPResponse - Token string `json:"token,omitempty"` + Credential WebAuthnCredential `json:"credential,omitempty"` } -func (b *JWTVendResponse) SetStatus(status int) { +func (b *WebAuthnRegisterCompleteResponse) SetStatus(status int) { b.StatusCode = status } /** - * Reindex API request - * * @author Daniel DeGroff */ -type ReindexRequest struct { - Index string `json:"index,omitempty"` +type TwoFactorStatusResponse struct { + BaseHTTPResponse + Trusts []TwoFactorTrust `json:"trusts,omitempty"` + TwoFactorTrustId string `json:"twoFactorTrustId,omitempty"` +} + +func (b *TwoFactorStatusResponse) SetStatus(status int) { + b.StatusCode = status +} + +type TwoFactorTrust struct { + ApplicationId string `json:"applicationId,omitempty"` + Expiration int64 `json:"expiration,omitempty"` + StartInstant int64 `json:"startInstant,omitempty"` } /** - * Entity grant API response object. - * * @author Brian Pontarelli */ -type EntityGrantResponse struct { +type PendingResponse struct { BaseHTTPResponse - Grant EntityGrant `json:"grant,omitempty"` - Grants []EntityGrant `json:"grants,omitempty"` + Users []User `json:"users,omitempty"` } -func (b *EntityGrantResponse) SetStatus(status int) { +func (b *PendingResponse) SetStatus(status int) { b.StatusCode = status } -type RegistrationConfiguration struct { - Enableable - BirthDate Requirable `json:"birthDate,omitempty"` - ConfirmPassword bool `json:"confirmPassword"` - FirstName Requirable `json:"firstName,omitempty"` - FormId string `json:"formId,omitempty"` - FullName Requirable `json:"fullName,omitempty"` - LastName Requirable `json:"lastName,omitempty"` - LoginIdType LoginIdType `json:"loginIdType,omitempty"` - MiddleName Requirable `json:"middleName,omitempty"` - MobilePhone Requirable `json:"mobilePhone,omitempty"` - PreferredLanguages Requirable `json:"preferredLanguages,omitempty"` - Type RegistrationType `json:"type,omitempty"` -} - /** - * Helper interface that indicates an identity provider can be federated to using the HTTP POST method. + * Search criteria for Groups * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type SupportsPostBindings struct { +type GroupSearchCriteria struct { + BaseSearchCriteria + Name string `json:"name,omitempty"` + TenantId string `json:"tenantId,omitempty"` } /** + * Models the User Event (and can be converted to JSON) that is used for all user modifications (create, update, + * delete). + *

+ * This is different than user.delete because it is sent after the tx is committed, this cannot be transactional. + * * @author Daniel DeGroff */ -type OAuth2Configuration struct { - AuthorizedOriginURLs []string `json:"authorizedOriginURLs,omitempty"` - AuthorizedRedirectURLs []string `json:"authorizedRedirectURLs,omitempty"` - AuthorizedURLValidationPolicy Oauth2AuthorizedURLValidationPolicy `json:"authorizedURLValidationPolicy,omitempty"` - ClientAuthenticationPolicy ClientAuthenticationPolicy `json:"clientAuthenticationPolicy,omitempty"` - ClientId string `json:"clientId,omitempty"` - ClientSecret string `json:"clientSecret,omitempty"` - ConsentMode OAuthScopeConsentMode `json:"consentMode,omitempty"` - Debug bool `json:"debug"` - DeviceVerificationURL string `json:"deviceVerificationURL,omitempty"` - EnabledGrants []GrantType `json:"enabledGrants,omitempty"` - GenerateRefreshTokens bool `json:"generateRefreshTokens"` - LogoutBehavior LogoutBehavior `json:"logoutBehavior,omitempty"` - LogoutURL string `json:"logoutURL,omitempty"` - ProofKeyForCodeExchangePolicy ProofKeyForCodeExchangePolicy `json:"proofKeyForCodeExchangePolicy,omitempty"` - ProvidedScopePolicy ProvidedScopePolicy `json:"providedScopePolicy,omitempty"` - Relationship OAuthApplicationRelationship `json:"relationship,omitempty"` - RequireClientAuthentication bool `json:"requireClientAuthentication"` - RequireRegistration bool `json:"requireRegistration"` - ScopeHandlingPolicy OAuthScopeHandlingPolicy `json:"scopeHandlingPolicy,omitempty"` - UnknownScopePolicy UnknownScopePolicy `json:"unknownScopePolicy,omitempty"` +type UserDeleteCompleteEvent struct { + BaseUserEvent } /** * @author Daniel DeGroff */ -type TwoFactorSendRequest struct { - ApplicationId string `json:"applicationId,omitempty"` - Email string `json:"email,omitempty"` - Method string `json:"method,omitempty"` - MethodId string `json:"methodId,omitempty"` - MobilePhone string `json:"mobilePhone,omitempty"` - UserId string `json:"userId,omitempty"` +type SortField struct { + Missing string `json:"missing,omitempty"` + Name string `json:"name,omitempty"` + Order Sort `json:"order,omitempty"` } /** - * Search criteria for Applications + * Request to complete the WebAuthn registration ceremony for a new credential,. * * @author Spencer Witt */ -type ApplicationSearchCriteria struct { - BaseSearchCriteria - Name string `json:"name,omitempty"` - State ObjectState `json:"state,omitempty"` - TenantId string `json:"tenantId,omitempty"` +type WebAuthnRegisterCompleteRequest struct { + Credential WebAuthnPublicKeyRegistrationRequest `json:"credential,omitempty"` + Origin string `json:"origin,omitempty"` + RpId string `json:"rpId,omitempty"` + UserId string `json:"userId,omitempty"` } /** - * Models the User Registration Verified Event. + * Search criteria for Lambdas * - * @author Trevor Smith + * @author Mark Manes */ -type UserRegistrationVerifiedEvent struct { - BaseUserEvent - ApplicationId string `json:"applicationId,omitempty"` - Registration UserRegistration `json:"registration,omitempty"` +type LambdaSearchCriteria struct { + BaseSearchCriteria + Body string `json:"body,omitempty"` + Name string `json:"name,omitempty"` + Type LambdaType `json:"type,omitempty"` } /** - * A Message Template Request to the API + * User API request object. * - * @author Michael Sleevi + * @author Brian Pontarelli */ -type MessageTemplateRequest struct { - MessageTemplate MessageTemplate `json:"messageTemplate,omitempty"` +type UserRequest struct { + BaseEventRequest + ApplicationId string `json:"applicationId,omitempty"` + CurrentPassword string `json:"currentPassword,omitempty"` + DisableDomainBlock bool `json:"disableDomainBlock"` + SendSetPasswordEmail bool `json:"sendSetPasswordEmail"` + SkipVerification bool `json:"skipVerification"` + User User `json:"user,omitempty"` } /** - * Entity Type API request object. - * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type EntityTypeRequest struct { - EntityType EntityType `json:"entityType,omitempty"` - Permission EntityTypePermission `json:"permission,omitempty"` +type TenantLoginConfiguration struct { + RequireAuthentication bool `json:"requireAuthentication"` } /** - * A marker interface indicating this event cannot be made transactional. - * - * @author Daniel DeGroff + * @author Trevor Smith */ -type NonTransactionalEvent struct { +type DeviceResponse struct { + BaseHTTPResponse + DeviceCode string `json:"device_code,omitempty"` + ExpiresIn int `json:"expires_in,omitempty"` + Interval int `json:"interval,omitempty"` + UserCode string `json:"user_code,omitempty"` + VerificationUri string `json:"verification_uri,omitempty"` + VerificationUriComplete string `json:"verification_uri_complete,omitempty"` +} + +func (b *DeviceResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Models the User Create Event. + * Request for the Logout API that can be used as an alternative to URL parameters. * * @author Brian Pontarelli */ -type UserCreateEvent struct { - BaseUserEvent +type LogoutRequest struct { + BaseEventRequest + Global bool `json:"global"` + RefreshToken string `json:"refreshToken,omitempty"` } /** * @author Daniel DeGroff */ -type ApplicationMultiFactorConfiguration struct { - Email MultiFactorEmailTemplate `json:"email,omitempty"` - LoginPolicy MultiFactorLoginPolicy `json:"loginPolicy,omitempty"` - Sms MultiFactorSMSTemplate `json:"sms,omitempty"` - TrustPolicy ApplicationMultiFactorTrustPolicy `json:"trustPolicy,omitempty"` +type VerifyRegistrationRequest struct { + BaseEventRequest + OneTimeCode string `json:"oneTimeCode,omitempty"` + VerificationId string `json:"verificationId,omitempty"` } -/** - * @author Daniel DeGroff - */ -type FormType string +type ThemeType string -func (e FormType) String() string { +func (e ThemeType) String() string { return string(e) } const ( - FormType_Registration FormType = "registration" - FormType_AdminRegistration FormType = "adminRegistration" - FormType_AdminUser FormType = "adminUser" - FormType_SelfServiceUser FormType = "selfServiceUser" + ThemeType_Advanced ThemeType = "advanced" + ThemeType_Simple ThemeType = "simple" ) /** - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type TwoFactorRequest struct { - BaseEventRequest - ApplicationId string `json:"applicationId,omitempty"` - AuthenticatorId string `json:"authenticatorId,omitempty"` - Code string `json:"code,omitempty"` - Email string `json:"email,omitempty"` - Method string `json:"method,omitempty"` - MobilePhone string `json:"mobilePhone,omitempty"` - Secret string `json:"secret,omitempty"` - SecretBase32Encoded string `json:"secretBase32Encoded,omitempty"` - TwoFactorId string `json:"twoFactorId,omitempty"` +type TenantRateLimitConfiguration struct { + FailedLogin RateLimitedRequestConfiguration `json:"failedLogin,omitempty"` + ForgotPassword RateLimitedRequestConfiguration `json:"forgotPassword,omitempty"` + SendEmailVerification RateLimitedRequestConfiguration `json:"sendEmailVerification,omitempty"` + SendPasswordless RateLimitedRequestConfiguration `json:"sendPasswordless,omitempty"` + SendRegistrationVerification RateLimitedRequestConfiguration `json:"sendRegistrationVerification,omitempty"` + SendTwoFactor RateLimitedRequestConfiguration `json:"sendTwoFactor,omitempty"` } /** - * User Action Reason API request object. - * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type UserActionReasonRequest struct { - UserActionReason UserActionReason `json:"userActionReason,omitempty"` +type Tenant struct { + AccessControlConfiguration TenantAccessControlConfiguration `json:"accessControlConfiguration,omitempty"` + CaptchaConfiguration TenantCaptchaConfiguration `json:"captchaConfiguration,omitempty"` + Configured bool `json:"configured"` + ConnectorPolicies []ConnectorPolicy `json:"connectorPolicies,omitempty"` + Data map[string]interface{} `json:"data,omitempty"` + EmailConfiguration EmailConfiguration `json:"emailConfiguration,omitempty"` + EventConfiguration EventConfiguration `json:"eventConfiguration,omitempty"` + ExternalIdentifierConfiguration ExternalIdentifierConfiguration `json:"externalIdentifierConfiguration,omitempty"` + FailedAuthenticationConfiguration FailedAuthenticationConfiguration `json:"failedAuthenticationConfiguration,omitempty"` + FamilyConfiguration FamilyConfiguration `json:"familyConfiguration,omitempty"` + FormConfiguration TenantFormConfiguration `json:"formConfiguration,omitempty"` + HttpSessionMaxInactiveInterval int `json:"httpSessionMaxInactiveInterval,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + Issuer string `json:"issuer,omitempty"` + JwtConfiguration JWTConfiguration `json:"jwtConfiguration,omitempty"` + LambdaConfiguration TenantLambdaConfiguration `json:"lambdaConfiguration,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + LoginConfiguration TenantLoginConfiguration `json:"loginConfiguration,omitempty"` + LogoutURL string `json:"logoutURL,omitempty"` + MaximumPasswordAge MaximumPasswordAge `json:"maximumPasswordAge,omitempty"` + MinimumPasswordAge MinimumPasswordAge `json:"minimumPasswordAge,omitempty"` + MultiFactorConfiguration TenantMultiFactorConfiguration `json:"multiFactorConfiguration,omitempty"` + Name string `json:"name,omitempty"` + OauthConfiguration TenantOAuth2Configuration `json:"oauthConfiguration,omitempty"` + PasswordEncryptionConfiguration PasswordEncryptionConfiguration `json:"passwordEncryptionConfiguration,omitempty"` + PasswordValidationRules PasswordValidationRules `json:"passwordValidationRules,omitempty"` + RateLimitConfiguration TenantRateLimitConfiguration `json:"rateLimitConfiguration,omitempty"` + RegistrationConfiguration TenantRegistrationConfiguration `json:"registrationConfiguration,omitempty"` + ScimServerConfiguration TenantSCIMServerConfiguration `json:"scimServerConfiguration,omitempty"` + SsoConfiguration TenantSSOConfiguration `json:"ssoConfiguration,omitempty"` + State ObjectState `json:"state,omitempty"` + ThemeId string `json:"themeId,omitempty"` + UserDeletePolicy TenantUserDeletePolicy `json:"userDeletePolicy,omitempty"` + UsernameConfiguration TenantUsernameConfiguration `json:"usernameConfiguration,omitempty"` + WebAuthnConfiguration TenantWebAuthnConfiguration `json:"webAuthnConfiguration,omitempty"` +} + +type TenantOAuth2Configuration struct { + ClientCredentialsAccessTokenPopulateLambdaId string `json:"clientCredentialsAccessTokenPopulateLambdaId,omitempty"` } /** - * Domain for a public key, key pair or an HMAC secret. This is used by KeyMaster to manage keys for JWTs, SAML, etc. + * Models the Group Member Add Complete Event. * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type Key struct { - Algorithm KeyAlgorithm `json:"algorithm,omitempty"` - Certificate string `json:"certificate,omitempty"` - CertificateInformation CertificateInformation `json:"certificateInformation,omitempty"` - ExpirationInstant int64 `json:"expirationInstant,omitempty"` - HasPrivateKey bool `json:"hasPrivateKey"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - Issuer string `json:"issuer,omitempty"` - Kid string `json:"kid,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - Length int `json:"length,omitempty"` - Name string `json:"name,omitempty"` - PrivateKey string `json:"privateKey,omitempty"` - PublicKey string `json:"publicKey,omitempty"` - Secret string `json:"secret,omitempty"` - Type KeyType `json:"type,omitempty"` +type GroupMemberAddCompleteEvent struct { + BaseGroupEvent + Members []GroupMember `json:"members,omitempty"` } /** - * Models the User Bulk Create Event. + * Request for the Tenant API to delete a tenant rather than using the URL parameters. * * @author Brian Pontarelli */ -type UserBulkCreateEvent struct { - BaseEvent - Users []User `json:"users,omitempty"` +type TenantDeleteRequest struct { + BaseEventRequest + Async bool `json:"async"` } /** - * @author Daniel DeGroff + * The types of connectors. This enum is stored as an ordinal on the identities table, order must be maintained. + * + * @author Trevor Smith */ -type IdentityProviderOauth2Configuration struct { - AuthorizationEndpoint string `json:"authorization_endpoint,omitempty"` - ClientId string `json:"client_id,omitempty"` - ClientSecret string `json:"client_secret,omitempty"` - ClientAuthenticationMethod ClientAuthenticationMethod `json:"clientAuthenticationMethod,omitempty"` - EmailClaim string `json:"emailClaim,omitempty"` - EmailVerifiedClaim string `json:"emailVerifiedClaim,omitempty"` - Issuer string `json:"issuer,omitempty"` - Scope string `json:"scope,omitempty"` - TokenEndpoint string `json:"token_endpoint,omitempty"` - UniqueIdClaim string `json:"uniqueIdClaim,omitempty"` - UserinfoEndpoint string `json:"userinfo_endpoint,omitempty"` - UsernameClaim string `json:"usernameClaim,omitempty"` +type ConnectorType string + +func (e ConnectorType) String() string { + return string(e) } +const ( + ConnectorType_FusionAuth ConnectorType = "FusionAuth" + ConnectorType_Generic ConnectorType = "Generic" + ConnectorType_LDAP ConnectorType = "LDAP" +) + /** + * Models the User Login event for a new device (un-recognized) + * * @author Daniel DeGroff */ -type RefreshTokenRevocationPolicy struct { - OnLoginPrevented bool `json:"onLoginPrevented"` - OnMultiFactorEnable bool `json:"onMultiFactorEnable"` - OnPasswordChanged bool `json:"onPasswordChanged"` +type UserLoginNewDeviceEvent struct { + UserLoginSuccessEvent } /** - * Base class for all {@link User}-related events. - * * @author Spencer Witt */ -type BaseUserEvent struct { - BaseEvent - User User `json:"user,omitempty"` +type TenantWebAuthnWorkflowConfiguration struct { + Enableable + AuthenticatorAttachmentPreference AuthenticatorAttachmentPreference `json:"authenticatorAttachmentPreference,omitempty"` + UserVerificationRequirement UserVerificationRequirement `json:"userVerificationRequirement,omitempty"` +} + +/** + * Xbox gaming login provider. + * + * @author Brett Pontarelli + */ +type XboxIdentityProvider struct { + BaseIdentityProvider + ButtonText string `json:"buttonText,omitempty"` + ClientId string `json:"client_id,omitempty"` + ClientSecret string `json:"client_secret,omitempty"` + Scope string `json:"scope,omitempty"` } /** * @author Daniel DeGroff */ -type MinimumPasswordAge struct { - Enableable - Seconds int `json:"seconds,omitempty"` +type TwitterApplicationConfiguration struct { + BaseIdentityProviderApplicationConfiguration + ButtonText string `json:"buttonText,omitempty"` + ConsumerKey string `json:"consumerKey,omitempty"` + ConsumerSecret string `json:"consumerSecret,omitempty"` } /** - * Authentication key response object. - * - * @author Sanjay + * @author Trevor Smith */ -type APIKeyResponse struct { - BaseHTTPResponse - ApiKey APIKey `json:"apiKey,omitempty"` +type ConnectorRequest struct { + Connector BaseConnectorConfiguration `json:"connector,omitempty"` } -func (b *APIKeyResponse) SetStatus(status int) { - b.StatusCode = status +/** + * External JWT-only identity provider. + * + * @author Daniel DeGroff and Brian Pontarelli + */ +type ExternalJWTIdentityProvider struct { + BaseIdentityProvider + ClaimMap map[string]string `json:"claimMap,omitempty"` + DefaultKeyId string `json:"defaultKeyId,omitempty"` + Domains []string `json:"domains,omitempty"` + HeaderKeyParameter string `json:"headerKeyParameter,omitempty"` + Oauth2 IdentityProviderOauth2Configuration `json:"oauth2,omitempty"` + UniqueIdentityClaim string `json:"uniqueIdentityClaim,omitempty"` } /** - * Used to indicate what type of attestation was included in the authenticator response for a given WebAuthn credential at the time it was created + * Request to register a new public key with WebAuthn * * @author Spencer Witt */ -type AttestationType string +type WebAuthnPublicKeyRegistrationRequest struct { + ClientExtensionResults WebAuthnExtensionsClientOutputs `json:"clientExtensionResults,omitempty"` + Id string `json:"id,omitempty"` + Response WebAuthnAuthenticatorRegistrationResponse `json:"response,omitempty"` + RpId string `json:"rpId,omitempty"` + Transports []string `json:"transports,omitempty"` + Type string `json:"type,omitempty"` +} -func (e AttestationType) String() string { - return string(e) +/** + * Webhook search response + * + * @author Spencer Witt + */ +type WebhookSearchResponse struct { + BaseHTTPResponse + Total int64 `json:"total,omitempty"` + Webhooks []Webhook `json:"webhooks,omitempty"` } -const ( - AttestationType_Basic AttestationType = "basic" - AttestationType_Self AttestationType = "self" - AttestationType_AttestationCa AttestationType = "attestationCa" - AttestationType_AnonymizationCa AttestationType = "anonymizationCa" - AttestationType_None AttestationType = "none" -) +func (b *WebhookSearchResponse) SetStatus(status int) { + b.StatusCode = status +} /** - * Models the Group Update Event. - * * @author Daniel DeGroff */ -type GroupUpdateEvent struct { - BaseGroupEvent - Original Group `json:"original,omitempty"` +type RefreshResponse struct { + BaseHTTPResponse +} + +func (b *RefreshResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Models an entity that a user can be granted permissions to. Or an entity that can be granted permissions to another entity. + * Response for the login report. * * @author Brian Pontarelli */ -type Entity struct { - ClientId string `json:"clientId,omitempty"` - ClientSecret string `json:"clientSecret,omitempty"` - Data map[string]interface{} `json:"data,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - Name string `json:"name,omitempty"` - ParentId string `json:"parentId,omitempty"` - TenantId string `json:"tenantId,omitempty"` - Type EntityType `json:"type,omitempty"` +type LoginReportResponse struct { + BaseHTTPResponse + HourlyCounts []Count `json:"hourlyCounts,omitempty"` + Total int64 `json:"total,omitempty"` } -type KeyType string - -func (e KeyType) String() string { - return string(e) +func (b *LoginReportResponse) SetStatus(status int) { + b.StatusCode = status } -const ( - KeyType_EC KeyType = "EC" - KeyType_RSA KeyType = "RSA" - KeyType_HMAC KeyType = "HMAC" -) - /** - * @author Brian Pontarelli + * Group Member Delete Request + * + * @author Daniel DeGroff */ -type EventLogSearchRequest struct { - Search EventLogSearchCriteria `json:"search,omitempty"` +type MemberDeleteRequest struct { + MemberIds []string `json:"memberIds,omitempty"` + Members map[string][]string `json:"members,omitempty"` } /** - * The types of connectors. This enum is stored as an ordinal on the identities table, order must be maintained. + * A historical state of a user log event. Since events can be modified, this stores the historical state. * - * @author Trevor Smith + * @author Brian Pontarelli */ -type ConnectorType string - -func (e ConnectorType) String() string { - return string(e) +type LogHistory struct { + HistoryItems []HistoryItem `json:"historyItems,omitempty"` } -const ( - ConnectorType_FusionAuth ConnectorType = "FusionAuth" - ConnectorType_Generic ConnectorType = "Generic" - ConnectorType_LDAP ConnectorType = "LDAP" -) +type HistoryItem struct { + ActionerUserId string `json:"actionerUserId,omitempty"` + Comment string `json:"comment,omitempty"` + CreateInstant int64 `json:"createInstant,omitempty"` + Expiry int64 `json:"expiry,omitempty"` +} /** - * Import request. - * * @author Brian Pontarelli */ -type ImportRequest struct { +type AuditLogRequest struct { BaseEventRequest - EncryptionScheme string `json:"encryptionScheme,omitempty"` - Factor int `json:"factor,omitempty"` - Users []User `json:"users,omitempty"` - ValidateDbConstraints bool `json:"validateDbConstraints"` + AuditLog AuditLog `json:"auditLog,omitempty"` } /** * @author Daniel DeGroff */ -type FormFieldValidator struct { +type RateLimitedRequestConfiguration struct { Enableable - Expression string `json:"expression,omitempty"` + Limit int `json:"limit,omitempty"` + TimePeriodInSeconds int `json:"timePeriodInSeconds,omitempty"` } /** - * Search request for entity grants. + * A marker interface indicating this event cannot be made transactional. * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type EntityGrantSearchRequest struct { - Search EntityGrantSearchCriteria `json:"search,omitempty"` +type NonTransactionalEvent struct { } /** - * Webhook search response - * - * @author Spencer Witt + * @author Brett Guy */ -type WebhookSearchResponse struct { - BaseHTTPResponse - Total int64 `json:"total,omitempty"` - Webhooks []Webhook `json:"webhooks,omitempty"` -} +type ProofKeyForCodeExchangePolicy string -func (b *WebhookSearchResponse) SetStatus(status int) { - b.StatusCode = status +func (e ProofKeyForCodeExchangePolicy) String() string { + return string(e) } +const ( + ProofKeyForCodeExchangePolicy_Required ProofKeyForCodeExchangePolicy = "Required" + ProofKeyForCodeExchangePolicy_NotRequired ProofKeyForCodeExchangePolicy = "NotRequired" + ProofKeyForCodeExchangePolicy_NotRequiredWhenUsingClientAuthentication ProofKeyForCodeExchangePolicy = "NotRequiredWhenUsingClientAuthentication" +) + /** * @author Daniel DeGroff */ -type AppleIdentityProvider struct { - BaseIdentityProvider - BundleId string `json:"bundleId,omitempty"` - ButtonText string `json:"buttonText,omitempty"` - KeyId string `json:"keyId,omitempty"` - Scope string `json:"scope,omitempty"` - ServicesId string `json:"servicesId,omitempty"` - TeamId string `json:"teamId,omitempty"` +type TwoFactorResponse struct { + BaseHTTPResponse + Code string `json:"code,omitempty"` + RecoveryCodes []string `json:"recoveryCodes,omitempty"` +} + +func (b *TwoFactorResponse) SetStatus(status int) { + b.StatusCode = status } /** - * User registration information for a single application. + * Epic gaming login provider. * - * @author Brian Pontarelli + * @author Brett Pontarelli */ -type UserRegistration struct { - ApplicationId string `json:"applicationId,omitempty"` - AuthenticationToken string `json:"authenticationToken,omitempty"` - CleanSpeakId string `json:"cleanSpeakId,omitempty"` - Data map[string]interface{} `json:"data,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastLoginInstant int64 `json:"lastLoginInstant,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - PreferredLanguages []string `json:"preferredLanguages,omitempty"` - Roles []string `json:"roles,omitempty"` - Timezone string `json:"timezone,omitempty"` - Tokens map[string]string `json:"tokens,omitempty"` - Username string `json:"username,omitempty"` - UsernameStatus ContentStatus `json:"usernameStatus,omitempty"` - Verified bool `json:"verified"` - VerifiedInstant int64 `json:"verifiedInstant,omitempty"` +type EpicGamesIdentityProvider struct { + BaseIdentityProvider + ButtonText string `json:"buttonText,omitempty"` + ClientId string `json:"client_id,omitempty"` + ClientSecret string `json:"client_secret,omitempty"` + Scope string `json:"scope,omitempty"` } -/** - * @author Daniel DeGroff - */ -type SecureIdentity struct { - BreachedPasswordLastCheckedInstant int64 `json:"breachedPasswordLastCheckedInstant,omitempty"` - BreachedPasswordStatus BreachedPasswordStatus `json:"breachedPasswordStatus,omitempty"` - ConnectorId string `json:"connectorId,omitempty"` - EncryptionScheme string `json:"encryptionScheme,omitempty"` - Factor int `json:"factor,omitempty"` - Id string `json:"id,omitempty"` - LastLoginInstant int64 `json:"lastLoginInstant,omitempty"` - Password string `json:"password,omitempty"` - PasswordChangeReason ChangePasswordReason `json:"passwordChangeReason,omitempty"` - PasswordChangeRequired bool `json:"passwordChangeRequired"` - PasswordLastUpdateInstant int64 `json:"passwordLastUpdateInstant,omitempty"` - Salt string `json:"salt,omitempty"` - UniqueUsername string `json:"uniqueUsername,omitempty"` - Username string `json:"username,omitempty"` - UsernameStatus ContentStatus `json:"usernameStatus,omitempty"` - Verified bool `json:"verified"` - VerifiedInstant int64 `json:"verifiedInstant,omitempty"` +// Do not require a setter for 'type', it is defined by the concrete class and is not mutable +type BaseMessengerConfiguration struct { + Data map[string]interface{} `json:"data,omitempty"` + Debug bool `json:"debug"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + Name string `json:"name,omitempty"` + Transport string `json:"transport,omitempty"` + Type MessengerType `json:"type,omitempty"` } /** * @author Daniel DeGroff */ -type ApplicationExternalIdentifierConfiguration struct { - TwoFactorTrustIdTimeToLiveInSeconds int `json:"twoFactorTrustIdTimeToLiveInSeconds,omitempty"` -} - -/** - * Entity Type API response object. - * - * @author Brian Pontarelli - */ -type EntityTypeResponse struct { +type SecretResponse struct { BaseHTTPResponse - EntityType EntityType `json:"entityType,omitempty"` - EntityTypes []EntityType `json:"entityTypes,omitempty"` - Permission EntityTypePermission `json:"permission,omitempty"` + Secret string `json:"secret,omitempty"` + SecretBase32Encoded string `json:"secretBase32Encoded,omitempty"` } -func (b *EntityTypeResponse) SetStatus(status int) { +func (b *SecretResponse) SetStatus(status int) { b.StatusCode = status } -type LoginRecordConfiguration struct { - Delete DeleteConfiguration `json:"delete,omitempty"` -} - /** - * @author Daniel DeGroff + * Search request for entities + * + * @author Brett Guy */ -type VerifyEmailResponse struct { +type EntitySearchResponse struct { BaseHTTPResponse - OneTimeCode string `json:"oneTimeCode,omitempty"` - VerificationId string `json:"verificationId,omitempty"` + Entities []Entity `json:"entities,omitempty"` + NextResults string `json:"nextResults,omitempty"` + Total int64 `json:"total,omitempty"` } -func (b *VerifyEmailResponse) SetStatus(status int) { +func (b *EntitySearchResponse) SetStatus(status int) { b.StatusCode = status } /** - * @author Brian Pontarelli - */ -type EventConfiguration struct { - Events map[EventType]EventConfigurationData `json:"events,omitempty"` -} - -/** - * Models an event where a user is being updated and tries to use an "in-use" login Id (email or username). - * - * @author Daniel DeGroff + * @author Rob Davis */ -type UserLoginIdDuplicateOnUpdateEvent struct { - UserLoginIdDuplicateOnCreateEvent +type TenantLambdaConfiguration struct { + LoginValidationId string `json:"loginValidationId,omitempty"` + ScimEnterpriseUserRequestConverterId string `json:"scimEnterpriseUserRequestConverterId,omitempty"` + ScimEnterpriseUserResponseConverterId string `json:"scimEnterpriseUserResponseConverterId,omitempty"` + ScimGroupRequestConverterId string `json:"scimGroupRequestConverterId,omitempty"` + ScimGroupResponseConverterId string `json:"scimGroupResponseConverterId,omitempty"` + ScimUserRequestConverterId string `json:"scimUserRequestConverterId,omitempty"` + ScimUserResponseConverterId string `json:"scimUserResponseConverterId,omitempty"` } /** - * Models the Group Member Remove Complete Event. - * - * @author Daniel DeGroff + * @author Mikey Sleevi */ -type GroupMemberRemoveCompleteEvent struct { - BaseGroupEvent - Members []GroupMember `json:"members,omitempty"` -} - -type EventLogConfiguration struct { - NumberToRetain int `json:"numberToRetain,omitempty"` -} +type MessageType string -/** - * @author Daniel DeGroff - */ -type IdentityProviderResponse struct { - BaseHTTPResponse - IdentityProvider BaseIdentityProvider `json:"identityProvider,omitempty"` - IdentityProviders []BaseIdentityProvider `json:"identityProviders,omitempty"` +func (e MessageType) String() string { + return string(e) } -func (b *IdentityProviderResponse) SetStatus(status int) { - b.StatusCode = status -} +const ( + MessageType_SMS MessageType = "SMS" +) /** - * Search request for webhooks + * Describes the Relying Party's requirements for client-side + * discoverable credentials (formerly known as "resident keys") * * @author Spencer Witt */ -type WebhookSearchRequest struct { - Search WebhookSearchCriteria `json:"search,omitempty"` -} +type ResidentKeyRequirement string -/** - * Models the Group Member Add Complete Event. - * - * @author Daniel DeGroff - */ -type GroupMemberAddCompleteEvent struct { - BaseGroupEvent - Members []GroupMember `json:"members,omitempty"` +func (e ResidentKeyRequirement) String() string { + return string(e) } +const ( + ResidentKeyRequirement_Discouraged ResidentKeyRequirement = "discouraged" + ResidentKeyRequirement_Preferred ResidentKeyRequirement = "preferred" + ResidentKeyRequirement_Required ResidentKeyRequirement = "required" +) + /** - * @author Daniel DeGroff + * @author Trevor Smith */ -type MultiFactorLoginPolicy string +type ChangePasswordReason string -func (e MultiFactorLoginPolicy) String() string { +func (e ChangePasswordReason) String() string { return string(e) } const ( - MultiFactorLoginPolicy_Disabled MultiFactorLoginPolicy = "Disabled" - MultiFactorLoginPolicy_Enabled MultiFactorLoginPolicy = "Enabled" - MultiFactorLoginPolicy_Required MultiFactorLoginPolicy = "Required" + ChangePasswordReason_Administrative ChangePasswordReason = "Administrative" + ChangePasswordReason_Breached ChangePasswordReason = "Breached" + ChangePasswordReason_Expired ChangePasswordReason = "Expired" + ChangePasswordReason_Validation ChangePasswordReason = "Validation" ) /** - * @author Daniel DeGroff + * @author Brett Guy */ -type PasswordlessStartRequest struct { - ApplicationId string `json:"applicationId,omitempty"` - LoginId string `json:"loginId,omitempty"` - State map[string]interface{} `json:"state,omitempty"` +type GenericMessengerConfiguration struct { + BaseMessengerConfiguration + ConnectTimeout int `json:"connectTimeout,omitempty"` + Headers map[string]string `json:"headers,omitempty"` + HttpAuthenticationPassword string `json:"httpAuthenticationPassword,omitempty"` + HttpAuthenticationUsername string `json:"httpAuthenticationUsername,omitempty"` + ReadTimeout int `json:"readTimeout,omitempty"` + SslCertificate string `json:"sslCertificate,omitempty"` + Url string `json:"url,omitempty"` } /** - * @author Daniel DeGroff + * SonyPSN gaming login provider. + * + * @author Brett Pontarelli */ -type ExternalIdentifierConfiguration struct { - AuthorizationGrantIdTimeToLiveInSeconds int `json:"authorizationGrantIdTimeToLiveInSeconds,omitempty"` - ChangePasswordIdGenerator SecureGeneratorConfiguration `json:"changePasswordIdGenerator,omitempty"` - ChangePasswordIdTimeToLiveInSeconds int `json:"changePasswordIdTimeToLiveInSeconds,omitempty"` - DeviceCodeTimeToLiveInSeconds int `json:"deviceCodeTimeToLiveInSeconds,omitempty"` - DeviceUserCodeIdGenerator SecureGeneratorConfiguration `json:"deviceUserCodeIdGenerator,omitempty"` - EmailVerificationIdGenerator SecureGeneratorConfiguration `json:"emailVerificationIdGenerator,omitempty"` - EmailVerificationIdTimeToLiveInSeconds int `json:"emailVerificationIdTimeToLiveInSeconds,omitempty"` - EmailVerificationOneTimeCodeGenerator SecureGeneratorConfiguration `json:"emailVerificationOneTimeCodeGenerator,omitempty"` - ExternalAuthenticationIdTimeToLiveInSeconds int `json:"externalAuthenticationIdTimeToLiveInSeconds,omitempty"` - LoginIntentTimeToLiveInSeconds int `json:"loginIntentTimeToLiveInSeconds,omitempty"` - OneTimePasswordTimeToLiveInSeconds int `json:"oneTimePasswordTimeToLiveInSeconds,omitempty"` - PasswordlessLoginGenerator SecureGeneratorConfiguration `json:"passwordlessLoginGenerator,omitempty"` - PasswordlessLoginTimeToLiveInSeconds int `json:"passwordlessLoginTimeToLiveInSeconds,omitempty"` - PendingAccountLinkTimeToLiveInSeconds int `json:"pendingAccountLinkTimeToLiveInSeconds,omitempty"` - RegistrationVerificationIdGenerator SecureGeneratorConfiguration `json:"registrationVerificationIdGenerator,omitempty"` - RegistrationVerificationIdTimeToLiveInSeconds int `json:"registrationVerificationIdTimeToLiveInSeconds,omitempty"` - RegistrationVerificationOneTimeCodeGenerator SecureGeneratorConfiguration `json:"registrationVerificationOneTimeCodeGenerator,omitempty"` - RememberOAuthScopeConsentChoiceTimeToLiveInSeconds int `json:"rememberOAuthScopeConsentChoiceTimeToLiveInSeconds,omitempty"` - Samlv2AuthNRequestIdTimeToLiveInSeconds int `json:"samlv2AuthNRequestIdTimeToLiveInSeconds,omitempty"` - SetupPasswordIdGenerator SecureGeneratorConfiguration `json:"setupPasswordIdGenerator,omitempty"` - SetupPasswordIdTimeToLiveInSeconds int `json:"setupPasswordIdTimeToLiveInSeconds,omitempty"` - TrustTokenTimeToLiveInSeconds int `json:"trustTokenTimeToLiveInSeconds,omitempty"` - TwoFactorIdTimeToLiveInSeconds int `json:"twoFactorIdTimeToLiveInSeconds,omitempty"` - TwoFactorOneTimeCodeIdGenerator SecureGeneratorConfiguration `json:"twoFactorOneTimeCodeIdGenerator,omitempty"` - TwoFactorOneTimeCodeIdTimeToLiveInSeconds int `json:"twoFactorOneTimeCodeIdTimeToLiveInSeconds,omitempty"` - TwoFactorTrustIdTimeToLiveInSeconds int `json:"twoFactorTrustIdTimeToLiveInSeconds,omitempty"` - WebAuthnAuthenticationChallengeTimeToLiveInSeconds int `json:"webAuthnAuthenticationChallengeTimeToLiveInSeconds,omitempty"` - WebAuthnRegistrationChallengeTimeToLiveInSeconds int `json:"webAuthnRegistrationChallengeTimeToLiveInSeconds,omitempty"` +type SonyPSNIdentityProvider struct { + BaseIdentityProvider + ButtonText string `json:"buttonText,omitempty"` + ClientId string `json:"client_id,omitempty"` + ClientSecret string `json:"client_secret,omitempty"` + Scope string `json:"scope,omitempty"` } /** - * @author Daniel DeGroff + * @author Brett Guy */ -type LoginRecordExportRequest struct { - BaseExportRequest - Criteria LoginRecordSearchCriteria `json:"criteria,omitempty"` +type IPAccessControlEntry struct { + Action IPAccessControlEntryAction `json:"action,omitempty"` + EndIPAddress string `json:"endIPAddress,omitempty"` + StartIPAddress string `json:"startIPAddress,omitempty"` } /** - * Describes the authenticator attachment modality. + * @author Brian Pontarelli + */ +type Count struct { + Count int `json:"count,omitempty"` + Interval int `json:"interval,omitempty"` +} + +/** + * Models an LDAP connector. * - * @author Spencer Witt + * @author Trevor Smith */ -type AuthenticatorAttachment string +type LDAPConnectorConfiguration struct { + BaseConnectorConfiguration + AuthenticationURL string `json:"authenticationURL,omitempty"` + BaseStructure string `json:"baseStructure,omitempty"` + ConnectTimeout int `json:"connectTimeout,omitempty"` + IdentifyingAttribute string `json:"identifyingAttribute,omitempty"` + LambdaConfiguration ConnectorLambdaConfiguration `json:"lambdaConfiguration,omitempty"` + LoginIdAttribute string `json:"loginIdAttribute,omitempty"` + ReadTimeout int `json:"readTimeout,omitempty"` + RequestedAttributes []string `json:"requestedAttributes,omitempty"` + SecurityMethod LDAPSecurityMethod `json:"securityMethod,omitempty"` + SystemAccountDN string `json:"systemAccountDN,omitempty"` + SystemAccountPassword string `json:"systemAccountPassword,omitempty"` +} -func (e AuthenticatorAttachment) String() string { +type LDAPSecurityMethod string + +func (e LDAPSecurityMethod) String() string { return string(e) } const ( - AuthenticatorAttachment_Platform AuthenticatorAttachment = "platform" - AuthenticatorAttachment_CrossPlatform AuthenticatorAttachment = "crossPlatform" + LDAPSecurityMethod_None LDAPSecurityMethod = "None" + LDAPSecurityMethod_LDAPS LDAPSecurityMethod = "LDAPS" + LDAPSecurityMethod_StartTLS LDAPSecurityMethod = "StartTLS" ) +type ConnectorLambdaConfiguration struct { + ReconcileId string `json:"reconcileId,omitempty"` +} + /** - * Email template response. - * - * @author Brian Pontarelli + * @author Johnathon Wood */ -type EmailTemplateResponse struct { - BaseHTTPResponse - EmailTemplate EmailTemplate `json:"emailTemplate,omitempty"` - EmailTemplates []EmailTemplate `json:"emailTemplates,omitempty"` -} +type Oauth2AuthorizedURLValidationPolicy string -func (b *EmailTemplateResponse) SetStatus(status int) { - b.StatusCode = status +func (e Oauth2AuthorizedURLValidationPolicy) String() string { + return string(e) } -type TenantOAuth2Configuration struct { - ClientCredentialsAccessTokenPopulateLambdaId string `json:"clientCredentialsAccessTokenPopulateLambdaId,omitempty"` -} +const ( + Oauth2AuthorizedURLValidationPolicy_AllowWildcards Oauth2AuthorizedURLValidationPolicy = "AllowWildcards" + Oauth2AuthorizedURLValidationPolicy_ExactMatch Oauth2AuthorizedURLValidationPolicy = "ExactMatch" +) /** - * Request to register a new public key with WebAuthn - * - * @author Spencer Witt + * @author Trevor Smith */ -type WebAuthnPublicKeyRegistrationRequest struct { - ClientExtensionResults WebAuthnExtensionsClientOutputs `json:"clientExtensionResults,omitempty"` - Id string `json:"id,omitempty"` - Response WebAuthnAuthenticatorRegistrationResponse `json:"response,omitempty"` - RpId string `json:"rpId,omitempty"` - Transports []string `json:"transports,omitempty"` - Type string `json:"type,omitempty"` +type CORSConfiguration struct { + Enableable + AllowCredentials bool `json:"allowCredentials"` + AllowedHeaders []string `json:"allowedHeaders,omitempty"` + AllowedMethods []HTTPMethod `json:"allowedMethods,omitempty"` + AllowedOrigins []string `json:"allowedOrigins,omitempty"` + Debug bool `json:"debug"` + ExposedHeaders []string `json:"exposedHeaders,omitempty"` + PreflightMaxAgeInSeconds int `json:"preflightMaxAgeInSeconds,omitempty"` } /** - * User API response object. + * Describes the authenticator attachment modality. * - * @author Brian Pontarelli + * @author Spencer Witt */ -type UserResponse struct { - BaseHTTPResponse - EmailVerificationId string `json:"emailVerificationId,omitempty"` - EmailVerificationOneTimeCode string `json:"emailVerificationOneTimeCode,omitempty"` - RegistrationVerificationIds map[string]string `json:"registrationVerificationIds,omitempty"` - RegistrationVerificationOneTimeCodes map[string]string `json:"registrationVerificationOneTimeCodes,omitempty"` - Token string `json:"token,omitempty"` - TokenExpirationInstant int64 `json:"tokenExpirationInstant,omitempty"` - User User `json:"user,omitempty"` -} +type AuthenticatorAttachment string -func (b *UserResponse) SetStatus(status int) { - b.StatusCode = status +func (e AuthenticatorAttachment) String() string { + return string(e) } +const ( + AuthenticatorAttachment_Platform AuthenticatorAttachment = "platform" + AuthenticatorAttachment_CrossPlatform AuthenticatorAttachment = "crossPlatform" +) + /** * @author Daniel DeGroff */ -type DeviceInfo struct { - Description string `json:"description,omitempty"` - LastAccessedAddress string `json:"lastAccessedAddress,omitempty"` - LastAccessedInstant int64 `json:"lastAccessedInstant,omitempty"` - Name string `json:"name,omitempty"` - Type string `json:"type,omitempty"` +type AuditLogExportRequest struct { + BaseExportRequest + Criteria AuditLogSearchCriteria `json:"criteria,omitempty"` } /** - * @author Michael Sleevi + * Supply additional information about the user account when creating a new credential + * + * @author Spencer Witt */ -type SMSMessageTemplate struct { - MessageTemplate - DefaultTemplate string `json:"defaultTemplate,omitempty"` - LocalizedTemplates map[string]string `json:"localizedTemplates,omitempty"` +type PublicKeyCredentialUserEntity struct { + PublicKeyCredentialEntity + DisplayName string `json:"displayName,omitempty"` + Id string `json:"id,omitempty"` } /** - * User Action Reason API response object. - * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type UserActionReasonResponse struct { - BaseHTTPResponse - UserActionReason UserActionReason `json:"userActionReason,omitempty"` - UserActionReasons []UserActionReason `json:"userActionReasons,omitempty"` -} - -func (b *UserActionReasonResponse) SetStatus(status int) { - b.StatusCode = status +type FormStep struct { + Fields []string `json:"fields,omitempty"` } /** - * @author Daniel DeGroff + * Search criteria for entity types. + * + * @author Brian Pontarelli */ -type UserTwoFactorConfiguration struct { - Methods []TwoFactorMethod `json:"methods,omitempty"` - RecoveryCodes []string `json:"recoveryCodes,omitempty"` +type EntityTypeSearchCriteria struct { + BaseSearchCriteria + Name string `json:"name,omitempty"` } /** + * Search criteria for Group Members + * * @author Daniel DeGroff */ -type PendingIdPLink struct { - DisplayName string `json:"displayName,omitempty"` - Email string `json:"email,omitempty"` - IdentityProviderId string `json:"identityProviderId,omitempty"` - IdentityProviderLinks []IdentityProviderLink `json:"identityProviderLinks,omitempty"` - IdentityProviderName string `json:"identityProviderName,omitempty"` - IdentityProviderTenantConfiguration IdentityProviderTenantConfiguration `json:"identityProviderTenantConfiguration,omitempty"` - IdentityProviderType IdentityProviderType `json:"identityProviderType,omitempty"` - IdentityProviderUserId string `json:"identityProviderUserId,omitempty"` - User User `json:"user,omitempty"` - Username string `json:"username,omitempty"` +type GroupMemberSearchCriteria struct { + BaseSearchCriteria + GroupId string `json:"groupId,omitempty"` + TenantId string `json:"tenantId,omitempty"` + UserId string `json:"userId,omitempty"` } /** - * @author Daniel DeGroff + * @author Brett Pontarelli */ -type JWKSResponse struct { - BaseHTTPResponse - Keys []JSONWebKey `json:"keys,omitempty"` -} +type IdentityProviderLoginMethod string -func (b *JWKSResponse) SetStatus(status int) { - b.StatusCode = status +func (e IdentityProviderLoginMethod) String() string { + return string(e) } +const ( + IdentityProviderLoginMethod_UsePopup IdentityProviderLoginMethod = "UsePopup" + IdentityProviderLoginMethod_UseRedirect IdentityProviderLoginMethod = "UseRedirect" + IdentityProviderLoginMethod_UseVendorJavaScript IdentityProviderLoginMethod = "UseVendorJavaScript" +) + /** - * The Integration Response + * Search criteria for themes * - * @author Daniel DeGroff + * @author Mark Manes */ -type IntegrationResponse struct { - BaseHTTPResponse - Integrations Integrations `json:"integrations,omitempty"` +type ThemeSearchCriteria struct { + BaseSearchCriteria + Name string `json:"name,omitempty"` + Type ThemeType `json:"type,omitempty"` } -func (b *IntegrationResponse) SetStatus(status int) { - b.StatusCode = status +/** + * @author Daniel DeGroff + */ +type MinimumPasswordAge struct { + Enableable + Seconds int `json:"seconds,omitempty"` } /** - * API response for starting a WebAuthn registration ceremony + * Login Ping API request object. * - * @author Spencer Witt + * @author Daniel DeGroff */ -type WebAuthnRegisterStartResponse struct { - BaseHTTPResponse - Options PublicKeyCredentialCreationOptions `json:"options,omitempty"` +type LoginPingRequest struct { + BaseLoginRequest + UserId string `json:"userId,omitempty"` } -func (b *WebAuthnRegisterStartResponse) SetStatus(status int) { - b.StatusCode = status +/** + * @author Daniel DeGroff + */ +type OpenIdConnectApplicationConfiguration struct { + BaseIdentityProviderApplicationConfiguration + ButtonImageURL string `json:"buttonImageURL,omitempty"` + ButtonText string `json:"buttonText,omitempty"` + Oauth2 IdentityProviderOauth2Configuration `json:"oauth2,omitempty"` } /** - * @author Brett Pontarelli + * @author Daniel DeGroff */ -type TenantCaptchaConfiguration struct { - Enableable - CaptchaMethod CaptchaMethod `json:"captchaMethod,omitempty"` - SecretKey string `json:"secretKey,omitempty"` - SiteKey string `json:"siteKey,omitempty"` - Threshold float64 `json:"threshold,omitempty"` +type IdentityProviderTenantConfiguration struct { + Data map[string]interface{} `json:"data,omitempty"` + LimitUserLinkCount IdentityProviderLimitUserLinkingPolicy `json:"limitUserLinkCount,omitempty"` } /** - * The Application API response. + * API request for User consent types. * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type ApplicationResponse struct { - BaseHTTPResponse - Application Application `json:"application,omitempty"` - Applications []Application `json:"applications,omitempty"` - Role ApplicationRole `json:"role,omitempty"` -} - -func (b *ApplicationResponse) SetStatus(status int) { - b.StatusCode = status +type ConsentRequest struct { + Consent Consent `json:"consent,omitempty"` } /** - * COSE Elliptic Curve identifier to determine which elliptic curve to use with a given key + * Supply information on credential type and algorithm to the authenticator. * * @author Spencer Witt */ -type CoseEllipticCurve string +type PublicKeyCredentialParameters struct { + Alg CoseAlgorithmIdentifier `json:"alg,omitempty"` + Type PublicKeyCredentialType `json:"type,omitempty"` +} -func (e CoseEllipticCurve) String() string { +/** + * @author Daniel DeGroff + */ +type RefreshTokenUsagePolicy string + +func (e RefreshTokenUsagePolicy) String() string { return string(e) } const ( - CoseEllipticCurve_Reserved CoseEllipticCurve = "Reserved" - CoseEllipticCurve_P256 CoseEllipticCurve = "P256" - CoseEllipticCurve_P384 CoseEllipticCurve = "P384" - CoseEllipticCurve_P521 CoseEllipticCurve = "P521" - CoseEllipticCurve_X25519 CoseEllipticCurve = "X25519" - CoseEllipticCurve_X448 CoseEllipticCurve = "X448" - CoseEllipticCurve_Ed25519 CoseEllipticCurve = "Ed25519" - CoseEllipticCurve_Ed448 CoseEllipticCurve = "Ed448" - CoseEllipticCurve_Secp256k1 CoseEllipticCurve = "Secp256k1" + RefreshTokenUsagePolicy_Reusable RefreshTokenUsagePolicy = "Reusable" + RefreshTokenUsagePolicy_OneTimeUse RefreshTokenUsagePolicy = "OneTimeUse" ) -type LoginIdType string +/** + * @author Lyle Schemmerling + */ +type SAMLv2DestinationAssertionPolicy string -func (e LoginIdType) String() string { +func (e SAMLv2DestinationAssertionPolicy) String() string { return string(e) } const ( - LoginIdType_Email LoginIdType = "email" - LoginIdType_Username LoginIdType = "username" + SAMLv2DestinationAssertionPolicy_Enabled SAMLv2DestinationAssertionPolicy = "Enabled" + SAMLv2DestinationAssertionPolicy_Disabled SAMLv2DestinationAssertionPolicy = "Disabled" + SAMLv2DestinationAssertionPolicy_AllowAlternates SAMLv2DestinationAssertionPolicy = "AllowAlternates" ) /** + * Interface describing the need for CORS configuration. + * * @author Daniel DeGroff */ -type OpenIdConnectIdentityProvider struct { - BaseIdentityProvider - ButtonImageURL string `json:"buttonImageURL,omitempty"` - ButtonText string `json:"buttonText,omitempty"` - Domains []string `json:"domains,omitempty"` - Oauth2 IdentityProviderOauth2Configuration `json:"oauth2,omitempty"` - PostRequest bool `json:"postRequest"` +type RequiresCORSConfiguration struct { } -type UIConfiguration struct { - HeaderColor string `json:"headerColor,omitempty"` - LogoURL string `json:"logoURL,omitempty"` - MenuFontColor string `json:"menuFontColor,omitempty"` +/** + * Change password request object. + * + * @author Brian Pontarelli + */ +type ChangePasswordRequest struct { + BaseEventRequest + ApplicationId string `json:"applicationId,omitempty"` + ChangePasswordId string `json:"changePasswordId,omitempty"` + CurrentPassword string `json:"currentPassword,omitempty"` + LoginId string `json:"loginId,omitempty"` + Password string `json:"password,omitempty"` + RefreshToken string `json:"refreshToken,omitempty"` + TrustChallenge string `json:"trustChallenge,omitempty"` + TrustToken string `json:"trustToken,omitempty"` } /** - * Webhook event log response. + * @author Daniel DeGroff + */ +type IdentityProviderStartLoginRequest struct { + BaseLoginRequest + Data map[string]string `json:"data,omitempty"` + IdentityProviderId string `json:"identityProviderId,omitempty"` + LoginId string `json:"loginId,omitempty"` + State map[string]interface{} `json:"state,omitempty"` +} + +/** + * @author Daniel DeGroff + */ +type OAuthError struct { + ChangePasswordId string `json:"change_password_id,omitempty"` + Error OAuthErrorType `json:"error,omitempty"` + ErrorDescription string `json:"error_description,omitempty"` + ErrorReason OAuthErrorReason `json:"error_reason,omitempty"` + ErrorUri string `json:"error_uri,omitempty"` + TwoFactorId string `json:"two_factor_id,omitempty"` + TwoFactorMethods []TwoFactorMethod `json:"two_factor_methods,omitempty"` +} + +type OAuthErrorReason string + +func (e OAuthErrorReason) String() string { + return string(e) +} + +const ( + OAuthErrorReason_AuthCodeNotFound OAuthErrorReason = "auth_code_not_found" + OAuthErrorReason_AccessTokenMalformed OAuthErrorReason = "access_token_malformed" + OAuthErrorReason_AccessTokenExpired OAuthErrorReason = "access_token_expired" + OAuthErrorReason_AccessTokenUnavailableForProcessing OAuthErrorReason = "access_token_unavailable_for_processing" + OAuthErrorReason_AccessTokenFailedProcessing OAuthErrorReason = "access_token_failed_processing" + OAuthErrorReason_AccessTokenInvalid OAuthErrorReason = "access_token_invalid" + OAuthErrorReason_AccessTokenRequired OAuthErrorReason = "access_token_required" + OAuthErrorReason_RefreshTokenNotFound OAuthErrorReason = "refresh_token_not_found" + OAuthErrorReason_RefreshTokenTypeNotSupported OAuthErrorReason = "refresh_token_type_not_supported" + OAuthErrorReason_InvalidClientId OAuthErrorReason = "invalid_client_id" + OAuthErrorReason_InvalidUserCredentials OAuthErrorReason = "invalid_user_credentials" + OAuthErrorReason_InvalidGrantType OAuthErrorReason = "invalid_grant_type" + OAuthErrorReason_InvalidOrigin OAuthErrorReason = "invalid_origin" + OAuthErrorReason_InvalidOriginOpaque OAuthErrorReason = "invalid_origin_opaque" + OAuthErrorReason_InvalidPkceCodeVerifier OAuthErrorReason = "invalid_pkce_code_verifier" + OAuthErrorReason_InvalidPkceCodeChallenge OAuthErrorReason = "invalid_pkce_code_challenge" + OAuthErrorReason_InvalidPkceCodeChallengeMethod OAuthErrorReason = "invalid_pkce_code_challenge_method" + OAuthErrorReason_InvalidRedirectUri OAuthErrorReason = "invalid_redirect_uri" + OAuthErrorReason_InvalidResponseMode OAuthErrorReason = "invalid_response_mode" + OAuthErrorReason_InvalidResponseType OAuthErrorReason = "invalid_response_type" + OAuthErrorReason_InvalidIdTokenHint OAuthErrorReason = "invalid_id_token_hint" + OAuthErrorReason_InvalidPostLogoutRedirectUri OAuthErrorReason = "invalid_post_logout_redirect_uri" + OAuthErrorReason_InvalidDeviceCode OAuthErrorReason = "invalid_device_code" + OAuthErrorReason_InvalidUserCode OAuthErrorReason = "invalid_user_code" + OAuthErrorReason_InvalidAdditionalClientId OAuthErrorReason = "invalid_additional_client_id" + OAuthErrorReason_InvalidTargetEntityScope OAuthErrorReason = "invalid_target_entity_scope" + OAuthErrorReason_InvalidEntityPermissionScope OAuthErrorReason = "invalid_entity_permission_scope" + OAuthErrorReason_InvalidUserId OAuthErrorReason = "invalid_user_id" + OAuthErrorReason_GrantTypeDisabled OAuthErrorReason = "grant_type_disabled" + OAuthErrorReason_MissingClientId OAuthErrorReason = "missing_client_id" + OAuthErrorReason_MissingClientSecret OAuthErrorReason = "missing_client_secret" + OAuthErrorReason_MissingCode OAuthErrorReason = "missing_code" + OAuthErrorReason_MissingCodeChallenge OAuthErrorReason = "missing_code_challenge" + OAuthErrorReason_MissingCodeVerifier OAuthErrorReason = "missing_code_verifier" + OAuthErrorReason_MissingDeviceCode OAuthErrorReason = "missing_device_code" + OAuthErrorReason_MissingGrantType OAuthErrorReason = "missing_grant_type" + OAuthErrorReason_MissingRedirectUri OAuthErrorReason = "missing_redirect_uri" + OAuthErrorReason_MissingRefreshToken OAuthErrorReason = "missing_refresh_token" + OAuthErrorReason_MissingResponseType OAuthErrorReason = "missing_response_type" + OAuthErrorReason_MissingToken OAuthErrorReason = "missing_token" + OAuthErrorReason_MissingUserCode OAuthErrorReason = "missing_user_code" + OAuthErrorReason_MissingUserId OAuthErrorReason = "missing_user_id" + OAuthErrorReason_MissingVerificationUri OAuthErrorReason = "missing_verification_uri" + OAuthErrorReason_LoginPrevented OAuthErrorReason = "login_prevented" + OAuthErrorReason_NotLicensed OAuthErrorReason = "not_licensed" + OAuthErrorReason_UserCodeExpired OAuthErrorReason = "user_code_expired" + OAuthErrorReason_UserExpired OAuthErrorReason = "user_expired" + OAuthErrorReason_UserLocked OAuthErrorReason = "user_locked" + OAuthErrorReason_UserNotFound OAuthErrorReason = "user_not_found" + OAuthErrorReason_ClientAuthenticationMissing OAuthErrorReason = "client_authentication_missing" + OAuthErrorReason_InvalidClientAuthenticationScheme OAuthErrorReason = "invalid_client_authentication_scheme" + OAuthErrorReason_InvalidClientAuthentication OAuthErrorReason = "invalid_client_authentication" + OAuthErrorReason_ClientIdMismatch OAuthErrorReason = "client_id_mismatch" + OAuthErrorReason_ChangePasswordAdministrative OAuthErrorReason = "change_password_administrative" + OAuthErrorReason_ChangePasswordBreached OAuthErrorReason = "change_password_breached" + OAuthErrorReason_ChangePasswordExpired OAuthErrorReason = "change_password_expired" + OAuthErrorReason_ChangePasswordValidation OAuthErrorReason = "change_password_validation" + OAuthErrorReason_Unknown OAuthErrorReason = "unknown" + OAuthErrorReason_MissingRequiredScope OAuthErrorReason = "missing_required_scope" + OAuthErrorReason_UnknownScope OAuthErrorReason = "unknown_scope" + OAuthErrorReason_ConsentCanceled OAuthErrorReason = "consent_canceled" +) + +type OAuthErrorType string + +func (e OAuthErrorType) String() string { + return string(e) +} + +const ( + OAuthErrorType_InvalidRequest OAuthErrorType = "invalid_request" + OAuthErrorType_InvalidClient OAuthErrorType = "invalid_client" + OAuthErrorType_InvalidGrant OAuthErrorType = "invalid_grant" + OAuthErrorType_InvalidToken OAuthErrorType = "invalid_token" + OAuthErrorType_UnauthorizedClient OAuthErrorType = "unauthorized_client" + OAuthErrorType_InvalidScope OAuthErrorType = "invalid_scope" + OAuthErrorType_ServerError OAuthErrorType = "server_error" + OAuthErrorType_UnsupportedGrantType OAuthErrorType = "unsupported_grant_type" + OAuthErrorType_UnsupportedResponseType OAuthErrorType = "unsupported_response_type" + OAuthErrorType_AccessDenied OAuthErrorType = "access_denied" + OAuthErrorType_ChangePasswordRequired OAuthErrorType = "change_password_required" + OAuthErrorType_NotLicensed OAuthErrorType = "not_licensed" + OAuthErrorType_TwoFactorRequired OAuthErrorType = "two_factor_required" + OAuthErrorType_AuthorizationPending OAuthErrorType = "authorization_pending" + OAuthErrorType_ExpiredToken OAuthErrorType = "expired_token" + OAuthErrorType_UnsupportedTokenType OAuthErrorType = "unsupported_token_type" +) + +/** + * Interface for all identity providers that can be domain based. + */ +type DomainBasedIdentityProvider struct { +} + +/** + * @author Daniel DeGroff + */ +type DeviceInfo struct { + Description string `json:"description,omitempty"` + LastAccessedAddress string `json:"lastAccessedAddress,omitempty"` + LastAccessedInstant int64 `json:"lastAccessedInstant,omitempty"` + Name string `json:"name,omitempty"` + Type string `json:"type,omitempty"` +} + +type DeviceType string + +func (e DeviceType) String() string { + return string(e) +} + +const ( + DeviceType_BROWSER DeviceType = "BROWSER" + DeviceType_DESKTOP DeviceType = "DESKTOP" + DeviceType_LAPTOP DeviceType = "LAPTOP" + DeviceType_MOBILE DeviceType = "MOBILE" + DeviceType_OTHER DeviceType = "OTHER" + DeviceType_SERVER DeviceType = "SERVER" + DeviceType_TABLET DeviceType = "TABLET" + DeviceType_TV DeviceType = "TV" + DeviceType_UNKNOWN DeviceType = "UNKNOWN" +) + +/** + * Response for the system configuration API. * - * @author Spencer Witt + * @author Brian Pontarelli */ -type WebhookEventLogResponse struct { +type SystemConfigurationResponse struct { BaseHTTPResponse - WebhookEventLog WebhookEventLog `json:"webhookEventLog,omitempty"` + SystemConfiguration SystemConfiguration `json:"systemConfiguration,omitempty"` } -func (b *WebhookEventLogResponse) SetStatus(status int) { +func (b *SystemConfigurationResponse) SetStatus(status int) { b.StatusCode = status } /** - * The public Status API response - * * @author Daniel DeGroff */ -type StatusResponse struct { +type ReactorStatus struct { + AdvancedIdentityProviders ReactorFeatureStatus `json:"advancedIdentityProviders,omitempty"` + AdvancedLambdas ReactorFeatureStatus `json:"advancedLambdas,omitempty"` + AdvancedMultiFactorAuthentication ReactorFeatureStatus `json:"advancedMultiFactorAuthentication,omitempty"` + AdvancedOAuthScopes ReactorFeatureStatus `json:"advancedOAuthScopes,omitempty"` + AdvancedOAuthScopesCustomScopes ReactorFeatureStatus `json:"advancedOAuthScopesCustomScopes,omitempty"` + AdvancedOAuthScopesThirdPartyApplications ReactorFeatureStatus `json:"advancedOAuthScopesThirdPartyApplications,omitempty"` + AdvancedRegistration ReactorFeatureStatus `json:"advancedRegistration,omitempty"` + ApplicationMultiFactorAuthentication ReactorFeatureStatus `json:"applicationMultiFactorAuthentication,omitempty"` + ApplicationThemes ReactorFeatureStatus `json:"applicationThemes,omitempty"` + BreachedPasswordDetection ReactorFeatureStatus `json:"breachedPasswordDetection,omitempty"` + Connectors ReactorFeatureStatus `json:"connectors,omitempty"` + EntityManagement ReactorFeatureStatus `json:"entityManagement,omitempty"` + Expiration string `json:"expiration,omitempty"` + LicenseAttributes map[string]string `json:"licenseAttributes,omitempty"` + Licensed bool `json:"licensed"` + ScimServer ReactorFeatureStatus `json:"scimServer,omitempty"` + ThreatDetection ReactorFeatureStatus `json:"threatDetection,omitempty"` + WebAuthn ReactorFeatureStatus `json:"webAuthn,omitempty"` + WebAuthnPlatformAuthenticators ReactorFeatureStatus `json:"webAuthnPlatformAuthenticators,omitempty"` + WebAuthnRoamingAuthenticators ReactorFeatureStatus `json:"webAuthnRoamingAuthenticators,omitempty"` +} + +/** + * API response for completing WebAuthn assertion + * + * @author Spencer Witt + */ +type WebAuthnAssertResponse struct { BaseHTTPResponse - LinkedHashMap + Credential WebAuthnCredential `json:"credential,omitempty"` } -func (b *StatusResponse) SetStatus(status int) { +func (b *WebAuthnAssertResponse) SetStatus(status int) { b.StatusCode = status } -type RegistrationType string +/** + * @author Daniel DeGroff + */ +type ApplicationMultiFactorTrustPolicy string -func (e RegistrationType) String() string { +func (e ApplicationMultiFactorTrustPolicy) String() string { return string(e) } const ( - RegistrationType_Basic RegistrationType = "basic" - RegistrationType_Advanced RegistrationType = "advanced" + ApplicationMultiFactorTrustPolicy_Any ApplicationMultiFactorTrustPolicy = "Any" + ApplicationMultiFactorTrustPolicy_This ApplicationMultiFactorTrustPolicy = "This" + ApplicationMultiFactorTrustPolicy_None ApplicationMultiFactorTrustPolicy = "None" ) /** - * @author Brett Pontarelli + * @author Daniel DeGroff */ -type XboxApplicationConfiguration struct { - BaseIdentityProviderApplicationConfiguration - ButtonText string `json:"buttonText,omitempty"` - ClientId string `json:"client_id,omitempty"` - ClientSecret string `json:"client_secret,omitempty"` - Scope string `json:"scope,omitempty"` +type MaximumPasswordAge struct { + Enableable + Days int `json:"days,omitempty"` } /** - * Search criteria for Groups + * Information about a user event (login, register, etc) that helps identify the source of the event (location, device type, OS, etc). * + * @author Brian Pontarelli + */ +type EventInfo struct { + Data map[string]interface{} `json:"data,omitempty"` + DeviceDescription string `json:"deviceDescription,omitempty"` + DeviceName string `json:"deviceName,omitempty"` + DeviceType string `json:"deviceType,omitempty"` + IpAddress string `json:"ipAddress,omitempty"` + Location Location `json:"location,omitempty"` + Os string `json:"os,omitempty"` + UserAgent string `json:"userAgent,omitempty"` +} + +/** * @author Daniel DeGroff */ -type GroupSearchCriteria struct { - BaseSearchCriteria - Name string `json:"name,omitempty"` - TenantId string `json:"tenantId,omitempty"` +type RateLimitedRequestType string + +func (e RateLimitedRequestType) String() string { + return string(e) } -type MultiFactorSMSMethod struct { - Enableable - MessengerId string `json:"messengerId,omitempty"` - TemplateId string `json:"templateId,omitempty"` +const ( + RateLimitedRequestType_FailedLogin RateLimitedRequestType = "FailedLogin" + RateLimitedRequestType_ForgotPassword RateLimitedRequestType = "ForgotPassword" + RateLimitedRequestType_SendEmailVerification RateLimitedRequestType = "SendEmailVerification" + RateLimitedRequestType_SendPasswordless RateLimitedRequestType = "SendPasswordless" + RateLimitedRequestType_SendRegistrationVerification RateLimitedRequestType = "SendRegistrationVerification" + RateLimitedRequestType_SendTwoFactor RateLimitedRequestType = "SendTwoFactor" +) + +/** + * Audit log response. + * + * @author Brian Pontarelli + */ +type AuditLogSearchResponse struct { + BaseHTTPResponse + AuditLogs []AuditLog `json:"auditLogs,omitempty"` + Total int64 `json:"total,omitempty"` +} + +func (b *AuditLogSearchResponse) SetStatus(status int) { + b.StatusCode = status } /** - * @author Brett Guy + * @author Daniel DeGroff */ -type MessengerResponse struct { +type LambdaEngineType string + +func (e LambdaEngineType) String() string { + return string(e) +} + +const ( + LambdaEngineType_GraalJS LambdaEngineType = "GraalJS" + LambdaEngineType_Nashorn LambdaEngineType = "Nashorn" +) + +/** + * SAML v2 identity provider configuration. + * + * @author Brian Pontarelli + */ +type SAMLv2IdentityProvider struct { + BaseSAMLv2IdentityProvider + AssertionConfiguration SAMLv2AssertionConfiguration `json:"assertionConfiguration,omitempty"` + ButtonImageURL string `json:"buttonImageURL,omitempty"` + ButtonText string `json:"buttonText,omitempty"` + Domains []string `json:"domains,omitempty"` + IdpEndpoint string `json:"idpEndpoint,omitempty"` + IdpInitiatedConfiguration SAMLv2IdpInitiatedConfiguration `json:"idpInitiatedConfiguration,omitempty"` + Issuer string `json:"issuer,omitempty"` + LoginHintConfiguration LoginHintConfiguration `json:"loginHintConfiguration,omitempty"` + NameIdFormat string `json:"nameIdFormat,omitempty"` + PostRequest bool `json:"postRequest"` + RequestSigningKeyId string `json:"requestSigningKeyId,omitempty"` + SignRequest bool `json:"signRequest"` + XmlSignatureC14nMethod CanonicalizationMethod `json:"xmlSignatureC14nMethod,omitempty"` +} + +/** + * API response for starting a WebAuthn authentication ceremony + * + * @author Spencer Witt + */ +type WebAuthnStartResponse struct { BaseHTTPResponse - Messenger BaseMessengerConfiguration `json:"messenger,omitempty"` - Messengers []BaseMessengerConfiguration `json:"messengers,omitempty"` + Options PublicKeyCredentialRequestOptions `json:"options,omitempty"` } -func (b *MessengerResponse) SetStatus(status int) { +func (b *WebAuthnStartResponse) SetStatus(status int) { b.StatusCode = status } /** - * Models the User Login Failed Event. + * Search request for entity types. * + * @author Brian Pontarelli + */ +type EntityTypeSearchRequest struct { + Search EntityTypeSearchCriteria `json:"search,omitempty"` +} + +// Do not require a setter for 'type', it is defined by the concrete class and is not mutable +type BaseConnectorConfiguration struct { + Data map[string]interface{} `json:"data,omitempty"` + Debug bool `json:"debug"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + Name string `json:"name,omitempty"` + Type ConnectorType `json:"type,omitempty"` +} + +/** + * API request for managing families and members. + * + * @author Brian Pontarelli + */ +type FamilyRequest struct { + FamilyMember FamilyMember `json:"familyMember,omitempty"` +} + +/** * @author Daniel DeGroff */ -type UserLoginFailedEvent struct { - BaseUserEvent - ApplicationId string `json:"applicationId,omitempty"` - AuthenticationType string `json:"authenticationType,omitempty"` - IpAddress string `json:"ipAddress,omitempty"` - Reason UserLoginFailedReason `json:"reason,omitempty"` +type ReloadRequest struct { + Names []string `json:"names,omitempty"` +} + +/** + * @author Brett Guy + */ +type TwoFactorStartRequest struct { + ApplicationId string `json:"applicationId,omitempty"` + Code string `json:"code,omitempty"` + LoginId string `json:"loginId,omitempty"` + State map[string]interface{} `json:"state,omitempty"` + TrustChallenge string `json:"trustChallenge,omitempty"` + UserId string `json:"userId,omitempty"` } /** * @author Daniel DeGroff */ -type Tenant struct { - AccessControlConfiguration TenantAccessControlConfiguration `json:"accessControlConfiguration,omitempty"` - CaptchaConfiguration TenantCaptchaConfiguration `json:"captchaConfiguration,omitempty"` - Configured bool `json:"configured"` - ConnectorPolicies []ConnectorPolicy `json:"connectorPolicies,omitempty"` - Data map[string]interface{} `json:"data,omitempty"` - EmailConfiguration EmailConfiguration `json:"emailConfiguration,omitempty"` - EventConfiguration EventConfiguration `json:"eventConfiguration,omitempty"` - ExternalIdentifierConfiguration ExternalIdentifierConfiguration `json:"externalIdentifierConfiguration,omitempty"` - FailedAuthenticationConfiguration FailedAuthenticationConfiguration `json:"failedAuthenticationConfiguration,omitempty"` - FamilyConfiguration FamilyConfiguration `json:"familyConfiguration,omitempty"` - FormConfiguration TenantFormConfiguration `json:"formConfiguration,omitempty"` - HttpSessionMaxInactiveInterval int `json:"httpSessionMaxInactiveInterval,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - Issuer string `json:"issuer,omitempty"` - JwtConfiguration JWTConfiguration `json:"jwtConfiguration,omitempty"` - LambdaConfiguration TenantLambdaConfiguration `json:"lambdaConfiguration,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - LoginConfiguration TenantLoginConfiguration `json:"loginConfiguration,omitempty"` - LogoutURL string `json:"logoutURL,omitempty"` - MaximumPasswordAge MaximumPasswordAge `json:"maximumPasswordAge,omitempty"` - MinimumPasswordAge MinimumPasswordAge `json:"minimumPasswordAge,omitempty"` - MultiFactorConfiguration TenantMultiFactorConfiguration `json:"multiFactorConfiguration,omitempty"` - Name string `json:"name,omitempty"` - OauthConfiguration TenantOAuth2Configuration `json:"oauthConfiguration,omitempty"` - PasswordEncryptionConfiguration PasswordEncryptionConfiguration `json:"passwordEncryptionConfiguration,omitempty"` - PasswordValidationRules PasswordValidationRules `json:"passwordValidationRules,omitempty"` - RateLimitConfiguration TenantRateLimitConfiguration `json:"rateLimitConfiguration,omitempty"` - RegistrationConfiguration TenantRegistrationConfiguration `json:"registrationConfiguration,omitempty"` - ScimServerConfiguration TenantSCIMServerConfiguration `json:"scimServerConfiguration,omitempty"` - SsoConfiguration TenantSSOConfiguration `json:"ssoConfiguration,omitempty"` - State ObjectState `json:"state,omitempty"` - ThemeId string `json:"themeId,omitempty"` - UserDeletePolicy TenantUserDeletePolicy `json:"userDeletePolicy,omitempty"` - UsernameConfiguration TenantUsernameConfiguration `json:"usernameConfiguration,omitempty"` - WebAuthnConfiguration TenantWebAuthnConfiguration `json:"webAuthnConfiguration,omitempty"` +type ApplicationMultiFactorConfiguration struct { + Email MultiFactorEmailTemplate `json:"email,omitempty"` + LoginPolicy MultiFactorLoginPolicy `json:"loginPolicy,omitempty"` + Sms MultiFactorSMSTemplate `json:"sms,omitempty"` + TrustPolicy ApplicationMultiFactorTrustPolicy `json:"trustPolicy,omitempty"` +} + +type MultiFactorEmailTemplate struct { + TemplateId string `json:"templateId,omitempty"` +} + +type MultiFactorSMSTemplate struct { + TemplateId string `json:"templateId,omitempty"` } /** - * Models the Group Member Update Complete Event. - * * @author Daniel DeGroff */ -type GroupMemberUpdateCompleteEvent struct { - BaseGroupEvent - Members []GroupMember `json:"members,omitempty"` +type IssueResponse struct { + BaseHTTPResponse + RefreshToken string `json:"refreshToken,omitempty"` + Token string `json:"token,omitempty"` } -// Do not require a setter for 'type', it is defined by the concrete class and is not mutable -type BaseMessengerConfiguration struct { - Data map[string]interface{} `json:"data,omitempty"` - Debug bool `json:"debug"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - Name string `json:"name,omitempty"` - Transport string `json:"transport,omitempty"` - Type MessengerType `json:"type,omitempty"` +func (b *IssueResponse) SetStatus(status int) { + b.StatusCode = status } /** * @author Daniel DeGroff */ -type TwoFactorStartResponse struct { +type IdentityProviderLinkResponse struct { BaseHTTPResponse - Code string `json:"code,omitempty"` - Methods []TwoFactorMethod `json:"methods,omitempty"` - TwoFactorId string `json:"twoFactorId,omitempty"` + IdentityProviderLink IdentityProviderLink `json:"identityProviderLink,omitempty"` + IdentityProviderLinks []IdentityProviderLink `json:"identityProviderLinks,omitempty"` } -func (b *TwoFactorStartResponse) SetStatus(status int) { +func (b *IdentityProviderLinkResponse) SetStatus(status int) { b.StatusCode = status } -type PasswordlessConfiguration struct { - Enableable +/** + * Request to authenticate with WebAuthn + * + * @author Spencer Witt + */ +type WebAuthnPublicKeyAuthenticationRequest struct { + ClientExtensionResults WebAuthnExtensionsClientOutputs `json:"clientExtensionResults,omitempty"` + Id string `json:"id,omitempty"` + Response WebAuthnAuthenticatorAuthenticationResponse `json:"response,omitempty"` + RpId string `json:"rpId,omitempty"` + Type string `json:"type,omitempty"` } /** - * Search request for entity grants. + * Entity API request object. * * @author Brian Pontarelli */ -type EntityGrantSearchResponse struct { - BaseHTTPResponse - Grants []EntityGrant `json:"grants,omitempty"` - Total int64 `json:"total,omitempty"` -} - -func (b *EntityGrantSearchResponse) SetStatus(status int) { - b.StatusCode = status +type EntityRequest struct { + Entity Entity `json:"entity,omitempty"` } /** - * @author Trevor Smith + * Models the Group Update Event. + * + * @author Daniel DeGroff */ -type Theme struct { - Data map[string]interface{} `json:"data,omitempty"` - DefaultMessages string `json:"defaultMessages,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - LocalizedMessages map[string]string `json:"localizedMessages,omitempty"` - Name string `json:"name,omitempty"` - Stylesheet string `json:"stylesheet,omitempty"` - Templates Templates `json:"templates,omitempty"` - Type ThemeType `json:"type,omitempty"` - Variables SimpleThemeVariables `json:"variables,omitempty"` +type GroupUpdateEvent struct { + BaseGroupEvent + Original Group `json:"original,omitempty"` } /** - * @author Daniel DeGroff + * CleanSpeak configuration at the system and application level. + * + * @author Brian Pontarelli */ -type RefreshTokenExpirationPolicy string - -func (e RefreshTokenExpirationPolicy) String() string { - return string(e) +type CleanSpeakConfiguration struct { + Enableable + ApiKey string `json:"apiKey,omitempty"` + ApplicationIds []string `json:"applicationIds,omitempty"` + Url string `json:"url,omitempty"` + UsernameModeration UsernameModeration `json:"usernameModeration,omitempty"` } -const ( - RefreshTokenExpirationPolicy_Fixed RefreshTokenExpirationPolicy = "Fixed" - RefreshTokenExpirationPolicy_SlidingWindow RefreshTokenExpirationPolicy = "SlidingWindow" - RefreshTokenExpirationPolicy_SlidingWindowWithMaximumLifetime RefreshTokenExpirationPolicy = "SlidingWindowWithMaximumLifetime" -) +type UsernameModeration struct { + Enableable + ApplicationId string `json:"applicationId,omitempty"` +} /** - * Login API request object used for login to third-party systems (i.e. Login with Facebook). + * Stores an email template used to send emails to users. * * @author Brian Pontarelli */ -type IdentityProviderLoginRequest struct { - BaseLoginRequest - Data map[string]string `json:"data,omitempty"` - EncodedJWT string `json:"encodedJWT,omitempty"` - IdentityProviderId string `json:"identityProviderId,omitempty"` - NoLink bool `json:"noLink"` +type EmailTemplate struct { + DefaultFromName string `json:"defaultFromName,omitempty"` + DefaultHtmlTemplate string `json:"defaultHtmlTemplate,omitempty"` + DefaultSubject string `json:"defaultSubject,omitempty"` + DefaultTextTemplate string `json:"defaultTextTemplate,omitempty"` + FromEmail string `json:"fromEmail,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + LocalizedFromNames map[string]string `json:"localizedFromNames,omitempty"` + LocalizedHtmlTemplates map[string]string `json:"localizedHtmlTemplates,omitempty"` + LocalizedSubjects map[string]string `json:"localizedSubjects,omitempty"` + LocalizedTextTemplates map[string]string `json:"localizedTextTemplates,omitempty"` + Name string `json:"name,omitempty"` } /** - * Group API response object. + * API response for managing families and members. * - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type GroupResponse struct { +type FamilyResponse struct { BaseHTTPResponse - Group Group `json:"group,omitempty"` - Groups []Group `json:"groups,omitempty"` + Families []Family `json:"families,omitempty"` + Family Family `json:"family,omitempty"` } -func (b *GroupResponse) SetStatus(status int) { +func (b *FamilyResponse) SetStatus(status int) { b.StatusCode = status } /** - * A policy to configure if and when the user-action is canceled prior to the expiration of the action. + * Search response for Group Members * * @author Daniel DeGroff */ -type FailedAuthenticationActionCancelPolicy struct { - OnPasswordReset bool `json:"onPasswordReset"` +type GroupMemberSearchResponse struct { + BaseHTTPResponse + Members []GroupMember `json:"members,omitempty"` + Total int64 `json:"total,omitempty"` } -/** - * @author Daniel DeGroff - */ -type UnverifiedBehavior string - -func (e UnverifiedBehavior) String() string { - return string(e) +func (b *GroupMemberSearchResponse) SetStatus(status int) { + b.StatusCode = status } -const ( - UnverifiedBehavior_Allow UnverifiedBehavior = "Allow" - UnverifiedBehavior_Gated UnverifiedBehavior = "Gated" -) - /** - * Models a consent. - * * @author Daniel DeGroff */ -type Consent struct { - ConsentEmailTemplateId string `json:"consentEmailTemplateId,omitempty"` - CountryMinimumAgeForSelfConsent map[string]int `json:"countryMinimumAgeForSelfConsent,omitempty"` - Data map[string]interface{} `json:"data,omitempty"` - DefaultMinimumAgeForSelfConsent int `json:"defaultMinimumAgeForSelfConsent,omitempty"` - EmailPlus EmailPlus `json:"emailPlus,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - MultipleValuesAllowed bool `json:"multipleValuesAllowed"` - Name string `json:"name,omitempty"` - Values []string `json:"values,omitempty"` +type BreachedPasswordTenantMetric struct { + ActionRequired int `json:"actionRequired,omitempty"` + MatchedCommonPasswordCount int `json:"matchedCommonPasswordCount,omitempty"` + MatchedExactCount int `json:"matchedExactCount,omitempty"` + MatchedPasswordCount int `json:"matchedPasswordCount,omitempty"` + MatchedSubAddressCount int `json:"matchedSubAddressCount,omitempty"` + PasswordsCheckedCount int `json:"passwordsCheckedCount,omitempty"` } /** - * @author Brett Guy + * JWT Configuration. A JWT Configuration for an Application may not be active if it is using the global configuration, the configuration + * may be enabled = false. + * + * @author Daniel DeGroff */ -type IPAccessControlListRequest struct { - IpAccessControlList IPAccessControlList `json:"ipAccessControlList,omitempty"` +type JWTConfiguration struct { + Enableable + AccessTokenKeyId string `json:"accessTokenKeyId,omitempty"` + IdTokenKeyId string `json:"idTokenKeyId,omitempty"` + RefreshTokenExpirationPolicy RefreshTokenExpirationPolicy `json:"refreshTokenExpirationPolicy,omitempty"` + RefreshTokenRevocationPolicy RefreshTokenRevocationPolicy `json:"refreshTokenRevocationPolicy,omitempty"` + RefreshTokenSlidingWindowConfiguration RefreshTokenSlidingWindowConfiguration `json:"refreshTokenSlidingWindowConfiguration,omitempty"` + RefreshTokenTimeToLiveInMinutes int `json:"refreshTokenTimeToLiveInMinutes,omitempty"` + RefreshTokenUsagePolicy RefreshTokenUsagePolicy `json:"refreshTokenUsagePolicy,omitempty"` + TimeToLiveInSeconds int `json:"timeToLiveInSeconds,omitempty"` } /** @@ -4348,3309 +4269,3412 @@ type SAMLv2ApplicationConfiguration struct { } /** - * @author Brian Pontarelli + * @author Brett Guy */ -type AuditLogSearchRequest struct { - Search AuditLogSearchCriteria `json:"search,omitempty"` +type MessengerRequest struct { + Messenger BaseMessengerConfiguration `json:"messenger,omitempty"` } /** - * Models the User Password Breach Event. + * A log for an action that was taken on a User. * - * @author Matthew Altman - */ -type UserPasswordBreachEvent struct { - BaseUserEvent -} - -/** - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type ReactorMetrics struct { - BreachedPasswordMetrics map[string]BreachedPasswordTenantMetric `json:"breachedPasswordMetrics,omitempty"` +type UserActionLog struct { + ActioneeUserId string `json:"actioneeUserId,omitempty"` + ActionerUserId string `json:"actionerUserId,omitempty"` + ApplicationIds []string `json:"applicationIds,omitempty"` + Comment string `json:"comment,omitempty"` + EmailUserOnEnd bool `json:"emailUserOnEnd"` + EndEventSent bool `json:"endEventSent"` + Expiry int64 `json:"expiry,omitempty"` + History LogHistory `json:"history,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LocalizedName string `json:"localizedName,omitempty"` + LocalizedOption string `json:"localizedOption,omitempty"` + LocalizedReason string `json:"localizedReason,omitempty"` + Name string `json:"name,omitempty"` + NotifyUserOnEnd bool `json:"notifyUserOnEnd"` + Option string `json:"option,omitempty"` + Reason string `json:"reason,omitempty"` + ReasonCode string `json:"reasonCode,omitempty"` + UserActionId string `json:"userActionId,omitempty"` } /** - * @author Daniel DeGroff + * Contains extension output for requested extensions during a WebAuthn ceremony + * + * @author Spencer Witt */ -type SendRequest struct { - ApplicationId string `json:"applicationId,omitempty"` - BccAddresses []string `json:"bccAddresses,omitempty"` - CcAddresses []string `json:"ccAddresses,omitempty"` - PreferredLanguages []string `json:"preferredLanguages,omitempty"` - RequestData map[string]interface{} `json:"requestData,omitempty"` - ToAddresses []EmailAddress `json:"toAddresses,omitempty"` - UserIds []string `json:"userIds,omitempty"` -} - -type AuditLogConfiguration struct { - Delete DeleteConfiguration `json:"delete,omitempty"` +type WebAuthnExtensionsClientOutputs struct { + CredProps CredentialPropertiesOutput `json:"credProps,omitempty"` } /** - * User login failed reason codes. + * Describes a user account or WebAuthn Relying Party associated with a public key credential */ -type UserLoginFailedReasonCode struct { +type PublicKeyCredentialEntity struct { + Name string `json:"name,omitempty"` } /** - * Models the User Event (and can be converted to JSON) that is used for all user modifications (create, update, - * delete). + * Registration delete API request object. * * @author Brian Pontarelli */ -type UserDeleteEvent struct { - BaseUserEvent +type RegistrationDeleteRequest struct { + BaseEventRequest } /** - * A custom OAuth scope for a specific application. + * Used to express whether the Relying Party requires user verification for the + * current operation. * * @author Spencer Witt */ -type ApplicationOAuthScope struct { - ApplicationId string `json:"applicationId,omitempty"` - Data map[string]interface{} `json:"data,omitempty"` - DefaultConsentDetail string `json:"defaultConsentDetail,omitempty"` - DefaultConsentMessage string `json:"defaultConsentMessage,omitempty"` - Description string `json:"description,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - Name string `json:"name,omitempty"` - Required bool `json:"required"` +type UserVerificationRequirement string + +func (e UserVerificationRequirement) String() string { + return string(e) } +const ( + UserVerificationRequirement_Required UserVerificationRequirement = "required" + UserVerificationRequirement_Preferred UserVerificationRequirement = "preferred" + UserVerificationRequirement_Discouraged UserVerificationRequirement = "discouraged" +) + /** - * Registration delete API request object. + * Helper interface that indicates an identity provider can be federated to using the HTTP POST method. * * @author Brian Pontarelli */ -type RegistrationDeleteRequest struct { - BaseEventRequest +type SupportsPostBindings struct { } /** - * The phases of a time-based user action. - * * @author Brian Pontarelli */ -type UserActionPhase string +type ExpiryUnit string -func (e UserActionPhase) String() string { +func (e ExpiryUnit) String() string { return string(e) } const ( - UserActionPhase_Start UserActionPhase = "start" - UserActionPhase_Modify UserActionPhase = "modify" - UserActionPhase_Cancel UserActionPhase = "cancel" - UserActionPhase_End UserActionPhase = "end" + ExpiryUnit_MINUTES ExpiryUnit = "MINUTES" + ExpiryUnit_HOURS ExpiryUnit = "HOURS" + ExpiryUnit_DAYS ExpiryUnit = "DAYS" + ExpiryUnit_WEEKS ExpiryUnit = "WEEKS" + ExpiryUnit_MONTHS ExpiryUnit = "MONTHS" + ExpiryUnit_YEARS ExpiryUnit = "YEARS" ) /** - * @author Daniel DeGroff + * Search response for Themes + * + * @author Mark Manes */ -type VerifyEmailRequest struct { - BaseEventRequest - OneTimeCode string `json:"oneTimeCode,omitempty"` - UserId string `json:"userId,omitempty"` - VerificationId string `json:"verificationId,omitempty"` +type ThemeSearchResponse struct { + BaseHTTPResponse + Themes []Theme `json:"themes,omitempty"` + Total int64 `json:"total,omitempty"` +} + +func (b *ThemeSearchResponse) SetStatus(status int) { + b.StatusCode = status } /** * @author Brian Pontarelli */ -type TwoFactorDisableRequest struct { - BaseEventRequest - ApplicationId string `json:"applicationId,omitempty"` - Code string `json:"code,omitempty"` - MethodId string `json:"methodId,omitempty"` +type AuditLogSearchCriteria struct { + BaseSearchCriteria + End int64 `json:"end,omitempty"` + Message string `json:"message,omitempty"` + NewValue string `json:"newValue,omitempty"` + OldValue string `json:"oldValue,omitempty"` + Reason string `json:"reason,omitempty"` + Start int64 `json:"start,omitempty"` + User string `json:"user,omitempty"` } /** - * Google social login provider. - * * @author Daniel DeGroff */ -type GoogleIdentityProvider struct { +type HYPRIdentityProvider struct { BaseIdentityProvider - ButtonText string `json:"buttonText,omitempty"` - ClientId string `json:"client_id,omitempty"` - ClientSecret string `json:"client_secret,omitempty"` - LoginMethod IdentityProviderLoginMethod `json:"loginMethod,omitempty"` - Properties GoogleIdentityProviderProperties `json:"properties,omitempty"` - Scope string `json:"scope,omitempty"` + RelyingPartyApplicationId string `json:"relyingPartyApplicationId,omitempty"` + RelyingPartyURL string `json:"relyingPartyURL,omitempty"` +} + +/** + * @author Brett Guy + */ +type ClientAuthenticationPolicy string + +func (e ClientAuthenticationPolicy) String() string { + return string(e) } +const ( + ClientAuthenticationPolicy_Required ClientAuthenticationPolicy = "Required" + ClientAuthenticationPolicy_NotRequired ClientAuthenticationPolicy = "NotRequired" + ClientAuthenticationPolicy_NotRequiredWhenUsingPKCE ClientAuthenticationPolicy = "NotRequiredWhenUsingPKCE" +) + /** * @author Daniel DeGroff */ -type FormStep struct { - Fields []string `json:"fields,omitempty"` +type PendingIdPLink struct { + DisplayName string `json:"displayName,omitempty"` + Email string `json:"email,omitempty"` + IdentityProviderId string `json:"identityProviderId,omitempty"` + IdentityProviderLinks []IdentityProviderLink `json:"identityProviderLinks,omitempty"` + IdentityProviderName string `json:"identityProviderName,omitempty"` + IdentityProviderTenantConfiguration IdentityProviderTenantConfiguration `json:"identityProviderTenantConfiguration,omitempty"` + IdentityProviderType IdentityProviderType `json:"identityProviderType,omitempty"` + IdentityProviderUserId string `json:"identityProviderUserId,omitempty"` + User User `json:"user,omitempty"` + Username string `json:"username,omitempty"` } /** - * A Tenant-level policy for deleting Users. + * API response for starting a WebAuthn registration ceremony + * + * @author Spencer Witt + */ +type WebAuthnRegisterStartResponse struct { + BaseHTTPResponse + Options PublicKeyCredentialCreationOptions `json:"options,omitempty"` +} + +func (b *WebAuthnRegisterStartResponse) SetStatus(status int) { + b.StatusCode = status +} + +/** + * A Application-level policy for deleting Users. * * @author Trevor Smith */ -type TenantUserDeletePolicy struct { +type ApplicationRegistrationDeletePolicy struct { Unverified TimeBasedDeletePolicy `json:"unverified,omitempty"` } /** - * @author Brett Pontarelli + * @author Daniel DeGroff */ -type SonyPSNApplicationConfiguration struct { - BaseIdentityProviderApplicationConfiguration - ButtonText string `json:"buttonText,omitempty"` - ClientId string `json:"client_id,omitempty"` - ClientSecret string `json:"client_secret,omitempty"` - Scope string `json:"scope,omitempty"` +type IdentityProviderLimitUserLinkingPolicy struct { + Enableable + MaximumLinks int `json:"maximumLinks,omitempty"` } /** - * Search request for Keys + * @author Daniel DeGroff + */ +type ReactorMetricsResponse struct { + BaseHTTPResponse + Metrics ReactorMetrics `json:"metrics,omitempty"` +} + +func (b *ReactorMetricsResponse) SetStatus(status int) { + b.StatusCode = status +} + +/** + * Search request for IP ACLs . * - * @author Spencer Witt + * @author Brett Guy */ -type KeySearchRequest struct { - Search KeySearchCriteria `json:"search,omitempty"` +type IPAccessControlListSearchRequest struct { + Search IPAccessControlListSearchCriteria `json:"search,omitempty"` } /** * @author Daniel DeGroff */ -type LambdaEngineType string +type FormType string -func (e LambdaEngineType) String() string { +func (e FormType) String() string { return string(e) } const ( - LambdaEngineType_GraalJS LambdaEngineType = "GraalJS" - LambdaEngineType_Nashorn LambdaEngineType = "Nashorn" + FormType_Registration FormType = "registration" + FormType_AdminRegistration FormType = "adminRegistration" + FormType_AdminUser FormType = "adminUser" + FormType_SelfServiceUser FormType = "selfServiceUser" ) /** * @author Daniel DeGroff */ -type SystemTrustedProxyConfiguration struct { - Trusted []string `json:"trusted,omitempty"` - TrustPolicy SystemTrustedProxyConfigurationPolicy `json:"trustPolicy,omitempty"` +type TenantRequest struct { + BaseEventRequest + SourceTenantId string `json:"sourceTenantId,omitempty"` + Tenant Tenant `json:"tenant,omitempty"` + WebhookIds []string `json:"webhookIds,omitempty"` } /** - * A log for an action that was taken on a User. + * User Comment Response * - * @author Brian Pontarelli + * @author Seth Musselman */ -type UserActionLog struct { - ActioneeUserId string `json:"actioneeUserId,omitempty"` - ActionerUserId string `json:"actionerUserId,omitempty"` - ApplicationIds []string `json:"applicationIds,omitempty"` - Comment string `json:"comment,omitempty"` - EmailUserOnEnd bool `json:"emailUserOnEnd"` - EndEventSent bool `json:"endEventSent"` - Expiry int64 `json:"expiry,omitempty"` - History LogHistory `json:"history,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LocalizedName string `json:"localizedName,omitempty"` - LocalizedOption string `json:"localizedOption,omitempty"` - LocalizedReason string `json:"localizedReason,omitempty"` - Name string `json:"name,omitempty"` - NotifyUserOnEnd bool `json:"notifyUserOnEnd"` - Option string `json:"option,omitempty"` - Reason string `json:"reason,omitempty"` - ReasonCode string `json:"reasonCode,omitempty"` - UserActionId string `json:"userActionId,omitempty"` +type UserCommentResponse struct { + BaseHTTPResponse + UserComment UserComment `json:"userComment,omitempty"` + UserComments []UserComment `json:"userComments,omitempty"` +} + +func (b *UserCommentResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Login Ping API request object. + * The reason for the login failure. * * @author Daniel DeGroff */ -type LoginPingRequest struct { - BaseLoginRequest - UserId string `json:"userId,omitempty"` +type UserLoginFailedReason struct { + Code string `json:"code,omitempty"` + LambdaId string `json:"lambdaId,omitempty"` + LambdaResult Errors `json:"lambdaResult,omitempty"` } /** - * @author Daniel DeGroff + * Config for regular SAML IDP configurations that support IdP initiated requests + * + * @author Lyle Schemmerling */ -type IdentityProviderLimitUserLinkingPolicy struct { +type SAMLv2IdpInitiatedConfiguration struct { Enableable - MaximumLinks int `json:"maximumLinks,omitempty"` + Issuer string `json:"issuer,omitempty"` } /** - * @author Daniel DeGroff + * A Tenant-level policy for deleting Users. + * + * @author Trevor Smith */ -type EmailUnverifiedOptions struct { - AllowEmailChangeWhenGated bool `json:"allowEmailChangeWhenGated"` - Behavior UnverifiedBehavior `json:"behavior,omitempty"` +type TenantUserDeletePolicy struct { + Unverified TimeBasedDeletePolicy `json:"unverified,omitempty"` +} + +/** + * Search request for Group Members. + * + * @author Daniel DeGroff + */ +type GroupMemberSearchRequest struct { + Search GroupMemberSearchCriteria `json:"search,omitempty"` } /** - * Base class for requests that can contain event information. This event information is used when sending Webhooks or emails - * during the transaction. The caller is responsible for ensuring that the event information is correct. + * Group Member Response * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type BaseEventRequest struct { - EventInfo EventInfo `json:"eventInfo,omitempty"` +type MemberResponse struct { + BaseHTTPResponse + Members map[string][]GroupMember `json:"members,omitempty"` } -type OAuthErrorType string - -func (e OAuthErrorType) String() string { - return string(e) +func (b *MemberResponse) SetStatus(status int) { + b.StatusCode = status } -const ( - OAuthErrorType_InvalidRequest OAuthErrorType = "invalid_request" - OAuthErrorType_InvalidClient OAuthErrorType = "invalid_client" - OAuthErrorType_InvalidGrant OAuthErrorType = "invalid_grant" - OAuthErrorType_InvalidToken OAuthErrorType = "invalid_token" - OAuthErrorType_UnauthorizedClient OAuthErrorType = "unauthorized_client" - OAuthErrorType_InvalidScope OAuthErrorType = "invalid_scope" - OAuthErrorType_ServerError OAuthErrorType = "server_error" - OAuthErrorType_UnsupportedGrantType OAuthErrorType = "unsupported_grant_type" - OAuthErrorType_UnsupportedResponseType OAuthErrorType = "unsupported_response_type" - OAuthErrorType_AccessDenied OAuthErrorType = "access_denied" - OAuthErrorType_ChangePasswordRequired OAuthErrorType = "change_password_required" - OAuthErrorType_NotLicensed OAuthErrorType = "not_licensed" - OAuthErrorType_TwoFactorRequired OAuthErrorType = "two_factor_required" - OAuthErrorType_AuthorizationPending OAuthErrorType = "authorization_pending" - OAuthErrorType_ExpiredToken OAuthErrorType = "expired_token" - OAuthErrorType_UnsupportedTokenType OAuthErrorType = "unsupported_token_type" -) - /** - * Search request for Tenants + * User Action API request object. * - * @author Mark Manes + * @author Brian Pontarelli */ -type TenantSearchRequest struct { - Search TenantSearchCriteria `json:"search,omitempty"` +type UserActionRequest struct { + UserAction UserAction `json:"userAction,omitempty"` } /** - * JWT Public Key Response Object + * Configuration for the behavior of failed login attempts. This helps us protect against brute force password attacks. * * @author Daniel DeGroff */ -type PublicKeyResponse struct { - BaseHTTPResponse - PublicKey string `json:"publicKey,omitempty"` - PublicKeys map[string]string `json:"publicKeys,omitempty"` +type FailedAuthenticationConfiguration struct { + ActionCancelPolicy FailedAuthenticationActionCancelPolicy `json:"actionCancelPolicy,omitempty"` + ActionDuration int64 `json:"actionDuration,omitempty"` + ActionDurationUnit ExpiryUnit `json:"actionDurationUnit,omitempty"` + EmailUser bool `json:"emailUser"` + ResetCountInSeconds int `json:"resetCountInSeconds,omitempty"` + TooManyAttempts int `json:"tooManyAttempts,omitempty"` + UserActionId string `json:"userActionId,omitempty"` } -func (b *PublicKeyResponse) SetStatus(status int) { - b.StatusCode = status +/** + * @author Daniel DeGroff + */ +type ApplicationAccessControlConfiguration struct { + UiIPAccessControlListId string `json:"uiIPAccessControlListId,omitempty"` } /** - * @author Daniel DeGroff + * XML canonicalization method enumeration. This is used for the IdP and SP side of FusionAuth SAML. + * + * @author Brian Pontarelli */ -type Sort string +type CanonicalizationMethod string -func (e Sort) String() string { +func (e CanonicalizationMethod) String() string { return string(e) } const ( - Sort_Asc Sort = "asc" - Sort_Desc Sort = "desc" + CanonicalizationMethod_Exclusive CanonicalizationMethod = "exclusive" + CanonicalizationMethod_ExclusiveWithComments CanonicalizationMethod = "exclusive_with_comments" + CanonicalizationMethod_Inclusive CanonicalizationMethod = "inclusive" + CanonicalizationMethod_InclusiveWithComments CanonicalizationMethod = "inclusive_with_comments" ) /** - * Forgot password request object. + * Request to complete the WebAuthn registration ceremony + * + * @author Spencer Witt + */ +type WebAuthnLoginRequest struct { + BaseLoginRequest + Credential WebAuthnPublicKeyAuthenticationRequest `json:"credential,omitempty"` + Origin string `json:"origin,omitempty"` + RpId string `json:"rpId,omitempty"` + TwoFactorTrustId string `json:"twoFactorTrustId,omitempty"` +} + +/** + * The Application API request object. * * @author Brian Pontarelli */ -type ForgotPasswordRequest struct { +type ApplicationRequest struct { BaseEventRequest - ApplicationId string `json:"applicationId,omitempty"` - ChangePasswordId string `json:"changePasswordId,omitempty"` - Email string `json:"email,omitempty"` - LoginId string `json:"loginId,omitempty"` - SendForgotPasswordEmail bool `json:"sendForgotPasswordEmail"` - State map[string]interface{} `json:"state,omitempty"` - Username string `json:"username,omitempty"` + Application Application `json:"application,omitempty"` + Role ApplicationRole `json:"role,omitempty"` + SourceApplicationId string `json:"sourceApplicationId,omitempty"` } /** - * Identity Provider response. + * Webhook API response object. * - * @author Spencer Witt + * @author Brian Pontarelli */ -type IdentityProviderSearchResponse struct { +type WebhookResponse struct { BaseHTTPResponse - IdentityProviders []BaseIdentityProvider `json:"identityProviders,omitempty"` - Total int64 `json:"total,omitempty"` + Webhook Webhook `json:"webhook,omitempty"` + Webhooks []Webhook `json:"webhooks,omitempty"` } -func (b *IdentityProviderSearchResponse) SetStatus(status int) { +func (b *WebhookResponse) SetStatus(status int) { b.StatusCode = status } -type MetaData struct { - Data map[string]interface{} `json:"data,omitempty"` - Device DeviceInfo `json:"device,omitempty"` - Scopes []string `json:"scopes,omitempty"` -} - -type WebhookEventLog struct { - Attempts []WebhookAttemptLog `json:"attempts,omitempty"` - Data map[string]interface{} `json:"data,omitempty"` - Event EventRequest `json:"event,omitempty"` - EventResult WebhookEventResult `json:"eventResult,omitempty"` - EventType EventType `json:"eventType,omitempty"` - FailedAttempts int `json:"failedAttempts,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastAttemptInstant int64 `json:"lastAttemptInstant,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - LinkedObjectId string `json:"linkedObjectId,omitempty"` - Sequence int64 `json:"sequence,omitempty"` - SuccessfulAttempts int `json:"successfulAttempts,omitempty"` -} - -type SAMLLogoutBehavior string - -func (e SAMLLogoutBehavior) String() string { - return string(e) -} - -const ( - SAMLLogoutBehavior_AllParticipants SAMLLogoutBehavior = "AllParticipants" - SAMLLogoutBehavior_OnlyOriginator SAMLLogoutBehavior = "OnlyOriginator" -) - /** - * @author Brian Pontarelli + * @author Seth Musselman */ -type EmailConfiguration struct { - AdditionalHeaders []EmailHeader `json:"additionalHeaders,omitempty"` - Debug bool `json:"debug"` - DefaultFromEmail string `json:"defaultFromEmail,omitempty"` - DefaultFromName string `json:"defaultFromName,omitempty"` - EmailUpdateEmailTemplateId string `json:"emailUpdateEmailTemplateId,omitempty"` - EmailVerifiedEmailTemplateId string `json:"emailVerifiedEmailTemplateId,omitempty"` - ForgotPasswordEmailTemplateId string `json:"forgotPasswordEmailTemplateId,omitempty"` - Host string `json:"host,omitempty"` - ImplicitEmailVerificationAllowed bool `json:"implicitEmailVerificationAllowed"` - LoginIdInUseOnCreateEmailTemplateId string `json:"loginIdInUseOnCreateEmailTemplateId,omitempty"` - LoginIdInUseOnUpdateEmailTemplateId string `json:"loginIdInUseOnUpdateEmailTemplateId,omitempty"` - LoginNewDeviceEmailTemplateId string `json:"loginNewDeviceEmailTemplateId,omitempty"` - LoginSuspiciousEmailTemplateId string `json:"loginSuspiciousEmailTemplateId,omitempty"` - Password string `json:"password,omitempty"` - PasswordlessEmailTemplateId string `json:"passwordlessEmailTemplateId,omitempty"` - PasswordResetSuccessEmailTemplateId string `json:"passwordResetSuccessEmailTemplateId,omitempty"` - PasswordUpdateEmailTemplateId string `json:"passwordUpdateEmailTemplateId,omitempty"` - Port int `json:"port,omitempty"` - Properties string `json:"properties,omitempty"` - Security EmailSecurityType `json:"security,omitempty"` - SetPasswordEmailTemplateId string `json:"setPasswordEmailTemplateId,omitempty"` - TwoFactorMethodAddEmailTemplateId string `json:"twoFactorMethodAddEmailTemplateId,omitempty"` - TwoFactorMethodRemoveEmailTemplateId string `json:"twoFactorMethodRemoveEmailTemplateId,omitempty"` - Unverified EmailUnverifiedOptions `json:"unverified,omitempty"` - Username string `json:"username,omitempty"` - VerificationEmailTemplateId string `json:"verificationEmailTemplateId,omitempty"` - VerificationStrategy VerificationStrategy `json:"verificationStrategy,omitempty"` - VerifyEmail bool `json:"verifyEmail"` - VerifyEmailWhenChanged bool `json:"verifyEmailWhenChanged"` +type UserCommentRequest struct { + UserComment UserComment `json:"userComment,omitempty"` } /** * @author Daniel DeGroff */ -type TenantLoginConfiguration struct { - RequireAuthentication bool `json:"requireAuthentication"` +type SystemLogsExportRequest struct { + BaseExportRequest + IncludeArchived bool `json:"includeArchived"` + LastNBytes int `json:"lastNBytes,omitempty"` } /** - * The user action request object. - * - * @author Brian Pontarelli + * @author Brett Guy */ -type ActionRequest struct { - BaseEventRequest - Action ActionData `json:"action,omitempty"` - Broadcast bool `json:"broadcast"` +type MessengerResponse struct { + BaseHTTPResponse + Messenger BaseMessengerConfiguration `json:"messenger,omitempty"` + Messengers []BaseMessengerConfiguration `json:"messengers,omitempty"` } -/** - * The IdP behavior when no user link has been made yet. - * - * @author Daniel DeGroff - */ -type IdentityProviderLinkingStrategy string - -func (e IdentityProviderLinkingStrategy) String() string { - return string(e) +func (b *MessengerResponse) SetStatus(status int) { + b.StatusCode = status } -const ( - IdentityProviderLinkingStrategy_CreatePendingLink IdentityProviderLinkingStrategy = "CreatePendingLink" - IdentityProviderLinkingStrategy_Disabled IdentityProviderLinkingStrategy = "Disabled" - IdentityProviderLinkingStrategy_LinkAnonymously IdentityProviderLinkingStrategy = "LinkAnonymously" - IdentityProviderLinkingStrategy_LinkByEmail IdentityProviderLinkingStrategy = "LinkByEmail" - IdentityProviderLinkingStrategy_LinkByEmailForExistingUser IdentityProviderLinkingStrategy = "LinkByEmailForExistingUser" - IdentityProviderLinkingStrategy_LinkByUsername IdentityProviderLinkingStrategy = "LinkByUsername" - IdentityProviderLinkingStrategy_LinkByUsernameForExistingUser IdentityProviderLinkingStrategy = "LinkByUsernameForExistingUser" - IdentityProviderLinkingStrategy_Unsupported IdentityProviderLinkingStrategy = "Unsupported" -) - /** - * @author Daniel DeGroff + * @author Michael Sleevi */ -type IdentityProviderRequest struct { - IdentityProvider BaseIdentityProvider `json:"identityProvider,omitempty"` +type PreviewMessageTemplateResponse struct { + BaseHTTPResponse + Errors Errors `json:"errors,omitempty"` + Message SMSMessage `json:"message,omitempty"` +} + +func (b *PreviewMessageTemplateResponse) SetStatus(status int) { + b.StatusCode = status } /** - * @author Tyler Scott + * Search criteria for Applications + * + * @author Spencer Witt */ -type Group struct { - Data map[string]interface{} `json:"data,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - Name string `json:"name,omitempty"` - Roles map[string][]ApplicationRole `json:"roles,omitempty"` - TenantId string `json:"tenantId,omitempty"` +type ApplicationSearchCriteria struct { + BaseSearchCriteria + Name string `json:"name,omitempty"` + State ObjectState `json:"state,omitempty"` + TenantId string `json:"tenantId,omitempty"` } /** - * @author Lyle Schemmerling + * @author Daniel DeGroff */ -type SAMLv2AssertionConfiguration struct { - Destination SAMLv2DestinationAssertionConfiguration `json:"destination,omitempty"` +type OpenIdConnectIdentityProvider struct { + BaseIdentityProvider + ButtonImageURL string `json:"buttonImageURL,omitempty"` + ButtonText string `json:"buttonText,omitempty"` + Domains []string `json:"domains,omitempty"` + Oauth2 IdentityProviderOauth2Configuration `json:"oauth2,omitempty"` + PostRequest bool `json:"postRequest"` } /** - * Request to complete the WebAuthn registration ceremony for a new credential,. + * Models the User Registration Verified Event. * - * @author Spencer Witt + * @author Trevor Smith */ -type WebAuthnRegisterCompleteRequest struct { - Credential WebAuthnPublicKeyRegistrationRequest `json:"credential,omitempty"` - Origin string `json:"origin,omitempty"` - RpId string `json:"rpId,omitempty"` - UserId string `json:"userId,omitempty"` +type UserRegistrationVerifiedEvent struct { + BaseUserEvent + ApplicationId string `json:"applicationId,omitempty"` + Registration UserRegistration `json:"registration,omitempty"` } /** - * @author Daniel DeGroff + * A Message Template Request to the API + * + * @author Michael Sleevi */ -type ReactorResponse struct { - BaseHTTPResponse - Status ReactorStatus `json:"status,omitempty"` -} - -func (b *ReactorResponse) SetStatus(status int) { - b.StatusCode = status +type MessageTemplateRequest struct { + MessageTemplate MessageTemplate `json:"messageTemplate,omitempty"` } /** - * A role given to a user for a specific application. - * - * @author Seth Musselman + * @author Daniel DeGroff */ -type ApplicationRole struct { - Description string `json:"description,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - IsDefault bool `json:"isDefault"` - IsSuperRole bool `json:"isSuperRole"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - Name string `json:"name,omitempty"` +type AppleIdentityProvider struct { + BaseIdentityProvider + BundleId string `json:"bundleId,omitempty"` + ButtonText string `json:"buttonText,omitempty"` + KeyId string `json:"keyId,omitempty"` + Scope string `json:"scope,omitempty"` + ServicesId string `json:"servicesId,omitempty"` + TeamId string `json:"teamId,omitempty"` } /** * @author Daniel DeGroff */ -type VerifyRegistrationResponse struct { +type DeviceUserCodeResponse struct { BaseHTTPResponse - OneTimeCode string `json:"oneTimeCode,omitempty"` - VerificationId string `json:"verificationId,omitempty"` + ClientId string `json:"client_id,omitempty"` + DeviceInfo DeviceInfo `json:"deviceInfo,omitempty"` + ExpiresIn int `json:"expires_in,omitempty"` + PendingIdPLink PendingIdPLink `json:"pendingIdPLink,omitempty"` + Scope string `json:"scope,omitempty"` + TenantId string `json:"tenantId,omitempty"` + UserCode string `json:"user_code,omitempty"` } -func (b *VerifyRegistrationResponse) SetStatus(status int) { +func (b *DeviceUserCodeResponse) SetStatus(status int) { b.StatusCode = status } /** - * @author Trevor Smith + * @author Daniel DeGroff */ -type CORSConfiguration struct { - Enableable - AllowCredentials bool `json:"allowCredentials"` - AllowedHeaders []string `json:"allowedHeaders,omitempty"` - AllowedMethods []HTTPMethod `json:"allowedMethods,omitempty"` - AllowedOrigins []string `json:"allowedOrigins,omitempty"` - Debug bool `json:"debug"` - ExposedHeaders []string `json:"exposedHeaders,omitempty"` - PreflightMaxAgeInSeconds int `json:"preflightMaxAgeInSeconds,omitempty"` +type EmailHeader struct { + Name string `json:"name,omitempty"` + Value string `json:"value,omitempty"` } /** - * Group Member Request + * Models the Group Member Remove Complete Event. * * @author Daniel DeGroff */ -type MemberRequest struct { - Members map[string][]GroupMember `json:"members,omitempty"` +type GroupMemberRemoveCompleteEvent struct { + BaseGroupEvent + Members []GroupMember `json:"members,omitempty"` } -/** - * @author Brian Pontarelli - */ -type BaseSearchCriteria struct { - NumberOfResults int `json:"numberOfResults,omitempty"` - OrderBy string `json:"orderBy,omitempty"` - StartRow int `json:"startRow,omitempty"` +type WebhookEventLog struct { + Attempts []WebhookAttemptLog `json:"attempts,omitempty"` + Data map[string]interface{} `json:"data,omitempty"` + Event EventRequest `json:"event,omitempty"` + EventResult WebhookEventResult `json:"eventResult,omitempty"` + EventType EventType `json:"eventType,omitempty"` + FailedAttempts int `json:"failedAttempts,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastAttemptInstant int64 `json:"lastAttemptInstant,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + LinkedObjectId string `json:"linkedObjectId,omitempty"` + Sequence int64 `json:"sequence,omitempty"` + SuccessfulAttempts int `json:"successfulAttempts,omitempty"` } /** - * Interface for any object that can provide JSON Web key Information. + * Group API request object. + * + * @author Daniel DeGroff */ -type JSONWebKeyInfoProvider struct { -} - -type BreachAction string - -func (e BreachAction) String() string { - return string(e) +type GroupRequest struct { + Group Group `json:"group,omitempty"` + RoleIds []string `json:"roleIds,omitempty"` } -const ( - BreachAction_Off BreachAction = "Off" - BreachAction_RecordOnly BreachAction = "RecordOnly" - BreachAction_NotifyUser BreachAction = "NotifyUser" - BreachAction_RequireChange BreachAction = "RequireChange" -) - /** - * Event Log Type + * Search request for entity grants. * - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type EventLogType string - -func (e EventLogType) String() string { - return string(e) +type EntityGrantSearchRequest struct { + Search EntityGrantSearchCriteria `json:"search,omitempty"` } -const ( - EventLogType_Information EventLogType = "Information" - EventLogType_Debug EventLogType = "Debug" - EventLogType_Error EventLogType = "Error" -) - /** - * Models the User Update Registration Event. + * Models the User Delete Registration Event. * * @author Daniel DeGroff */ -type UserRegistrationUpdateEvent struct { +type UserRegistrationDeleteEvent struct { BaseUserEvent ApplicationId string `json:"applicationId,omitempty"` - Original UserRegistration `json:"original,omitempty"` Registration UserRegistration `json:"registration,omitempty"` } /** - * Entity API response object. + * Contains attributes for the Relying Party to refer to an existing public key credential as an input parameter. * - * @author Brian Pontarelli + * @author Spencer Witt */ -type EntityResponse struct { - BaseHTTPResponse - Entity Entity `json:"entity,omitempty"` +type PublicKeyCredentialDescriptor struct { + Id string `json:"id,omitempty"` + Transports []string `json:"transports,omitempty"` + Type PublicKeyCredentialType `json:"type,omitempty"` } -func (b *EntityResponse) SetStatus(status int) { - b.StatusCode = status +/** + * @author Brett Guy + */ +type TwilioMessengerConfiguration struct { + BaseMessengerConfiguration + AccountSID string `json:"accountSID,omitempty"` + AuthToken string `json:"authToken,omitempty"` + FromPhoneNumber string `json:"fromPhoneNumber,omitempty"` + MessagingServiceSid string `json:"messagingServiceSid,omitempty"` + Url string `json:"url,omitempty"` } /** - * Describes a user account or WebAuthn Relying Party associated with a public key credential + * @author Daniel DeGroff */ -type PublicKeyCredentialEntity struct { +type ReactorMetrics struct { + BreachedPasswordMetrics map[string]BreachedPasswordTenantMetric `json:"breachedPasswordMetrics,omitempty"` +} + +/** + * @author Daniel DeGroff + */ +type ApplicationFormConfiguration struct { + AdminRegistrationFormId string `json:"adminRegistrationFormId,omitempty"` + SelfServiceFormConfiguration SelfServiceFormConfiguration `json:"selfServiceFormConfiguration,omitempty"` + SelfServiceFormId string `json:"selfServiceFormId,omitempty"` +} + +/** + * @author Brett Guy + */ +type IPAccessControlListSearchCriteria struct { + BaseSearchCriteria Name string `json:"name,omitempty"` } -type ApplicationEmailConfiguration struct { - EmailUpdateEmailTemplateId string `json:"emailUpdateEmailTemplateId,omitempty"` - EmailVerificationEmailTemplateId string `json:"emailVerificationEmailTemplateId,omitempty"` - EmailVerifiedEmailTemplateId string `json:"emailVerifiedEmailTemplateId,omitempty"` - ForgotPasswordEmailTemplateId string `json:"forgotPasswordEmailTemplateId,omitempty"` - LoginIdInUseOnCreateEmailTemplateId string `json:"loginIdInUseOnCreateEmailTemplateId,omitempty"` - LoginIdInUseOnUpdateEmailTemplateId string `json:"loginIdInUseOnUpdateEmailTemplateId,omitempty"` - LoginNewDeviceEmailTemplateId string `json:"loginNewDeviceEmailTemplateId,omitempty"` - LoginSuspiciousEmailTemplateId string `json:"loginSuspiciousEmailTemplateId,omitempty"` - PasswordlessEmailTemplateId string `json:"passwordlessEmailTemplateId,omitempty"` - PasswordResetSuccessEmailTemplateId string `json:"passwordResetSuccessEmailTemplateId,omitempty"` - PasswordUpdateEmailTemplateId string `json:"passwordUpdateEmailTemplateId,omitempty"` - SetPasswordEmailTemplateId string `json:"setPasswordEmailTemplateId,omitempty"` - TwoFactorMethodAddEmailTemplateId string `json:"twoFactorMethodAddEmailTemplateId,omitempty"` - TwoFactorMethodRemoveEmailTemplateId string `json:"twoFactorMethodRemoveEmailTemplateId,omitempty"` +/** + * @author Daniel DeGroff + */ +type RegistrationUnverifiedOptions struct { + Behavior UnverifiedBehavior `json:"behavior,omitempty"` } /** * @author Daniel DeGroff */ -type IdentityProviderStartLoginResponse struct { +type TenantResponse struct { BaseHTTPResponse - Code string `json:"code,omitempty"` + Tenant Tenant `json:"tenant,omitempty"` + Tenants []Tenant `json:"tenants,omitempty"` } -func (b *IdentityProviderStartLoginResponse) SetStatus(status int) { +func (b *TenantResponse) SetStatus(status int) { b.StatusCode = status } /** - * @author Brett Pontarelli + * Request for the Refresh Token API to revoke a refresh token rather than using the URL parameters. + * + * @author Brian Pontarelli */ -type EpicGamesApplicationConfiguration struct { - BaseIdentityProviderApplicationConfiguration - ButtonText string `json:"buttonText,omitempty"` - ClientId string `json:"client_id,omitempty"` - ClientSecret string `json:"client_secret,omitempty"` - Scope string `json:"scope,omitempty"` +type RefreshTokenRevokeRequest struct { + BaseEventRequest + ApplicationId string `json:"applicationId,omitempty"` + Token string `json:"token,omitempty"` + UserId string `json:"userId,omitempty"` +} + +/** + * Models a JWT Refresh Token. + * + * @author Daniel DeGroff + */ +type RefreshToken struct { + ApplicationId string `json:"applicationId,omitempty"` + Data map[string]interface{} `json:"data,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + MetaData MetaData `json:"metaData,omitempty"` + StartInstant int64 `json:"startInstant,omitempty"` + TenantId string `json:"tenantId,omitempty"` + Token string `json:"token,omitempty"` + UserId string `json:"userId,omitempty"` } -/** - * Models the User Deleted Registration Event. - *

- * This is different than user.registration.delete in that it is sent after the TX has been committed. This event cannot be transactional. - * - * @author Daniel DeGroff - */ -type UserRegistrationDeleteCompleteEvent struct { - BaseUserEvent - ApplicationId string `json:"applicationId,omitempty"` - Registration UserRegistration `json:"registration,omitempty"` +type MetaData struct { + Data map[string]interface{} `json:"data,omitempty"` + Device DeviceInfo `json:"device,omitempty"` + Scopes []string `json:"scopes,omitempty"` } /** - * Group API request object. + * A marker interface indicating this event is an event that can supply a linked object Id. * - * @author Daniel DeGroff + * @author Spencer Witt */ -type GroupRequest struct { - Group Group `json:"group,omitempty"` - RoleIds []string `json:"roleIds,omitempty"` +type ObjectIdentifiable struct { } /** - * User Comment Response + * Form field response. * - * @author Seth Musselman + * @author Brett Guy */ -type UserCommentResponse struct { +type FormFieldResponse struct { BaseHTTPResponse - UserComment UserComment `json:"userComment,omitempty"` - UserComments []UserComment `json:"userComments,omitempty"` + Field FormField `json:"field,omitempty"` + Fields []FormField `json:"fields,omitempty"` } -func (b *UserCommentResponse) SetStatus(status int) { +func (b *FormFieldResponse) SetStatus(status int) { b.StatusCode = status } /** + * JWT Public Key Response Object + * * @author Daniel DeGroff */ -type ValidateResponse struct { +type PublicKeyResponse struct { BaseHTTPResponse - Jwt JWT `json:"jwt,omitempty"` + PublicKey string `json:"publicKey,omitempty"` + PublicKeys map[string]string `json:"publicKeys,omitempty"` } -func (b *ValidateResponse) SetStatus(status int) { +func (b *PublicKeyResponse) SetStatus(status int) { b.StatusCode = status } /** - * @author Daniel DeGroff + * Response for the user login report. + * + * @author Seth Musselman */ -type GoogleApplicationConfiguration struct { - BaseIdentityProviderApplicationConfiguration - ButtonText string `json:"buttonText,omitempty"` - ClientId string `json:"client_id,omitempty"` - ClientSecret string `json:"client_secret,omitempty"` - LoginMethod IdentityProviderLoginMethod `json:"loginMethod,omitempty"` - Properties GoogleIdentityProviderProperties `json:"properties,omitempty"` - Scope string `json:"scope,omitempty"` +type RecentLoginResponse struct { + BaseHTTPResponse + Logins []DisplayableRawLogin `json:"logins,omitempty"` +} + +func (b *RecentLoginResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Models the User Event (and can be converted to JSON) that is used for all user modifications (create, update, - * delete). - *

- * This is different than user.delete because it is sent after the tx is committed, this cannot be transactional. - * * @author Daniel DeGroff */ -type UserDeleteCompleteEvent struct { - BaseUserEvent +type TwoFactorEnableDisableSendRequest struct { + Email string `json:"email,omitempty"` + Method string `json:"method,omitempty"` + MethodId string `json:"methodId,omitempty"` + MobilePhone string `json:"mobilePhone,omitempty"` } /** - * Supply additional information about the user account when creating a new credential - * - * @author Spencer Witt + * @author Daniel DeGroff */ -type PublicKeyCredentialUserEntity struct { - PublicKeyCredentialEntity - DisplayName string `json:"displayName,omitempty"` - Id string `json:"id,omitempty"` +type SecureGeneratorType string + +func (e SecureGeneratorType) String() string { + return string(e) } +const ( + SecureGeneratorType_RandomDigits SecureGeneratorType = "randomDigits" + SecureGeneratorType_RandomBytes SecureGeneratorType = "randomBytes" + SecureGeneratorType_RandomAlpha SecureGeneratorType = "randomAlpha" + SecureGeneratorType_RandomAlphaNumeric SecureGeneratorType = "randomAlphaNumeric" +) + /** - * A JavaScript lambda function that is executed during certain events inside FusionAuth. + * Entity grant API request object. * * @author Brian Pontarelli */ -type Lambda struct { - Body string `json:"body,omitempty"` - Debug bool `json:"debug"` - EngineType LambdaEngineType `json:"engineType,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - Name string `json:"name,omitempty"` - Type LambdaType `json:"type,omitempty"` +type EntityGrantRequest struct { + Grant EntityGrant `json:"grant,omitempty"` } /** - * SonyPSN gaming login provider. + * Something that can be required and thus also optional. This currently extends Enableable because anything that is + * required/optional is almost always enableable as well. * - * @author Brett Pontarelli + * @author Brian Pontarelli */ -type SonyPSNIdentityProvider struct { - BaseIdentityProvider - ButtonText string `json:"buttonText,omitempty"` - ClientId string `json:"client_id,omitempty"` - ClientSecret string `json:"client_secret,omitempty"` - Scope string `json:"scope,omitempty"` +type Requirable struct { + Enableable + Required bool `json:"required"` } /** + * Models the User Login Failed Event. + * * @author Daniel DeGroff */ -type BreachedPasswordTenantMetric struct { - ActionRequired int `json:"actionRequired,omitempty"` - MatchedCommonPasswordCount int `json:"matchedCommonPasswordCount,omitempty"` - MatchedExactCount int `json:"matchedExactCount,omitempty"` - MatchedPasswordCount int `json:"matchedPasswordCount,omitempty"` - MatchedSubAddressCount int `json:"matchedSubAddressCount,omitempty"` - PasswordsCheckedCount int `json:"passwordsCheckedCount,omitempty"` -} - -/** - * @author Brett Pontarelli - */ -type NintendoApplicationConfiguration struct { - BaseIdentityProviderApplicationConfiguration - ButtonText string `json:"buttonText,omitempty"` - ClientId string `json:"client_id,omitempty"` - ClientSecret string `json:"client_secret,omitempty"` - EmailClaim string `json:"emailClaim,omitempty"` - Scope string `json:"scope,omitempty"` - UniqueIdClaim string `json:"uniqueIdClaim,omitempty"` - UsernameClaim string `json:"usernameClaim,omitempty"` +type UserLoginFailedEvent struct { + BaseUserEvent + ApplicationId string `json:"applicationId,omitempty"` + AuthenticationType string `json:"authenticationType,omitempty"` + IpAddress string `json:"ipAddress,omitempty"` + Reason UserLoginFailedReason `json:"reason,omitempty"` } /** + * Search response for Groups + * * @author Daniel DeGroff */ -type TenantUnverifiedConfiguration struct { - Email UnverifiedBehavior `json:"email,omitempty"` - WhenGated RegistrationUnverifiedOptions `json:"whenGated,omitempty"` +type GroupSearchResponse struct { + BaseHTTPResponse + Groups []Group `json:"groups,omitempty"` + Total int64 `json:"total,omitempty"` } -/** - * @author Daniel DeGroff - */ -type LoginRecordSearchCriteria struct { - BaseSearchCriteria - ApplicationId string `json:"applicationId,omitempty"` - End int64 `json:"end,omitempty"` - Start int64 `json:"start,omitempty"` - UserId string `json:"userId,omitempty"` +func (b *GroupSearchResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Search request for entity types. + * Entity Type API request object. * * @author Brian Pontarelli */ -type EntityTypeSearchRequest struct { - Search EntityTypeSearchCriteria `json:"search,omitempty"` +type EntityTypeRequest struct { + EntityType EntityType `json:"entityType,omitempty"` + Permission EntityTypePermission `json:"permission,omitempty"` } /** - * Models the Refresh Token Revoke Event. This event might be for a single token, a user - * or an entire application. + * Key search response * - * @author Brian Pontarelli + * @author Spencer Witt */ -type JWTRefreshTokenRevokeEvent struct { - BaseEvent - ApplicationId string `json:"applicationId,omitempty"` - ApplicationTimeToLiveInSeconds map[string]int `json:"applicationTimeToLiveInSeconds,omitempty"` - RefreshToken RefreshToken `json:"refreshToken,omitempty"` - User User `json:"user,omitempty"` - UserId string `json:"userId,omitempty"` +type KeySearchResponse struct { + BaseHTTPResponse + Keys []Key `json:"keys,omitempty"` + Total int64 `json:"total,omitempty"` } -/** - * @author Daniel DeGroff - */ -type IdentityProviderLink struct { - Data map[string]interface{} `json:"data,omitempty"` - DisplayName string `json:"displayName,omitempty"` - IdentityProviderId string `json:"identityProviderId,omitempty"` - IdentityProviderName string `json:"identityProviderName,omitempty"` - IdentityProviderType IdentityProviderType `json:"identityProviderType,omitempty"` - IdentityProviderUserId string `json:"identityProviderUserId,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastLoginInstant int64 `json:"lastLoginInstant,omitempty"` - TenantId string `json:"tenantId,omitempty"` - Token string `json:"token,omitempty"` - UserId string `json:"userId,omitempty"` +func (b *KeySearchResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Twitch gaming login provider. + * The handling policy for scopes provided by FusionAuth * - * @author Brett Pontarelli + * @author Spencer Witt */ -type TwitchIdentityProvider struct { - BaseIdentityProvider - ButtonText string `json:"buttonText,omitempty"` - ClientId string `json:"client_id,omitempty"` - ClientSecret string `json:"client_secret,omitempty"` - Scope string `json:"scope,omitempty"` +type ProvidedScopePolicy struct { + Address Requirable `json:"address,omitempty"` + Email Requirable `json:"email,omitempty"` + Phone Requirable `json:"phone,omitempty"` + Profile Requirable `json:"profile,omitempty"` } /** - * The global view of a User. This object contains all global information about the user including birthdate, registration information - * preferred languages, global attributes, etc. - * - * @author Seth Musselman - */ -type User struct { - SecureIdentity - Active bool `json:"active"` - BirthDate string `json:"birthDate,omitempty"` - CleanSpeakId string `json:"cleanSpeakId,omitempty"` - Data map[string]interface{} `json:"data,omitempty"` - Email string `json:"email,omitempty"` - Expiry int64 `json:"expiry,omitempty"` - FirstName string `json:"firstName,omitempty"` - FullName string `json:"fullName,omitempty"` - ImageUrl string `json:"imageUrl,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastName string `json:"lastName,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - Memberships []GroupMember `json:"memberships,omitempty"` - MiddleName string `json:"middleName,omitempty"` - MobilePhone string `json:"mobilePhone,omitempty"` - ParentEmail string `json:"parentEmail,omitempty"` - PreferredLanguages []string `json:"preferredLanguages,omitempty"` - Registrations []UserRegistration `json:"registrations,omitempty"` - TenantId string `json:"tenantId,omitempty"` - Timezone string `json:"timezone,omitempty"` - TwoFactor UserTwoFactorConfiguration `json:"twoFactor,omitempty"` + * Models the Group Delete Event. + * + * @author Daniel DeGroff + */ +type GroupDeleteEvent struct { + BaseGroupEvent } /** - * A webhook call attempt log. + * Supply additional information about the Relying Party when creating a new credential * * @author Spencer Witt */ -type WebhookAttemptLog struct { - AttemptResult WebhookAttemptResult `json:"attemptResult,omitempty"` - Data map[string]interface{} `json:"data,omitempty"` - EndInstant int64 `json:"endInstant,omitempty"` - Id string `json:"id,omitempty"` - StartInstant int64 `json:"startInstant,omitempty"` - WebhookCallResponse WebhookCallResponse `json:"webhookCallResponse,omitempty"` - WebhookEventLogId string `json:"webhookEventLogId,omitempty"` - WebhookId string `json:"webhookId,omitempty"` +type PublicKeyCredentialRelyingPartyEntity struct { + PublicKeyCredentialEntity + Id string `json:"id,omitempty"` } /** - * Search criteria for entity types. + * @author Daniel DeGroff + */ +type LoginHintConfiguration struct { + Enableable + ParameterName string `json:"parameterName,omitempty"` +} + +/** + * Search response for entity types. * * @author Brian Pontarelli */ -type EntityTypeSearchCriteria struct { - BaseSearchCriteria - Name string `json:"name,omitempty"` +type EntityTypeSearchResponse struct { + BaseHTTPResponse + EntityTypes []EntityType `json:"entityTypes,omitempty"` + Total int64 `json:"total,omitempty"` +} + +func (b *EntityTypeSearchResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Models the User Identity Provider Unlink Event. + * Container for the event information. This is the JSON that is sent from FusionAuth to webhooks. * - * @author Rob Davis + * @author Brian Pontarelli */ -type UserIdentityProviderUnlinkEvent struct { - BaseUserEvent - IdentityProviderLink IdentityProviderLink `json:"identityProviderLink,omitempty"` +type EventRequest struct { + Event BaseEvent `json:"event,omitempty"` } /** - * Contains extension output for requested extensions during a WebAuthn ceremony + * Search criteria for webhooks. * * @author Spencer Witt */ -type WebAuthnExtensionsClientOutputs struct { - CredProps CredentialPropertiesOutput `json:"credProps,omitempty"` +type WebhookSearchCriteria struct { + BaseSearchCriteria + Description string `json:"description,omitempty"` + TenantId string `json:"tenantId,omitempty"` + Url string `json:"url,omitempty"` } /** * @author Daniel DeGroff */ -type AuthenticatorConfiguration struct { - Algorithm TOTPAlgorithm `json:"algorithm,omitempty"` - CodeLength int `json:"codeLength,omitempty"` - TimeStep int `json:"timeStep,omitempty"` +type TenantUnverifiedConfiguration struct { + Email UnverifiedBehavior `json:"email,omitempty"` + WhenGated RegistrationUnverifiedOptions `json:"whenGated,omitempty"` +} + +/** + * Search request for entity grants. + * + * @author Brian Pontarelli + */ +type EntityGrantSearchResponse struct { + BaseHTTPResponse + Grants []EntityGrant `json:"grants,omitempty"` + Total int64 `json:"total,omitempty"` +} + +func (b *EntityGrantSearchResponse) SetStatus(status int) { + b.StatusCode = status } /** * @author Daniel DeGroff */ -type TwoFactorEnableDisableSendRequest struct { - Email string `json:"email,omitempty"` - Method string `json:"method,omitempty"` - MethodId string `json:"methodId,omitempty"` - MobilePhone string `json:"mobilePhone,omitempty"` +type FormDataType string + +func (e FormDataType) String() string { + return string(e) } +const ( + FormDataType_Bool FormDataType = "bool" + FormDataType_Consent FormDataType = "consent" + FormDataType_Date FormDataType = "date" + FormDataType_Email FormDataType = "email" + FormDataType_Number FormDataType = "number" + FormDataType_String FormDataType = "string" +) + /** - * Tenant-level configuration for WebAuthn + * User Action API response object. * - * @author Spencer Witt + * @author Brian Pontarelli */ -type TenantWebAuthnConfiguration struct { - Enableable - BootstrapWorkflow TenantWebAuthnWorkflowConfiguration `json:"bootstrapWorkflow,omitempty"` - Debug bool `json:"debug"` - ReauthenticationWorkflow TenantWebAuthnWorkflowConfiguration `json:"reauthenticationWorkflow,omitempty"` - RelyingPartyId string `json:"relyingPartyId,omitempty"` - RelyingPartyName string `json:"relyingPartyName,omitempty"` +type UserActionResponse struct { + BaseHTTPResponse + UserAction UserAction `json:"userAction,omitempty"` + UserActions []UserAction `json:"userActions,omitempty"` +} + +func (b *UserActionResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Models the Group Created Event. + * Search request for Groups. * * @author Daniel DeGroff */ -type GroupCreateCompleteEvent struct { - BaseGroupEvent +type GroupSearchRequest struct { + Search GroupSearchCriteria `json:"search,omitempty"` } /** - * Options to request extensions during credential registration + * Authentication key request object. * - * @author Spencer Witt + * @author Sanjay */ -type WebAuthnRegistrationExtensionOptions struct { - CredProps bool `json:"credProps"` +type APIKeyRequest struct { + ApiKey APIKey `json:"apiKey,omitempty"` + SourceKeyId string `json:"sourceKeyId,omitempty"` } /** - * The system configuration for Webhook Event Log data. + * Twitter social login provider. * - * @author Spencer Witt + * @author Daniel DeGroff */ -type WebhookEventLogConfiguration struct { - Delete DeleteConfiguration `json:"delete,omitempty"` +type TwitterIdentityProvider struct { + BaseIdentityProvider + ButtonText string `json:"buttonText,omitempty"` + ConsumerKey string `json:"consumerKey,omitempty"` + ConsumerSecret string `json:"consumerSecret,omitempty"` } /** - * Password Encryption Scheme Configuration - * - * @author Daniel DeGroff + * @author Michael Sleevi */ -type PasswordEncryptionConfiguration struct { - EncryptionScheme string `json:"encryptionScheme,omitempty"` - EncryptionSchemeFactor int `json:"encryptionSchemeFactor,omitempty"` - ModifyEncryptionSchemeOnLogin bool `json:"modifyEncryptionSchemeOnLogin"` +type SMSMessageTemplate struct { + MessageTemplate + DefaultTemplate string `json:"defaultTemplate,omitempty"` + LocalizedTemplates map[string]string `json:"localizedTemplates,omitempty"` } /** - * Registration API request object. + * Lambda API request object. * * @author Brian Pontarelli */ -type RegistrationRequest struct { - BaseEventRequest - DisableDomainBlock bool `json:"disableDomainBlock"` - GenerateAuthenticationToken bool `json:"generateAuthenticationToken"` - Registration UserRegistration `json:"registration,omitempty"` - SendSetPasswordEmail bool `json:"sendSetPasswordEmail"` - SkipRegistrationVerification bool `json:"skipRegistrationVerification"` - SkipVerification bool `json:"skipVerification"` - User User `json:"user,omitempty"` +type LambdaRequest struct { + Lambda Lambda `json:"lambda,omitempty"` } /** - * The Application API request object. + * Models an event where a user is being created with an "in-use" login Id (email or username). * + * @author Daniel DeGroff + */ +type UserLoginIdDuplicateOnCreateEvent struct { + BaseUserEvent + DuplicateEmail string `json:"duplicateEmail,omitempty"` + DuplicateUsername string `json:"duplicateUsername,omitempty"` + Existing User `json:"existing,omitempty"` +} + +/** + * @author Mikey Sleevi + */ +type Message struct { +} + +/** + * @author Daniel DeGroff + */ +type RefreshRequest struct { + BaseEventRequest + RefreshToken string `json:"refreshToken,omitempty"` + Token string `json:"token,omitempty"` +} + +/** * @author Brian Pontarelli */ -type ApplicationRequest struct { +type TwoFactorRequest struct { BaseEventRequest - Application Application `json:"application,omitempty"` - Role ApplicationRole `json:"role,omitempty"` - SourceApplicationId string `json:"sourceApplicationId,omitempty"` + ApplicationId string `json:"applicationId,omitempty"` + AuthenticatorId string `json:"authenticatorId,omitempty"` + Code string `json:"code,omitempty"` + Email string `json:"email,omitempty"` + Method string `json:"method,omitempty"` + MobilePhone string `json:"mobilePhone,omitempty"` + Secret string `json:"secret,omitempty"` + SecretBase32Encoded string `json:"secretBase32Encoded,omitempty"` + TwoFactorId string `json:"twoFactorId,omitempty"` } /** * @author Daniel DeGroff */ -type TwoFactorResponse struct { +type VerifyEmailResponse struct { BaseHTTPResponse - Code string `json:"code,omitempty"` - RecoveryCodes []string `json:"recoveryCodes,omitempty"` + OneTimeCode string `json:"oneTimeCode,omitempty"` + VerificationId string `json:"verificationId,omitempty"` } -func (b *TwoFactorResponse) SetStatus(status int) { +func (b *VerifyEmailResponse) SetStatus(status int) { b.StatusCode = status } -type MultiFactorAuthenticatorMethod struct { - Enableable - Algorithm TOTPAlgorithm `json:"algorithm,omitempty"` - CodeLength int `json:"codeLength,omitempty"` - TimeStep int `json:"timeStep,omitempty"` -} - -type SAMLv2Logout struct { - Behavior SAMLLogoutBehavior `json:"behavior,omitempty"` - DefaultVerificationKeyId string `json:"defaultVerificationKeyId,omitempty"` - KeyId string `json:"keyId,omitempty"` - RequireSignedRequests bool `json:"requireSignedRequests"` - SingleLogout SAMLv2SingleLogout `json:"singleLogout,omitempty"` - XmlSignatureC14nMethod CanonicalizationMethod `json:"xmlSignatureC14nMethod,omitempty"` +/** + * The global view of a User. This object contains all global information about the user including birthdate, registration information + * preferred languages, global attributes, etc. + * + * @author Seth Musselman + */ +type User struct { + SecureIdentity + Active bool `json:"active"` + BirthDate string `json:"birthDate,omitempty"` + CleanSpeakId string `json:"cleanSpeakId,omitempty"` + Data map[string]interface{} `json:"data,omitempty"` + Email string `json:"email,omitempty"` + Expiry int64 `json:"expiry,omitempty"` + FirstName string `json:"firstName,omitempty"` + FullName string `json:"fullName,omitempty"` + ImageUrl string `json:"imageUrl,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastName string `json:"lastName,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + Memberships []GroupMember `json:"memberships,omitempty"` + MiddleName string `json:"middleName,omitempty"` + MobilePhone string `json:"mobilePhone,omitempty"` + ParentEmail string `json:"parentEmail,omitempty"` + PreferredLanguages []string `json:"preferredLanguages,omitempty"` + Registrations []UserRegistration `json:"registrations,omitempty"` + TenantId string `json:"tenantId,omitempty"` + Timezone string `json:"timezone,omitempty"` + TwoFactor UserTwoFactorConfiguration `json:"twoFactor,omitempty"` } /** * @author Daniel DeGroff */ -type RefreshTokenSlidingWindowConfiguration struct { - MaximumTimeToLiveInMinutes int `json:"maximumTimeToLiveInMinutes,omitempty"` +type BaseLoginRequest struct { + BaseEventRequest + ApplicationId string `json:"applicationId,omitempty"` + IpAddress string `json:"ipAddress,omitempty"` + MetaData MetaData `json:"metaData,omitempty"` + NewDevice bool `json:"newDevice"` + NoJWT bool `json:"noJWT"` } /** - * Search criteria for Identity Providers. - * - * @author Spencer Witt + * @author Daniel DeGroff */ -type IdentityProviderSearchCriteria struct { - BaseSearchCriteria - ApplicationId string `json:"applicationId,omitempty"` - Name string `json:"name,omitempty"` - Type IdentityProviderType `json:"type,omitempty"` +type KafkaConfiguration struct { + Enableable + DefaultTopic string `json:"defaultTopic,omitempty"` + Producer map[string]string `json:"producer,omitempty"` } /** * @author Daniel DeGroff */ -type JWTVendRequest struct { - Claims map[string]interface{} `json:"claims,omitempty"` - KeyId string `json:"keyId,omitempty"` - TimeToLiveInSeconds int `json:"timeToLiveInSeconds,omitempty"` +type PasswordlessLoginRequest struct { + BaseLoginRequest + Code string `json:"code,omitempty"` + TwoFactorTrustId string `json:"twoFactorTrustId,omitempty"` } /** - * User API delete request object for a single user. + * Models the User Update Event once it is completed. This cannot be transactional. * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type UserDeleteSingleRequest struct { - BaseEventRequest - HardDelete bool `json:"hardDelete"` +type UserUpdateCompleteEvent struct { + BaseUserEvent + Original User `json:"original,omitempty"` } /** - * Search request for Groups. + * Models the User Update Event. * - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type GroupSearchRequest struct { - Search GroupSearchCriteria `json:"search,omitempty"` +type UserUpdateEvent struct { + BaseUserEvent + Original User `json:"original,omitempty"` } /** - * The authenticator's response for the authentication ceremony in its encoded format + * Entity API response object. * - * @author Spencer Witt + * @author Brian Pontarelli */ -type WebAuthnAuthenticatorAuthenticationResponse struct { +type EntityResponse struct { BaseHTTPResponse - AuthenticatorData string `json:"authenticatorData,omitempty"` - ClientDataJSON string `json:"clientDataJSON,omitempty"` - Signature string `json:"signature,omitempty"` - UserHandle string `json:"userHandle,omitempty"` + Entity Entity `json:"entity,omitempty"` } -func (b *WebAuthnAuthenticatorAuthenticationResponse) SetStatus(status int) { +func (b *EntityResponse) SetStatus(status int) { b.StatusCode = status } /** - * Epic gaming login provider. + * Used by the Relying Party to specify their requirements for authenticator attributes. Fields use the deprecated "resident key" terminology to refer + * to client-side discoverable credentials to maintain backwards compatibility with WebAuthn Level 1. * - * @author Brett Pontarelli + * @author Spencer Witt */ -type EpicGamesIdentityProvider struct { - BaseIdentityProvider - ButtonText string `json:"buttonText,omitempty"` - ClientId string `json:"client_id,omitempty"` - ClientSecret string `json:"client_secret,omitempty"` - Scope string `json:"scope,omitempty"` +type AuthenticatorSelectionCriteria struct { + AuthenticatorAttachment AuthenticatorAttachment `json:"authenticatorAttachment,omitempty"` + RequireResidentKey bool `json:"requireResidentKey"` + ResidentKey ResidentKeyRequirement `json:"residentKey,omitempty"` + UserVerification UserVerificationRequirement `json:"userVerification,omitempty"` } /** - * @author Daniel DeGroff + * API request for sending out family requests to parent's. + * + * @author Brian Pontarelli */ -type Form struct { - Data map[string]interface{} `json:"data,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - Name string `json:"name,omitempty"` - Steps []FormStep `json:"steps,omitempty"` - Type FormType `json:"type,omitempty"` +type FamilyEmailRequest struct { + ParentEmail string `json:"parentEmail,omitempty"` } /** - * Request to authenticate with WebAuthn + * Refresh Token Import request. * - * @author Spencer Witt + * @author Brett Guy */ -type WebAuthnPublicKeyAuthenticationRequest struct { - ClientExtensionResults WebAuthnExtensionsClientOutputs `json:"clientExtensionResults,omitempty"` - Id string `json:"id,omitempty"` - Response WebAuthnAuthenticatorAuthenticationResponse `json:"response,omitempty"` - RpId string `json:"rpId,omitempty"` - Type string `json:"type,omitempty"` +type RefreshTokenImportRequest struct { + RefreshTokens []RefreshToken `json:"refreshTokens,omitempty"` + ValidateDbConstraints bool `json:"validateDbConstraints"` } /** - * Available JSON Web Algorithms (JWA) as described in RFC 7518 available for this JWT implementation. + * The IdP behavior when no user link has been made yet. * * @author Daniel DeGroff */ -type Algorithm string +type IdentityProviderLinkingStrategy string -func (e Algorithm) String() string { +func (e IdentityProviderLinkingStrategy) String() string { return string(e) } const ( - Algorithm_ES256 Algorithm = "ES256" - Algorithm_ES384 Algorithm = "ES384" - Algorithm_ES512 Algorithm = "ES512" - Algorithm_HS256 Algorithm = "HS256" - Algorithm_HS384 Algorithm = "HS384" - Algorithm_HS512 Algorithm = "HS512" - Algorithm_PS256 Algorithm = "PS256" - Algorithm_PS384 Algorithm = "PS384" - Algorithm_PS512 Algorithm = "PS512" - Algorithm_RS256 Algorithm = "RS256" - Algorithm_RS384 Algorithm = "RS384" - Algorithm_RS512 Algorithm = "RS512" - Algorithm_None Algorithm = "none" + IdentityProviderLinkingStrategy_CreatePendingLink IdentityProviderLinkingStrategy = "CreatePendingLink" + IdentityProviderLinkingStrategy_Disabled IdentityProviderLinkingStrategy = "Disabled" + IdentityProviderLinkingStrategy_LinkAnonymously IdentityProviderLinkingStrategy = "LinkAnonymously" + IdentityProviderLinkingStrategy_LinkByEmail IdentityProviderLinkingStrategy = "LinkByEmail" + IdentityProviderLinkingStrategy_LinkByEmailForExistingUser IdentityProviderLinkingStrategy = "LinkByEmailForExistingUser" + IdentityProviderLinkingStrategy_LinkByUsername IdentityProviderLinkingStrategy = "LinkByUsername" + IdentityProviderLinkingStrategy_LinkByUsernameForExistingUser IdentityProviderLinkingStrategy = "LinkByUsernameForExistingUser" + IdentityProviderLinkingStrategy_Unsupported IdentityProviderLinkingStrategy = "Unsupported" ) /** - * Search request for Identity Providers - * - * @author Spencer Witt - */ -type IdentityProviderSearchRequest struct { - Search IdentityProviderSearchCriteria `json:"search,omitempty"` -} - -/** - * The use type of a key. - * * @author Daniel DeGroff */ -type KeyUse string - -func (e KeyUse) String() string { - return string(e) -} - -const ( - KeyUse_SignOnly KeyUse = "SignOnly" - KeyUse_SignAndVerify KeyUse = "SignAndVerify" - KeyUse_VerifyOnly KeyUse = "VerifyOnly" -) - -type FamilyRole string +type MultiFactorLoginPolicy string -func (e FamilyRole) String() string { +func (e MultiFactorLoginPolicy) String() string { return string(e) } const ( - FamilyRole_Child FamilyRole = "Child" - FamilyRole_Teen FamilyRole = "Teen" - FamilyRole_Adult FamilyRole = "Adult" + MultiFactorLoginPolicy_Disabled MultiFactorLoginPolicy = "Disabled" + MultiFactorLoginPolicy_Enabled MultiFactorLoginPolicy = "Enabled" + MultiFactorLoginPolicy_Required MultiFactorLoginPolicy = "Required" ) -/** - * Entity API request object. - * - * @author Brian Pontarelli - */ -type EntityRequest struct { - Entity Entity `json:"entity,omitempty"` -} - -/** - * Response for the system configuration API. - * - * @author Brian Pontarelli - */ -type SystemConfigurationResponse struct { - BaseHTTPResponse - SystemConfiguration SystemConfiguration `json:"systemConfiguration,omitempty"` -} - -func (b *SystemConfigurationResponse) SetStatus(status int) { - b.StatusCode = status -} - -type ActionData struct { - ActioneeUserId string `json:"actioneeUserId,omitempty"` - ActionerUserId string `json:"actionerUserId,omitempty"` - ApplicationIds []string `json:"applicationIds,omitempty"` - Comment string `json:"comment,omitempty"` - EmailUser bool `json:"emailUser"` - Expiry int64 `json:"expiry,omitempty"` - NotifyUser bool `json:"notifyUser"` - Option string `json:"option,omitempty"` - ReasonId string `json:"reasonId,omitempty"` - UserActionId string `json:"userActionId,omitempty"` -} - -type APIKeyMetaData struct { - Attributes map[string]string `json:"attributes,omitempty"` -} - -/** - * @author Daniel DeGroff - */ -type TenantRateLimitConfiguration struct { - FailedLogin RateLimitedRequestConfiguration `json:"failedLogin,omitempty"` - ForgotPassword RateLimitedRequestConfiguration `json:"forgotPassword,omitempty"` - SendEmailVerification RateLimitedRequestConfiguration `json:"sendEmailVerification,omitempty"` - SendPasswordless RateLimitedRequestConfiguration `json:"sendPasswordless,omitempty"` - SendRegistrationVerification RateLimitedRequestConfiguration `json:"sendRegistrationVerification,omitempty"` - SendTwoFactor RateLimitedRequestConfiguration `json:"sendTwoFactor,omitempty"` -} - /** * @author Daniel DeGroff */ -type BaseLoginRequest struct { +type IdentityProviderLinkRequest struct { BaseEventRequest - ApplicationId string `json:"applicationId,omitempty"` - IpAddress string `json:"ipAddress,omitempty"` - MetaData MetaData `json:"metaData,omitempty"` - NewDevice bool `json:"newDevice"` - NoJWT bool `json:"noJWT"` + IdentityProviderLink IdentityProviderLink `json:"identityProviderLink,omitempty"` + PendingIdPLinkId string `json:"pendingIdPLinkId,omitempty"` } /** - * Nintendo gaming login provider. + * Google social login provider. * - * @author Brett Pontarelli + * @author Daniel DeGroff */ -type NintendoIdentityProvider struct { +type GoogleIdentityProvider struct { BaseIdentityProvider - ButtonText string `json:"buttonText,omitempty"` - ClientId string `json:"client_id,omitempty"` - ClientSecret string `json:"client_secret,omitempty"` - EmailClaim string `json:"emailClaim,omitempty"` - Scope string `json:"scope,omitempty"` - UniqueIdClaim string `json:"uniqueIdClaim,omitempty"` - UsernameClaim string `json:"usernameClaim,omitempty"` + ButtonText string `json:"buttonText,omitempty"` + ClientId string `json:"client_id,omitempty"` + ClientSecret string `json:"client_secret,omitempty"` + LoginMethod IdentityProviderLoginMethod `json:"loginMethod,omitempty"` + Properties GoogleIdentityProviderProperties `json:"properties,omitempty"` + Scope string `json:"scope,omitempty"` } /** - * Models the User Update Event once it is completed. This cannot be transactional. + * Group Member Request * * @author Daniel DeGroff */ -type UserUpdateCompleteEvent struct { - BaseUserEvent - Original User `json:"original,omitempty"` +type MemberRequest struct { + Members map[string][]GroupMember `json:"members,omitempty"` } /** - * A marker interface indicating this event is an event that can supply a linked object Id. + * Email template response. * - * @author Spencer Witt + * @author Brian Pontarelli */ -type ObjectIdentifiable struct { +type EmailTemplateResponse struct { + BaseHTTPResponse + EmailTemplate EmailTemplate `json:"emailTemplate,omitempty"` + EmailTemplates []EmailTemplate `json:"emailTemplates,omitempty"` +} + +func (b *EmailTemplateResponse) SetStatus(status int) { + b.StatusCode = status } /** - * The transaction types for Webhooks and other event systems within FusionAuth. - * - * @author Brian Pontarelli + * @author Brett Guy */ -type TransactionType string +type IPAccessControlEntryAction string -func (e TransactionType) String() string { +func (e IPAccessControlEntryAction) String() string { return string(e) } const ( - TransactionType_None TransactionType = "None" - TransactionType_Any TransactionType = "Any" - TransactionType_SimpleMajority TransactionType = "SimpleMajority" - TransactionType_SuperMajority TransactionType = "SuperMajority" - TransactionType_AbsoluteMajority TransactionType = "AbsoluteMajority" + IPAccessControlEntryAction_Allow IPAccessControlEntryAction = "Allow" + IPAccessControlEntryAction_Block IPAccessControlEntryAction = "Block" ) /** - * Models the User Login Success Event. + * Key API response object. * * @author Daniel DeGroff */ -type UserLoginSuccessEvent struct { - BaseUserEvent - ApplicationId string `json:"applicationId,omitempty"` - AuthenticationType string `json:"authenticationType,omitempty"` - ConnectorId string `json:"connectorId,omitempty"` - IdentityProviderId string `json:"identityProviderId,omitempty"` - IdentityProviderName string `json:"identityProviderName,omitempty"` - IpAddress string `json:"ipAddress,omitempty"` +type KeyResponse struct { + BaseHTTPResponse + Key Key `json:"key,omitempty"` + Keys []Key `json:"keys,omitempty"` +} + +func (b *KeyResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Group Member Delete Request + * Search criteria for Keys * - * @author Daniel DeGroff + * @author Spencer Witt */ -type MemberDeleteRequest struct { - MemberIds []string `json:"memberIds,omitempty"` - Members map[string][]string `json:"members,omitempty"` +type KeySearchCriteria struct { + BaseSearchCriteria + Algorithm KeyAlgorithm `json:"algorithm,omitempty"` + Name string `json:"name,omitempty"` + Type KeyType `json:"type,omitempty"` } /** - * Registration API request object. + * Stores an message template used to distribute messages; * - * @author Brian Pontarelli + * @author Michael Sleevi */ -type RegistrationResponse struct { - BaseHTTPResponse - RefreshToken string `json:"refreshToken,omitempty"` - Registration UserRegistration `json:"registration,omitempty"` - RegistrationVerificationId string `json:"registrationVerificationId,omitempty"` - RegistrationVerificationOneTimeCode string `json:"registrationVerificationOneTimeCode,omitempty"` - Token string `json:"token,omitempty"` - TokenExpirationInstant int64 `json:"tokenExpirationInstant,omitempty"` - User User `json:"user,omitempty"` -} - -func (b *RegistrationResponse) SetStatus(status int) { - b.StatusCode = status +type MessageTemplate struct { + Data map[string]interface{} `json:"data,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + Name string `json:"name,omitempty"` + Type MessageType `json:"type,omitempty"` } /** - * Models the User Update Registration Event. - *

- * This is different than user.registration.update in that it is sent after this event completes, this cannot be transactional. + * Models the User Reactivate Event. * - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type UserRegistrationUpdateCompleteEvent struct { +type UserReactivateEvent struct { BaseUserEvent - ApplicationId string `json:"applicationId,omitempty"` - Original UserRegistration `json:"original,omitempty"` - Registration UserRegistration `json:"registration,omitempty"` } /** - * Search response for Themes - * - * @author Mark Manes + * @author Daniel DeGroff */ -type ThemeSearchResponse struct { - BaseHTTPResponse - Themes []Theme `json:"themes,omitempty"` - Total int64 `json:"total,omitempty"` +type FormField struct { + Confirm bool `json:"confirm"` + ConsentId string `json:"consentId,omitempty"` + Control FormControl `json:"control,omitempty"` + Data map[string]interface{} `json:"data,omitempty"` + Description string `json:"description,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + Key string `json:"key,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + Name string `json:"name,omitempty"` + Options []string `json:"options,omitempty"` + Required bool `json:"required"` + Type FormDataType `json:"type,omitempty"` + Validator FormFieldValidator `json:"validator,omitempty"` } -func (b *ThemeSearchResponse) SetStatus(status int) { - b.StatusCode = status +/** + * Search request for Applications + * + * @author Spencer Witt + */ +type ApplicationSearchRequest struct { + ExpandableRequest + Search ApplicationSearchCriteria `json:"search,omitempty"` } /** - * Used to express whether the Relying Party requires user verification for the - * current operation. + * A custom OAuth scope for a specific application. * * @author Spencer Witt */ -type UserVerificationRequirement string - -func (e UserVerificationRequirement) String() string { - return string(e) +type ApplicationOAuthScope struct { + ApplicationId string `json:"applicationId,omitempty"` + Data map[string]interface{} `json:"data,omitempty"` + DefaultConsentDetail string `json:"defaultConsentDetail,omitempty"` + DefaultConsentMessage string `json:"defaultConsentMessage,omitempty"` + Description string `json:"description,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + Name string `json:"name,omitempty"` + Required bool `json:"required"` } -const ( - UserVerificationRequirement_Required UserVerificationRequirement = "required" - UserVerificationRequirement_Preferred UserVerificationRequirement = "preferred" - UserVerificationRequirement_Discouraged UserVerificationRequirement = "discouraged" -) - /** - * @author Trevor Smith + * Models the Group Create Complete Event. + * + * @author Daniel DeGroff */ -type DeviceResponse struct { - BaseHTTPResponse - DeviceCode string `json:"device_code,omitempty"` - ExpiresIn int `json:"expires_in,omitempty"` - Interval int `json:"interval,omitempty"` - UserCode string `json:"user_code,omitempty"` - VerificationUri string `json:"verification_uri,omitempty"` - VerificationUriComplete string `json:"verification_uri_complete,omitempty"` +type GroupDeleteCompleteEvent struct { + BaseGroupEvent } -func (b *DeviceResponse) SetStatus(status int) { - b.StatusCode = status +/** + * Models the JWT Refresh Event. This event will be fired when a JWT is "refreshed" (generated) using a Refresh Token. + * + * @author Daniel DeGroff + */ +type JWTRefreshEvent struct { + BaseEvent + ApplicationId string `json:"applicationId,omitempty"` + Original string `json:"original,omitempty"` + RefreshToken string `json:"refreshToken,omitempty"` + Token string `json:"token,omitempty"` + UserId string `json:"userId,omitempty"` } /** - * Search criteria for Email templates - * - * @author Mark Manes + * @author Brett Pontarelli */ -type EmailTemplateSearchCriteria struct { - BaseSearchCriteria - Name string `json:"name,omitempty"` +type TenantCaptchaConfiguration struct { + Enableable + CaptchaMethod CaptchaMethod `json:"captchaMethod,omitempty"` + SecretKey string `json:"secretKey,omitempty"` + SiteKey string `json:"siteKey,omitempty"` + Threshold float64 `json:"threshold,omitempty"` } -type APIKeyPermissions struct { - Endpoints map[string][]string `json:"endpoints,omitempty"` +/** + * @author Daniel DeGroff + */ +type LoginRecordSearchRequest struct { + RetrieveTotal bool `json:"retrieveTotal"` + Search LoginRecordSearchCriteria `json:"search,omitempty"` } /** + * Models the User Create Event. + * * @author Brian Pontarelli */ -type BaseElasticSearchCriteria struct { - BaseSearchCriteria - AccurateTotal bool `json:"accurateTotal"` - Ids []string `json:"ids,omitempty"` - NextResults string `json:"nextResults,omitempty"` - Query string `json:"query,omitempty"` - QueryString string `json:"queryString,omitempty"` - SortFields []SortField `json:"sortFields,omitempty"` +type UserCreateEvent struct { + BaseUserEvent } /** - * Search request for IP ACLs . - * - * @author Brett Guy + * @author Lyle Schemmerling */ -type IPAccessControlListSearchRequest struct { - Search IPAccessControlListSearchCriteria `json:"search,omitempty"` +type BaseSAMLv2IdentityProvider struct { + BaseIdentityProvider + EmailClaim string `json:"emailClaim,omitempty"` + KeyId string `json:"keyId,omitempty"` + UniqueIdClaim string `json:"uniqueIdClaim,omitempty"` + UseNameIdForEmail bool `json:"useNameIdForEmail"` + UsernameClaim string `json:"usernameClaim,omitempty"` } /** - * The Application Scope API request object. + * Options to request extensions during credential registration * * @author Spencer Witt */ -type ApplicationOAuthScopeRequest struct { - Scope ApplicationOAuthScope `json:"scope,omitempty"` +type WebAuthnRegistrationExtensionOptions struct { + CredProps bool `json:"credProps"` } -type LoginConfiguration struct { - AllowTokenRefresh bool `json:"allowTokenRefresh"` - GenerateRefreshTokens bool `json:"generateRefreshTokens"` - RequireAuthentication bool `json:"requireAuthentication"` +/** + * User Action Reason API request object. + * + * @author Brian Pontarelli + */ +type UserActionReasonRequest struct { + UserActionReason UserActionReason `json:"userActionReason,omitempty"` +} + +/** + * @author Daniel DeGroff + */ +type AccessToken struct { + BaseHTTPResponse + AccessToken string `json:"access_token,omitempty"` + ExpiresIn int `json:"expires_in,omitempty"` + IdToken string `json:"id_token,omitempty"` + RefreshToken string `json:"refresh_token,omitempty"` + RefreshTokenId string `json:"refresh_token_id,omitempty"` + Scope string `json:"scope,omitempty"` + TokenType TokenType `json:"token_type,omitempty"` + UserId string `json:"userId,omitempty"` } -/** - * Models the Group Member Add Event. - * - * @author Daniel DeGroff - */ -type GroupMemberAddEvent struct { - BaseGroupEvent - Members []GroupMember `json:"members,omitempty"` +func (b *AccessToken) SetStatus(status int) { + b.StatusCode = status } /** - * Key API request object. + * Search API response. * - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type KeyRequest struct { - Key Key `json:"key,omitempty"` +type SearchResponse struct { + BaseHTTPResponse + ExpandableResponse + NextResults string `json:"nextResults,omitempty"` + Total int64 `json:"total,omitempty"` + Users []User `json:"users,omitempty"` +} + +func (b *SearchResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Event log response. - * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type EventLogSearchResponse struct { +type SendResponse struct { BaseHTTPResponse - EventLogs []EventLog `json:"eventLogs,omitempty"` - Total int64 `json:"total,omitempty"` + AnonymousResults map[string]EmailTemplateErrors `json:"anonymousResults,omitempty"` + Results map[string]EmailTemplateErrors `json:"results,omitempty"` } -func (b *EventLogSearchResponse) SetStatus(status int) { +func (b *SendResponse) SetStatus(status int) { b.StatusCode = status } -type TwoFactorTrust struct { - ApplicationId string `json:"applicationId,omitempty"` - Expiration int64 `json:"expiration,omitempty"` - StartInstant int64 `json:"startInstant,omitempty"` +type EmailTemplateErrors struct { + ParseErrors map[string]string `json:"parseErrors,omitempty"` + RenderErrors map[string]string `json:"renderErrors,omitempty"` } /** - * Application-level configuration for WebAuthn + * The phases of a time-based user action. * - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type ApplicationWebAuthnConfiguration struct { - Enableable - BootstrapWorkflow ApplicationWebAuthnWorkflowConfiguration `json:"bootstrapWorkflow,omitempty"` - ReauthenticationWorkflow ApplicationWebAuthnWorkflowConfiguration `json:"reauthenticationWorkflow,omitempty"` +type UserActionPhase string + +func (e UserActionPhase) String() string { + return string(e) } +const ( + UserActionPhase_Start UserActionPhase = "start" + UserActionPhase_Modify UserActionPhase = "modify" + UserActionPhase_Cancel UserActionPhase = "cancel" + UserActionPhase_End UserActionPhase = "end" +) + /** - * Models a generic connector. - * - * @author Trevor Smith + * @author Daniel DeGroff */ -type GenericConnectorConfiguration struct { - BaseConnectorConfiguration - AuthenticationURL string `json:"authenticationURL,omitempty"` - ConnectTimeout int `json:"connectTimeout,omitempty"` - Headers map[string]string `json:"headers,omitempty"` - HttpAuthenticationPassword string `json:"httpAuthenticationPassword,omitempty"` - HttpAuthenticationUsername string `json:"httpAuthenticationUsername,omitempty"` - ReadTimeout int `json:"readTimeout,omitempty"` - SslCertificateKeyId string `json:"sslCertificateKeyId,omitempty"` +type RememberPreviousPasswords struct { + Enableable + Count int `json:"count,omitempty"` } /** - * Base class for all {@link Group} and {@link GroupMember} events. + * The types of lambdas that indicate how they are invoked by FusionAuth. * - * @author Spencer Witt + * @author Brian Pontarelli */ -type BaseGroupEvent struct { - BaseEvent - Group Group `json:"group,omitempty"` -} +type LambdaType string -/** - * @author Daniel DeGroff - */ -type MessengerTransport struct { +func (e LambdaType) String() string { + return string(e) } +const ( + LambdaType_JWTPopulate LambdaType = "JWTPopulate" + LambdaType_OpenIDReconcile LambdaType = "OpenIDReconcile" + LambdaType_SAMLv2Reconcile LambdaType = "SAMLv2Reconcile" + LambdaType_SAMLv2Populate LambdaType = "SAMLv2Populate" + LambdaType_AppleReconcile LambdaType = "AppleReconcile" + LambdaType_ExternalJWTReconcile LambdaType = "ExternalJWTReconcile" + LambdaType_FacebookReconcile LambdaType = "FacebookReconcile" + LambdaType_GoogleReconcile LambdaType = "GoogleReconcile" + LambdaType_HYPRReconcile LambdaType = "HYPRReconcile" + LambdaType_TwitterReconcile LambdaType = "TwitterReconcile" + LambdaType_LDAPConnectorReconcile LambdaType = "LDAPConnectorReconcile" + LambdaType_LinkedInReconcile LambdaType = "LinkedInReconcile" + LambdaType_EpicGamesReconcile LambdaType = "EpicGamesReconcile" + LambdaType_NintendoReconcile LambdaType = "NintendoReconcile" + LambdaType_SonyPSNReconcile LambdaType = "SonyPSNReconcile" + LambdaType_SteamReconcile LambdaType = "SteamReconcile" + LambdaType_TwitchReconcile LambdaType = "TwitchReconcile" + LambdaType_XboxReconcile LambdaType = "XboxReconcile" + LambdaType_ClientCredentialsJWTPopulate LambdaType = "ClientCredentialsJWTPopulate" + LambdaType_SCIMServerGroupRequestConverter LambdaType = "SCIMServerGroupRequestConverter" + LambdaType_SCIMServerGroupResponseConverter LambdaType = "SCIMServerGroupResponseConverter" + LambdaType_SCIMServerUserRequestConverter LambdaType = "SCIMServerUserRequestConverter" + LambdaType_SCIMServerUserResponseConverter LambdaType = "SCIMServerUserResponseConverter" + LambdaType_SelfServiceRegistrationValidation LambdaType = "SelfServiceRegistrationValidation" + LambdaType_UserInfoPopulate LambdaType = "UserInfoPopulate" + LambdaType_LoginValidation LambdaType = "LoginValidation" +) + /** - * @author Daniel DeGroff + * The authenticator's response for the registration ceremony in its encoded format + * + * @author Spencer Witt */ -type IdentityProviderTenantConfiguration struct { - Data map[string]interface{} `json:"data,omitempty"` - LimitUserLinkCount IdentityProviderLimitUserLinkingPolicy `json:"limitUserLinkCount,omitempty"` +type WebAuthnAuthenticatorRegistrationResponse struct { + BaseHTTPResponse + AttestationObject string `json:"attestationObject,omitempty"` + ClientDataJSON string `json:"clientDataJSON,omitempty"` } -/** - * @author Brian Pontarelli - */ -type AuditLogSearchCriteria struct { - BaseSearchCriteria - End int64 `json:"end,omitempty"` - Message string `json:"message,omitempty"` - NewValue string `json:"newValue,omitempty"` - OldValue string `json:"oldValue,omitempty"` - Reason string `json:"reason,omitempty"` - Start int64 `json:"start,omitempty"` - User string `json:"user,omitempty"` +func (b *WebAuthnAuthenticatorRegistrationResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Refresh Token Import request. + * A marker interface indicating this event is not scoped to a tenant and will be sent to all webhooks. * - * @author Brett Guy + * @author Daniel DeGroff */ -type RefreshTokenImportRequest struct { - RefreshTokens []RefreshToken `json:"refreshTokens,omitempty"` - ValidateDbConstraints bool `json:"validateDbConstraints"` +type InstanceEvent struct { + NonTransactionalEvent } /** - * WebAuthn Credential API response + * API request to import an existing WebAuthn credential(s) * * @author Spencer Witt */ -type WebAuthnCredentialResponse struct { - BaseHTTPResponse - Credential WebAuthnCredential `json:"credential,omitempty"` - Credentials []WebAuthnCredential `json:"credentials,omitempty"` -} - -func (b *WebAuthnCredentialResponse) SetStatus(status int) { - b.StatusCode = status +type WebAuthnCredentialImportRequest struct { + Credentials []WebAuthnCredential `json:"credentials,omitempty"` + ValidateDbConstraints bool `json:"validateDbConstraints"` } /** - * Webhook event log search response. + * Configuration for signing webhooks. * - * @author Spencer Witt + * @author Brent Halsey */ -type WebhookEventLogSearchResponse struct { - BaseHTTPResponse - Total int64 `json:"total,omitempty"` - WebhookEventLogs []WebhookEventLog `json:"webhookEventLogs,omitempty"` +type WebhookSignatureConfiguration struct { + Enableable + SigningKeyId string `json:"signingKeyId,omitempty"` } -func (b *WebhookEventLogSearchResponse) SetStatus(status int) { - b.StatusCode = status +/** + * @author Daniel DeGroff + */ +type PasswordlessStartRequest struct { + ApplicationId string `json:"applicationId,omitempty"` + LoginId string `json:"loginId,omitempty"` + State map[string]interface{} `json:"state,omitempty"` } /** - * @author Trevor Smith + * API response for retrieving Refresh Tokens + * + * @author Daniel DeGroff */ -type ConnectorResponse struct { +type RefreshTokenResponse struct { BaseHTTPResponse - Connector BaseConnectorConfiguration `json:"connector,omitempty"` - Connectors []BaseConnectorConfiguration `json:"connectors,omitempty"` + RefreshToken RefreshToken `json:"refreshToken,omitempty"` + RefreshTokens []RefreshToken `json:"refreshTokens,omitempty"` } -func (b *ConnectorResponse) SetStatus(status int) { +func (b *RefreshTokenResponse) SetStatus(status int) { b.StatusCode = status } /** - * Models a User consent. + * Registration API request object. * - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type UserConsent struct { - Consent Consent `json:"consent,omitempty"` - ConsentId string `json:"consentId,omitempty"` - Data map[string]interface{} `json:"data,omitempty"` - GiverUserId string `json:"giverUserId,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - Status ConsentStatus `json:"status,omitempty"` - UserId string `json:"userId,omitempty"` - Values []string `json:"values,omitempty"` +type RegistrationRequest struct { + BaseEventRequest + DisableDomainBlock bool `json:"disableDomainBlock"` + GenerateAuthenticationToken bool `json:"generateAuthenticationToken"` + Registration UserRegistration `json:"registration,omitempty"` + SendSetPasswordEmail bool `json:"sendSetPasswordEmail"` + SkipRegistrationVerification bool `json:"skipRegistrationVerification"` + SkipVerification bool `json:"skipVerification"` + User User `json:"user,omitempty"` } /** - * Steam API modes. - * * @author Daniel DeGroff */ -type SteamAPIMode string +type SystemTrustedProxyConfigurationPolicy string -func (e SteamAPIMode) String() string { +func (e SystemTrustedProxyConfigurationPolicy) String() string { return string(e) } const ( - SteamAPIMode_Public SteamAPIMode = "Public" - SteamAPIMode_Partner SteamAPIMode = "Partner" + SystemTrustedProxyConfigurationPolicy_All SystemTrustedProxyConfigurationPolicy = "All" + SystemTrustedProxyConfigurationPolicy_OnlyConfigured SystemTrustedProxyConfigurationPolicy = "OnlyConfigured" ) /** - * Request for the Logout API that can be used as an alternative to URL parameters. + * Request for managing FusionAuth Reactor and licenses. * * @author Brian Pontarelli - */ -type LogoutRequest struct { - BaseEventRequest - Global bool `json:"global"` - RefreshToken string `json:"refreshToken,omitempty"` -} - -/** - * @author Daniel DeGroff - */ -type LookupResponse struct { - BaseHTTPResponse - IdentityProvider IdentityProviderDetails `json:"identityProvider,omitempty"` -} - -func (b *LookupResponse) SetStatus(status int) { - b.StatusCode = status + */ +type ReactorRequest struct { + License string `json:"license,omitempty"` + LicenseId string `json:"licenseId,omitempty"` } /** - * Models a family grouping of users. + * Search results. * * @author Brian Pontarelli */ -type Family struct { - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - Members []FamilyMember `json:"members,omitempty"` -} - -type ProviderLambdaConfiguration struct { - ReconcileId string `json:"reconcileId,omitempty"` +type SearchResults struct { + NextResults string `json:"nextResults,omitempty"` + Results []interface{} `json:"results,omitempty"` + Total int64 `json:"total,omitempty"` + TotalEqualToActual bool `json:"totalEqualToActual"` } /** - * Search response for entity types. + * Response for the daily active user report. * * @author Brian Pontarelli */ -type EntityTypeSearchResponse struct { +type DailyActiveUserReportResponse struct { BaseHTTPResponse - EntityTypes []EntityType `json:"entityTypes,omitempty"` - Total int64 `json:"total,omitempty"` + DailyActiveUsers []Count `json:"dailyActiveUsers,omitempty"` + Total int64 `json:"total,omitempty"` } -func (b *EntityTypeSearchResponse) SetStatus(status int) { +func (b *DailyActiveUserReportResponse) SetStatus(status int) { b.StatusCode = status } /** - * @author Lyle Schemmerling + * SAML v2 IdP Initiated identity provider configuration. + * + * @author Daniel DeGroff */ -type BaseSAMLv2IdentityProvider struct { - BaseIdentityProvider - EmailClaim string `json:"emailClaim,omitempty"` - KeyId string `json:"keyId,omitempty"` - UniqueIdClaim string `json:"uniqueIdClaim,omitempty"` - UseNameIdForEmail bool `json:"useNameIdForEmail"` - UsernameClaim string `json:"usernameClaim,omitempty"` +type SAMLv2IdPInitiatedIdentityProvider struct { + BaseSAMLv2IdentityProvider + Issuer string `json:"issuer,omitempty"` } /** * @author Daniel DeGroff */ -type LinkedInApplicationConfiguration struct { - BaseIdentityProviderApplicationConfiguration - ButtonText string `json:"buttonText,omitempty"` - ClientId string `json:"client_id,omitempty"` - ClientSecret string `json:"client_secret,omitempty"` - Scope string `json:"scope,omitempty"` +type DeviceApprovalResponse struct { + BaseHTTPResponse + DeviceGrantStatus string `json:"deviceGrantStatus,omitempty"` + DeviceInfo DeviceInfo `json:"deviceInfo,omitempty"` + IdentityProviderLink IdentityProviderLink `json:"identityProviderLink,omitempty"` + TenantId string `json:"tenantId,omitempty"` + UserId string `json:"userId,omitempty"` +} + +func (b *DeviceApprovalResponse) SetStatus(status int) { + b.StatusCode = status } /** - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type PreviewRequest struct { - EmailTemplate EmailTemplate `json:"emailTemplate,omitempty"` - Locale string `json:"locale,omitempty"` +type UserTwoFactorConfiguration struct { + Methods []TwoFactorMethod `json:"methods,omitempty"` + RecoveryCodes []string `json:"recoveryCodes,omitempty"` } /** - * Request for the Refresh Token API to revoke a refresh token rather than using the URL parameters. + * Search request for email templates * - * @author Brian Pontarelli + * @author Mark Manes */ -type RefreshTokenRevokeRequest struct { - BaseEventRequest - ApplicationId string `json:"applicationId,omitempty"` - Token string `json:"token,omitempty"` - UserId string `json:"userId,omitempty"` +type EmailTemplateSearchRequest struct { + Search EmailTemplateSearchCriteria `json:"search,omitempty"` } /** - * @author Trevor Smith + * The summary of the action that is preventing login to be returned on the login response. + * + * @author Daniel DeGroff */ -type ChangePasswordReason string - -func (e ChangePasswordReason) String() string { - return string(e) +type LoginPreventedResponse struct { + BaseHTTPResponse + ActionerUserId string `json:"actionerUserId,omitempty"` + ActionId string `json:"actionId,omitempty"` + Expiry int64 `json:"expiry,omitempty"` + LocalizedName string `json:"localizedName,omitempty"` + LocalizedOption string `json:"localizedOption,omitempty"` + LocalizedReason string `json:"localizedReason,omitempty"` + Name string `json:"name,omitempty"` + Option string `json:"option,omitempty"` + Reason string `json:"reason,omitempty"` + ReasonCode string `json:"reasonCode,omitempty"` } -const ( - ChangePasswordReason_Administrative ChangePasswordReason = "Administrative" - ChangePasswordReason_Breached ChangePasswordReason = "Breached" - ChangePasswordReason_Expired ChangePasswordReason = "Expired" - ChangePasswordReason_Validation ChangePasswordReason = "Validation" -) +func (b *LoginPreventedResponse) SetStatus(status int) { + b.StatusCode = status +} /** - * Something that can be enabled and thus also disabled. + * Models content user action options. * - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type Enableable struct { - Enabled bool `json:"enabled"` +type UserActionOption struct { + LocalizedNames map[string]string `json:"localizedNames,omitempty"` + Name string `json:"name,omitempty"` } /** - * Search request for email templates + * Event log response. * - * @author Mark Manes + * @author Daniel DeGroff */ -type EmailTemplateSearchRequest struct { - Search EmailTemplateSearchCriteria `json:"search,omitempty"` +type EventLogResponse struct { + BaseHTTPResponse + EventLog EventLog `json:"eventLog,omitempty"` } -type EmailSecurityType string - -func (e EmailSecurityType) String() string { - return string(e) +func (b *EventLogResponse) SetStatus(status int) { + b.StatusCode = status } -const ( - EmailSecurityType_NONE EmailSecurityType = "NONE" - EmailSecurityType_SSL EmailSecurityType = "SSL" - EmailSecurityType_TLS EmailSecurityType = "TLS" -) - /** - * Provides the authenticator with the data it needs to generate an assertion. - * - * @author Spencer Witt + * @author Daniel DeGroff */ -type PublicKeyCredentialRequestOptions struct { - AllowCredentials []PublicKeyCredentialDescriptor `json:"allowCredentials,omitempty"` - Challenge string `json:"challenge,omitempty"` - RpId string `json:"rpId,omitempty"` - Timeout int64 `json:"timeout,omitempty"` - UserVerification UserVerificationRequirement `json:"userVerification,omitempty"` +type SAMLv2IdPInitiatedApplicationConfiguration struct { + BaseIdentityProviderApplicationConfiguration } /** - * Supply additional information about the Relying Party when creating a new credential - * - * @author Spencer Witt + * @author andrewpai */ -type PublicKeyCredentialRelyingPartyEntity struct { - PublicKeyCredentialEntity - Id string `json:"id,omitempty"` +type SelfServiceFormConfiguration struct { + RequireCurrentPasswordOnPasswordChange bool `json:"requireCurrentPasswordOnPasswordChange"` } /** - * API response for User consent. + * Models the Group Update Complete Event. * * @author Daniel DeGroff */ -type UserConsentResponse struct { - BaseHTTPResponse - UserConsent UserConsent `json:"userConsent,omitempty"` - UserConsents []UserConsent `json:"userConsents,omitempty"` +type GroupUpdateCompleteEvent struct { + BaseGroupEvent + Original Group `json:"original,omitempty"` } -func (b *UserConsentResponse) SetStatus(status int) { - b.StatusCode = status +/** + * Reindex API request + * + * @author Daniel DeGroff + */ +type ReindexRequest struct { + Index string `json:"index,omitempty"` } /** * @author Daniel DeGroff */ -type BaseIdentityProviderApplicationConfiguration struct { - Enableable - CreateRegistration bool `json:"createRegistration"` - Data map[string]interface{} `json:"data,omitempty"` +type ApplicationExternalIdentifierConfiguration struct { + TwoFactorTrustIdTimeToLiveInSeconds int `json:"twoFactorTrustIdTimeToLiveInSeconds,omitempty"` } /** - * API response for refreshing a JWT with a Refresh Token. - *

- * Using a different response object from RefreshTokenResponse because the retrieve response will return an object for refreshToken, and this is a - * string. - * - * @author Daniel DeGroff + * @author Seth Musselman */ -type JWTRefreshResponse struct { - BaseHTTPResponse - RefreshToken string `json:"refreshToken,omitempty"` - RefreshTokenId string `json:"refreshTokenId,omitempty"` - Token string `json:"token,omitempty"` +type Application struct { + AccessControlConfiguration ApplicationAccessControlConfiguration `json:"accessControlConfiguration,omitempty"` + Active bool `json:"active"` + AuthenticationTokenConfiguration AuthenticationTokenConfiguration `json:"authenticationTokenConfiguration,omitempty"` + CleanSpeakConfiguration CleanSpeakConfiguration `json:"cleanSpeakConfiguration,omitempty"` + Data map[string]interface{} `json:"data,omitempty"` + EmailConfiguration ApplicationEmailConfiguration `json:"emailConfiguration,omitempty"` + ExternalIdentifierConfiguration ApplicationExternalIdentifierConfiguration `json:"externalIdentifierConfiguration,omitempty"` + FormConfiguration ApplicationFormConfiguration `json:"formConfiguration,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + JwtConfiguration JWTConfiguration `json:"jwtConfiguration,omitempty"` + LambdaConfiguration LambdaConfiguration `json:"lambdaConfiguration,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + LoginConfiguration LoginConfiguration `json:"loginConfiguration,omitempty"` + MultiFactorConfiguration ApplicationMultiFactorConfiguration `json:"multiFactorConfiguration,omitempty"` + Name string `json:"name,omitempty"` + OauthConfiguration OAuth2Configuration `json:"oauthConfiguration,omitempty"` + PasswordlessConfiguration PasswordlessConfiguration `json:"passwordlessConfiguration,omitempty"` + RegistrationConfiguration RegistrationConfiguration `json:"registrationConfiguration,omitempty"` + RegistrationDeletePolicy ApplicationRegistrationDeletePolicy `json:"registrationDeletePolicy,omitempty"` + Roles []ApplicationRole `json:"roles,omitempty"` + Samlv2Configuration SAMLv2Configuration `json:"samlv2Configuration,omitempty"` + Scopes []ApplicationOAuthScope `json:"scopes,omitempty"` + State ObjectState `json:"state,omitempty"` + TenantId string `json:"tenantId,omitempty"` + ThemeId string `json:"themeId,omitempty"` + Unverified RegistrationUnverifiedOptions `json:"unverified,omitempty"` + VerificationEmailTemplateId string `json:"verificationEmailTemplateId,omitempty"` + VerificationStrategy VerificationStrategy `json:"verificationStrategy,omitempty"` + VerifyRegistration bool `json:"verifyRegistration"` + WebAuthnConfiguration ApplicationWebAuthnConfiguration `json:"webAuthnConfiguration,omitempty"` +} + +type ApplicationEmailConfiguration struct { + EmailUpdateEmailTemplateId string `json:"emailUpdateEmailTemplateId,omitempty"` + EmailVerificationEmailTemplateId string `json:"emailVerificationEmailTemplateId,omitempty"` + EmailVerifiedEmailTemplateId string `json:"emailVerifiedEmailTemplateId,omitempty"` + ForgotPasswordEmailTemplateId string `json:"forgotPasswordEmailTemplateId,omitempty"` + LoginIdInUseOnCreateEmailTemplateId string `json:"loginIdInUseOnCreateEmailTemplateId,omitempty"` + LoginIdInUseOnUpdateEmailTemplateId string `json:"loginIdInUseOnUpdateEmailTemplateId,omitempty"` + LoginNewDeviceEmailTemplateId string `json:"loginNewDeviceEmailTemplateId,omitempty"` + LoginSuspiciousEmailTemplateId string `json:"loginSuspiciousEmailTemplateId,omitempty"` + PasswordlessEmailTemplateId string `json:"passwordlessEmailTemplateId,omitempty"` + PasswordResetSuccessEmailTemplateId string `json:"passwordResetSuccessEmailTemplateId,omitempty"` + PasswordUpdateEmailTemplateId string `json:"passwordUpdateEmailTemplateId,omitempty"` + SetPasswordEmailTemplateId string `json:"setPasswordEmailTemplateId,omitempty"` + TwoFactorMethodAddEmailTemplateId string `json:"twoFactorMethodAddEmailTemplateId,omitempty"` + TwoFactorMethodRemoveEmailTemplateId string `json:"twoFactorMethodRemoveEmailTemplateId,omitempty"` +} + +type AuthenticationTokenConfiguration struct { + Enableable +} + +type LambdaConfiguration struct { + AccessTokenPopulateId string `json:"accessTokenPopulateId,omitempty"` + IdTokenPopulateId string `json:"idTokenPopulateId,omitempty"` + Samlv2PopulateId string `json:"samlv2PopulateId,omitempty"` + SelfServiceRegistrationValidationId string `json:"selfServiceRegistrationValidationId,omitempty"` + UserinfoPopulateId string `json:"userinfoPopulateId,omitempty"` } -func (b *JWTRefreshResponse) SetStatus(status int) { - b.StatusCode = status +type LoginConfiguration struct { + AllowTokenRefresh bool `json:"allowTokenRefresh"` + GenerateRefreshTokens bool `json:"generateRefreshTokens"` + RequireAuthentication bool `json:"requireAuthentication"` } -/** - * @author Brian Pontarelli - */ -type Count struct { - Count int `json:"count,omitempty"` - Interval int `json:"interval,omitempty"` +type PasswordlessConfiguration struct { + Enableable } -/** - * @author Daniel DeGroff - */ -type AuditLogExportRequest struct { - BaseExportRequest - Criteria AuditLogSearchCriteria `json:"criteria,omitempty"` +type RegistrationConfiguration struct { + Enableable + BirthDate Requirable `json:"birthDate,omitempty"` + ConfirmPassword bool `json:"confirmPassword"` + FirstName Requirable `json:"firstName,omitempty"` + FormId string `json:"formId,omitempty"` + FullName Requirable `json:"fullName,omitempty"` + LastName Requirable `json:"lastName,omitempty"` + LoginIdType LoginIdType `json:"loginIdType,omitempty"` + MiddleName Requirable `json:"middleName,omitempty"` + MobilePhone Requirable `json:"mobilePhone,omitempty"` + PreferredLanguages Requirable `json:"preferredLanguages,omitempty"` + Type RegistrationType `json:"type,omitempty"` } -/** - * Defines an error. - * - * @author Brian Pontarelli - */ -type Error struct { - Code string `json:"code,omitempty"` - Data map[string]interface{} `json:"data,omitempty"` - Message string `json:"message,omitempty"` +type LoginIdType string + +func (e LoginIdType) String() string { + return string(e) } -/** - * API request to import an existing WebAuthn credential(s) - * - * @author Spencer Witt - */ -type WebAuthnCredentialImportRequest struct { - Credentials []WebAuthnCredential `json:"credentials,omitempty"` - ValidateDbConstraints bool `json:"validateDbConstraints"` +const ( + LoginIdType_Email LoginIdType = "email" + LoginIdType_Username LoginIdType = "username" +) + +type RegistrationType string + +func (e RegistrationType) String() string { + return string(e) } -/** - * @author Brian Pontarelli - */ -type ExpiryUnit string +const ( + RegistrationType_Basic RegistrationType = "basic" + RegistrationType_Advanced RegistrationType = "advanced" +) -func (e ExpiryUnit) String() string { +type SAMLv2Configuration struct { + Enableable + AssertionEncryptionConfiguration SAMLv2AssertionEncryptionConfiguration `json:"assertionEncryptionConfiguration,omitempty"` + Audience string `json:"audience,omitempty"` + AuthorizedRedirectURLs []string `json:"authorizedRedirectURLs,omitempty"` + CallbackURL string `json:"callbackURL,omitempty"` + Debug bool `json:"debug"` + DefaultVerificationKeyId string `json:"defaultVerificationKeyId,omitempty"` + InitiatedLogin SAMLv2IdPInitiatedLoginConfiguration `json:"initiatedLogin,omitempty"` + Issuer string `json:"issuer,omitempty"` + KeyId string `json:"keyId,omitempty"` + LoginHintConfiguration LoginHintConfiguration `json:"loginHintConfiguration,omitempty"` + Logout SAMLv2Logout `json:"logout,omitempty"` + LogoutURL string `json:"logoutURL,omitempty"` + RequireSignedRequests bool `json:"requireSignedRequests"` + XmlSignatureC14nMethod CanonicalizationMethod `json:"xmlSignatureC14nMethod,omitempty"` + XmlSignatureLocation XMLSignatureLocation `json:"xmlSignatureLocation,omitempty"` +} + +type SAMLLogoutBehavior string + +func (e SAMLLogoutBehavior) String() string { return string(e) } const ( - ExpiryUnit_MINUTES ExpiryUnit = "MINUTES" - ExpiryUnit_HOURS ExpiryUnit = "HOURS" - ExpiryUnit_DAYS ExpiryUnit = "DAYS" - ExpiryUnit_WEEKS ExpiryUnit = "WEEKS" - ExpiryUnit_MONTHS ExpiryUnit = "MONTHS" - ExpiryUnit_YEARS ExpiryUnit = "YEARS" + SAMLLogoutBehavior_AllParticipants SAMLLogoutBehavior = "AllParticipants" + SAMLLogoutBehavior_OnlyOriginator SAMLLogoutBehavior = "OnlyOriginator" ) -/** - * @author Brett Guy - */ -type MessengerType string +type XMLSignatureLocation string -func (e MessengerType) String() string { +func (e XMLSignatureLocation) String() string { return string(e) } const ( - MessengerType_Generic MessengerType = "Generic" - MessengerType_Kafka MessengerType = "Kafka" - MessengerType_Twilio MessengerType = "Twilio" + XMLSignatureLocation_Assertion XMLSignatureLocation = "Assertion" + XMLSignatureLocation_Response XMLSignatureLocation = "Response" ) -/** - * An expandable API response. - * - * @author Daniel DeGroff - */ -type ExpandableResponse struct { - BaseHTTPResponse - Expandable []string `json:"expandable,omitempty"` +type SAMLv2AssertionEncryptionConfiguration struct { + Enableable + DigestAlgorithm string `json:"digestAlgorithm,omitempty"` + EncryptionAlgorithm string `json:"encryptionAlgorithm,omitempty"` + KeyLocation string `json:"keyLocation,omitempty"` + KeyTransportAlgorithm string `json:"keyTransportAlgorithm,omitempty"` + KeyTransportEncryptionKeyId string `json:"keyTransportEncryptionKeyId,omitempty"` + MaskGenerationFunction string `json:"maskGenerationFunction,omitempty"` } -func (b *ExpandableResponse) SetStatus(status int) { - b.StatusCode = status +type SAMLv2Logout struct { + Behavior SAMLLogoutBehavior `json:"behavior,omitempty"` + DefaultVerificationKeyId string `json:"defaultVerificationKeyId,omitempty"` + KeyId string `json:"keyId,omitempty"` + RequireSignedRequests bool `json:"requireSignedRequests"` + SingleLogout SAMLv2SingleLogout `json:"singleLogout,omitempty"` + XmlSignatureC14nMethod CanonicalizationMethod `json:"xmlSignatureC14nMethod,omitempty"` +} + +type SAMLv2SingleLogout struct { + Enableable + KeyId string `json:"keyId,omitempty"` + Url string `json:"url,omitempty"` + XmlSignatureC14nMethod CanonicalizationMethod `json:"xmlSignatureC14nMethod,omitempty"` } /** - * Search request for Themes. + * Allows the Relying Party to specify desired attributes of a new credential. * - * @author Mark Manes + * @author Spencer Witt */ -type ThemeSearchRequest struct { - Search ThemeSearchCriteria `json:"search,omitempty"` +type PublicKeyCredentialCreationOptions struct { + Attestation AttestationConveyancePreference `json:"attestation,omitempty"` + AuthenticatorSelection AuthenticatorSelectionCriteria `json:"authenticatorSelection,omitempty"` + Challenge string `json:"challenge,omitempty"` + ExcludeCredentials []PublicKeyCredentialDescriptor `json:"excludeCredentials,omitempty"` + Extensions WebAuthnRegistrationExtensionOptions `json:"extensions,omitempty"` + PubKeyCredParams []PublicKeyCredentialParameters `json:"pubKeyCredParams,omitempty"` + Rp PublicKeyCredentialRelyingPartyEntity `json:"rp,omitempty"` + Timeout int64 `json:"timeout,omitempty"` + User PublicKeyCredentialUserEntity `json:"user,omitempty"` } /** * @author Daniel DeGroff */ -type PasswordValidationRulesResponse struct { +type JWTVendResponse struct { BaseHTTPResponse - PasswordValidationRules PasswordValidationRules `json:"passwordValidationRules,omitempty"` + Token string `json:"token,omitempty"` } -func (b *PasswordValidationRulesResponse) SetStatus(status int) { +func (b *JWTVendResponse) SetStatus(status int) { b.StatusCode = status } /** - * API request to start a WebAuthn authentication ceremony + * Theme object for values used in the css variables for simple themes. * - * @author Spencer Witt + * @author Lyle Schemmerling */ -type WebAuthnStartRequest struct { - ApplicationId string `json:"applicationId,omitempty"` - CredentialId string `json:"credentialId,omitempty"` - LoginId string `json:"loginId,omitempty"` - State map[string]interface{} `json:"state,omitempty"` - UserId string `json:"userId,omitempty"` - Workflow WebAuthnWorkflow `json:"workflow,omitempty"` +type SimpleThemeVariables struct { + AlertBackgroundColor string `json:"alertBackgroundColor,omitempty"` + AlertFontColor string `json:"alertFontColor,omitempty"` + BackgroundImageURL string `json:"backgroundImageURL,omitempty"` + BackgroundSize string `json:"backgroundSize,omitempty"` + BorderRadius string `json:"borderRadius,omitempty"` + DeleteButtonColor string `json:"deleteButtonColor,omitempty"` + DeleteButtonFocusColor string `json:"deleteButtonFocusColor,omitempty"` + DeleteButtonTextColor string `json:"deleteButtonTextColor,omitempty"` + DeleteButtonTextFocusColor string `json:"deleteButtonTextFocusColor,omitempty"` + ErrorFontColor string `json:"errorFontColor,omitempty"` + ErrorIconColor string `json:"errorIconColor,omitempty"` + FontColor string `json:"fontColor,omitempty"` + FontFamily string `json:"fontFamily,omitempty"` + FooterDisplay bool `json:"footerDisplay"` + IconBackgroundColor string `json:"iconBackgroundColor,omitempty"` + IconColor string `json:"iconColor,omitempty"` + InfoIconColor string `json:"infoIconColor,omitempty"` + InputBackgroundColor string `json:"inputBackgroundColor,omitempty"` + InputIconColor string `json:"inputIconColor,omitempty"` + InputTextColor string `json:"inputTextColor,omitempty"` + LinkTextColor string `json:"linkTextColor,omitempty"` + LinkTextFocusColor string `json:"linkTextFocusColor,omitempty"` + LogoImageSize string `json:"logoImageSize,omitempty"` + LogoImageURL string `json:"logoImageURL,omitempty"` + MonoFontColor string `json:"monoFontColor,omitempty"` + MonoFontFamily string `json:"monoFontFamily,omitempty"` + PageBackgroundColor string `json:"pageBackgroundColor,omitempty"` + PanelBackgroundColor string `json:"panelBackgroundColor,omitempty"` + PrimaryButtonColor string `json:"primaryButtonColor,omitempty"` + PrimaryButtonFocusColor string `json:"primaryButtonFocusColor,omitempty"` + PrimaryButtonTextColor string `json:"primaryButtonTextColor,omitempty"` + PrimaryButtonTextFocusColor string `json:"primaryButtonTextFocusColor,omitempty"` } /** - * A raw login record response - * * @author Daniel DeGroff */ -type LoginRecordSearchResponse struct { - BaseHTTPResponse - Logins []DisplayableRawLogin `json:"logins,omitempty"` - Total int64 `json:"total,omitempty"` -} +type Sort string -func (b *LoginRecordSearchResponse) SetStatus(status int) { - b.StatusCode = status +func (e Sort) String() string { + return string(e) } +const ( + Sort_Asc Sort = "asc" + Sort_Desc Sort = "desc" +) + /** - * Response for the registration report. + * Event to indicate an audit log was created. * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type RegistrationReportResponse struct { - BaseHTTPResponse - HourlyCounts []Count `json:"hourlyCounts,omitempty"` - Total int64 `json:"total,omitempty"` +type AuditLogCreateEvent struct { + BaseEvent + AuditLog AuditLog `json:"auditLog,omitempty"` } -func (b *RegistrationReportResponse) SetStatus(status int) { - b.StatusCode = status +/** + * Describes the authenticator attachment modality preference for a WebAuthn workflow. See {@link AuthenticatorAttachment} + * + * @author Spencer Witt + */ +type AuthenticatorAttachmentPreference string + +func (e AuthenticatorAttachmentPreference) String() string { + return string(e) } +const ( + AuthenticatorAttachmentPreference_Any AuthenticatorAttachmentPreference = "any" + AuthenticatorAttachmentPreference_Platform AuthenticatorAttachmentPreference = "platform" + AuthenticatorAttachmentPreference_CrossPlatform AuthenticatorAttachmentPreference = "crossPlatform" +) + /** - * @author Brett Guy + * User API bulk response object. + * + * @author Trevor Smith */ -type IPAccessControlListSearchResponse struct { +type UserDeleteResponse struct { BaseHTTPResponse - IpAccessControlLists []IPAccessControlList `json:"ipAccessControlLists,omitempty"` - Total int64 `json:"total,omitempty"` + DryRun bool `json:"dryRun"` + HardDelete bool `json:"hardDelete"` + Total int `json:"total,omitempty"` + UserIds []string `json:"userIds,omitempty"` } -func (b *IPAccessControlListSearchResponse) SetStatus(status int) { +func (b *UserDeleteResponse) SetStatus(status int) { b.StatusCode = status } /** * @author Daniel DeGroff */ -type TwoFactorStatusResponse struct { +type TwoFactorStartResponse struct { BaseHTTPResponse - Trusts []TwoFactorTrust `json:"trusts,omitempty"` - TwoFactorTrustId string `json:"twoFactorTrustId,omitempty"` + Code string `json:"code,omitempty"` + Methods []TwoFactorMethod `json:"methods,omitempty"` + TwoFactorId string `json:"twoFactorId,omitempty"` } -func (b *TwoFactorStatusResponse) SetStatus(status int) { +func (b *TwoFactorStartResponse) SetStatus(status int) { b.StatusCode = status } /** - * Consent search response + * User Action Reason API response object. * - * @author Spencer Witt + * @author Brian Pontarelli */ -type ConsentSearchResponse struct { +type UserActionReasonResponse struct { BaseHTTPResponse - Consents []Consent `json:"consents,omitempty"` - Total int64 `json:"total,omitempty"` + UserActionReason UserActionReason `json:"userActionReason,omitempty"` + UserActionReasons []UserActionReason `json:"userActionReasons,omitempty"` } -func (b *ConsentSearchResponse) SetStatus(status int) { +func (b *UserActionReasonResponse) SetStatus(status int) { b.StatusCode = status } /** - * @author Daniel DeGroff + * Models the User Event (and can be converted to JSON) that is used for all user modifications (create, update, + * delete). + * + * @author Brian Pontarelli */ -type RefreshResponse struct { - BaseHTTPResponse -} - -func (b *RefreshResponse) SetStatus(status int) { - b.StatusCode = status +type UserDeleteEvent struct { + BaseUserEvent } /** - * Stores an message template used to distribute messages; + * An expandable API request. * - * @author Michael Sleevi + * @author Daniel DeGroff */ -type MessageTemplate struct { - Data map[string]interface{} `json:"data,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - Name string `json:"name,omitempty"` - Type MessageType `json:"type,omitempty"` +type ExpandableRequest struct { + Expand []string `json:"expand,omitempty"` } /** - * Models the JWT public key Refresh Token Revoke Event. This event might be for a single - * token, a user or an entire application. + * API response for User consent. * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type JWTPublicKeyUpdateEvent struct { - BaseEvent - ApplicationIds []string `json:"applicationIds,omitempty"` +type UserConsentRequest struct { + UserConsent UserConsent `json:"userConsent,omitempty"` } /** - * @author Daniel DeGroff + * @author Rob Davis */ -type DeviceUserCodeResponse struct { - BaseHTTPResponse - ClientId string `json:"client_id,omitempty"` - DeviceInfo DeviceInfo `json:"deviceInfo,omitempty"` - ExpiresIn int `json:"expires_in,omitempty"` - PendingIdPLink PendingIdPLink `json:"pendingIdPLink,omitempty"` - Scope string `json:"scope,omitempty"` - TenantId string `json:"tenantId,omitempty"` - UserCode string `json:"user_code,omitempty"` -} - -func (b *DeviceUserCodeResponse) SetStatus(status int) { - b.StatusCode = status +type TenantSCIMServerConfiguration struct { + Enableable + ClientEntityTypeId string `json:"clientEntityTypeId,omitempty"` + Schemas map[string]interface{} `json:"schemas,omitempty"` + ServerEntityTypeId string `json:"serverEntityTypeId,omitempty"` } /** - * Models an entity type that has a specific set of permissions. These are global objects and can be used across tenants. + * Theme API request object. * - * @author Brian Pontarelli + * @author Trevor Smith */ -type EntityType struct { - Data map[string]interface{} `json:"data,omitempty"` - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - JwtConfiguration EntityJWTConfiguration `json:"jwtConfiguration,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - Name string `json:"name,omitempty"` - Permissions []EntityTypePermission `json:"permissions,omitempty"` +type ThemeRequest struct { + SourceThemeId string `json:"sourceThemeId,omitempty"` + Theme Theme `json:"theme,omitempty"` } /** * @author Daniel DeGroff */ -type IdentityProviderType string - -func (e IdentityProviderType) String() string { - return string(e) -} - -const ( - IdentityProviderType_Apple IdentityProviderType = "Apple" - IdentityProviderType_EpicGames IdentityProviderType = "EpicGames" - IdentityProviderType_ExternalJWT IdentityProviderType = "ExternalJWT" - IdentityProviderType_Facebook IdentityProviderType = "Facebook" - IdentityProviderType_Google IdentityProviderType = "Google" - IdentityProviderType_HYPR IdentityProviderType = "HYPR" - IdentityProviderType_LinkedIn IdentityProviderType = "LinkedIn" - IdentityProviderType_Nintendo IdentityProviderType = "Nintendo" - IdentityProviderType_OpenIDConnect IdentityProviderType = "OpenIDConnect" - IdentityProviderType_SAMLv2 IdentityProviderType = "SAMLv2" - IdentityProviderType_SAMLv2IdPInitiated IdentityProviderType = "SAMLv2IdPInitiated" - IdentityProviderType_SonyPSN IdentityProviderType = "SonyPSN" - IdentityProviderType_Steam IdentityProviderType = "Steam" - IdentityProviderType_Twitch IdentityProviderType = "Twitch" - IdentityProviderType_Twitter IdentityProviderType = "Twitter" - IdentityProviderType_Xbox IdentityProviderType = "Xbox" -) - -/** - * @author Seth Musselman - */ -type PreviewResponse struct { +type OAuthConfigurationResponse struct { BaseHTTPResponse - Email Email `json:"email,omitempty"` - Errors Errors `json:"errors,omitempty"` + HttpSessionMaxInactiveInterval int `json:"httpSessionMaxInactiveInterval,omitempty"` + LogoutURL string `json:"logoutURL,omitempty"` + OauthConfiguration OAuth2Configuration `json:"oauthConfiguration,omitempty"` } -func (b *PreviewResponse) SetStatus(status int) { +func (b *OAuthConfigurationResponse) SetStatus(status int) { b.StatusCode = status } /** - * Event to indicate kickstart has been successfully completed. - * * @author Daniel DeGroff */ -type KickstartSuccessEvent struct { - BaseEvent - InstanceId string `json:"instanceId,omitempty"` +type ExternalIdentifierConfiguration struct { + AuthorizationGrantIdTimeToLiveInSeconds int `json:"authorizationGrantIdTimeToLiveInSeconds,omitempty"` + ChangePasswordIdGenerator SecureGeneratorConfiguration `json:"changePasswordIdGenerator,omitempty"` + ChangePasswordIdTimeToLiveInSeconds int `json:"changePasswordIdTimeToLiveInSeconds,omitempty"` + DeviceCodeTimeToLiveInSeconds int `json:"deviceCodeTimeToLiveInSeconds,omitempty"` + DeviceUserCodeIdGenerator SecureGeneratorConfiguration `json:"deviceUserCodeIdGenerator,omitempty"` + EmailVerificationIdGenerator SecureGeneratorConfiguration `json:"emailVerificationIdGenerator,omitempty"` + EmailVerificationIdTimeToLiveInSeconds int `json:"emailVerificationIdTimeToLiveInSeconds,omitempty"` + EmailVerificationOneTimeCodeGenerator SecureGeneratorConfiguration `json:"emailVerificationOneTimeCodeGenerator,omitempty"` + ExternalAuthenticationIdTimeToLiveInSeconds int `json:"externalAuthenticationIdTimeToLiveInSeconds,omitempty"` + LoginIntentTimeToLiveInSeconds int `json:"loginIntentTimeToLiveInSeconds,omitempty"` + OneTimePasswordTimeToLiveInSeconds int `json:"oneTimePasswordTimeToLiveInSeconds,omitempty"` + PasswordlessLoginGenerator SecureGeneratorConfiguration `json:"passwordlessLoginGenerator,omitempty"` + PasswordlessLoginTimeToLiveInSeconds int `json:"passwordlessLoginTimeToLiveInSeconds,omitempty"` + PendingAccountLinkTimeToLiveInSeconds int `json:"pendingAccountLinkTimeToLiveInSeconds,omitempty"` + RegistrationVerificationIdGenerator SecureGeneratorConfiguration `json:"registrationVerificationIdGenerator,omitempty"` + RegistrationVerificationIdTimeToLiveInSeconds int `json:"registrationVerificationIdTimeToLiveInSeconds,omitempty"` + RegistrationVerificationOneTimeCodeGenerator SecureGeneratorConfiguration `json:"registrationVerificationOneTimeCodeGenerator,omitempty"` + RememberOAuthScopeConsentChoiceTimeToLiveInSeconds int `json:"rememberOAuthScopeConsentChoiceTimeToLiveInSeconds,omitempty"` + Samlv2AuthNRequestIdTimeToLiveInSeconds int `json:"samlv2AuthNRequestIdTimeToLiveInSeconds,omitempty"` + SetupPasswordIdGenerator SecureGeneratorConfiguration `json:"setupPasswordIdGenerator,omitempty"` + SetupPasswordIdTimeToLiveInSeconds int `json:"setupPasswordIdTimeToLiveInSeconds,omitempty"` + TrustTokenTimeToLiveInSeconds int `json:"trustTokenTimeToLiveInSeconds,omitempty"` + TwoFactorIdTimeToLiveInSeconds int `json:"twoFactorIdTimeToLiveInSeconds,omitempty"` + TwoFactorOneTimeCodeIdGenerator SecureGeneratorConfiguration `json:"twoFactorOneTimeCodeIdGenerator,omitempty"` + TwoFactorOneTimeCodeIdTimeToLiveInSeconds int `json:"twoFactorOneTimeCodeIdTimeToLiveInSeconds,omitempty"` + TwoFactorTrustIdTimeToLiveInSeconds int `json:"twoFactorTrustIdTimeToLiveInSeconds,omitempty"` + WebAuthnAuthenticationChallengeTimeToLiveInSeconds int `json:"webAuthnAuthenticationChallengeTimeToLiveInSeconds,omitempty"` + WebAuthnRegistrationChallengeTimeToLiveInSeconds int `json:"webAuthnRegistrationChallengeTimeToLiveInSeconds,omitempty"` } /** - * @author Daniel DeGroff + * Defines valid credential types. This is an extension point in the WebAuthn spec. The only defined value at this time is "public-key" + * + * @author Spencer Witt */ -type SystemTrustedProxyConfigurationPolicy string +type PublicKeyCredentialType string -func (e SystemTrustedProxyConfigurationPolicy) String() string { +func (e PublicKeyCredentialType) String() string { return string(e) } const ( - SystemTrustedProxyConfigurationPolicy_All SystemTrustedProxyConfigurationPolicy = "All" - SystemTrustedProxyConfigurationPolicy_OnlyConfigured SystemTrustedProxyConfigurationPolicy = "OnlyConfigured" + PublicKeyCredentialType_PublicKey PublicKeyCredentialType = "publicKey" ) /** - * @author Daniel DeGroff - */ -type TenantUsernameConfiguration struct { - Unique UniqueUsernameConfiguration `json:"unique,omitempty"` -} - -/** - * Interface for all identity providers that are passwordless and do not accept a password. + * This class is the entity query. It provides a build pattern as well as public fields for use on forms and in actions. + * + * @author Brian Pontarelli */ -type PasswordlessIdentityProvider struct { +type EntitySearchCriteria struct { + BaseElasticSearchCriteria } /** - * @author Daniel DeGroff + * @author Seth Musselman */ -type PasswordBreachDetection struct { - Enableable - MatchMode BreachMatchMode `json:"matchMode,omitempty"` - NotifyUserEmailTemplateId string `json:"notifyUserEmailTemplateId,omitempty"` - OnLogin BreachAction `json:"onLogin,omitempty"` +type PreviewResponse struct { + BaseHTTPResponse + Email Email `json:"email,omitempty"` + Errors Errors `json:"errors,omitempty"` } -/** - * Base class for all FusionAuth events. - * - * @author Brian Pontarelli - */ -type BaseEvent struct { - CreateInstant int64 `json:"createInstant,omitempty"` - Id string `json:"id,omitempty"` - Info EventInfo `json:"info,omitempty"` - TenantId string `json:"tenantId,omitempty"` - Type EventType `json:"type,omitempty"` +func (b *PreviewResponse) SetStatus(status int) { + b.StatusCode = status } /** - * @author Daniel DeGroff + * @author Brett Pontarelli */ -type EmailHeader struct { - Name string `json:"name,omitempty"` - Value string `json:"value,omitempty"` +type EpicGamesApplicationConfiguration struct { + BaseIdentityProviderApplicationConfiguration + ButtonText string `json:"buttonText,omitempty"` + ClientId string `json:"client_id,omitempty"` + ClientSecret string `json:"client_secret,omitempty"` + Scope string `json:"scope,omitempty"` } /** - * The FormField API request object. + * OpenID Connect Configuration as described by the OpenID + * Provider Metadata. * - * @author Brett Guy + * @author Daniel DeGroff */ -type FormFieldRequest struct { - Field FormField `json:"field,omitempty"` - Fields []FormField `json:"fields,omitempty"` +type OpenIdConfiguration struct { + BaseHTTPResponse + AuthorizationEndpoint string `json:"authorization_endpoint,omitempty"` + BackchannelLogoutSupported bool `json:"backchannel_logout_supported"` + ClaimsSupported []string `json:"claims_supported,omitempty"` + DeviceAuthorizationEndpoint string `json:"device_authorization_endpoint,omitempty"` + EndSessionEndpoint string `json:"end_session_endpoint,omitempty"` + FrontchannelLogoutSupported bool `json:"frontchannel_logout_supported"` + GrantTypesSupported []string `json:"grant_types_supported,omitempty"` + IdTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported,omitempty"` + Issuer string `json:"issuer,omitempty"` + JwksUri string `json:"jwks_uri,omitempty"` + ResponseModesSupported []string `json:"response_modes_supported,omitempty"` + ResponseTypesSupported []string `json:"response_types_supported,omitempty"` + ScopesSupported []string `json:"scopes_supported,omitempty"` + SubjectTypesSupported []string `json:"subject_types_supported,omitempty"` + TokenEndpoint string `json:"token_endpoint,omitempty"` + TokenEndpointAuthMethodsSupported []string `json:"token_endpoint_auth_methods_supported,omitempty"` + UserinfoEndpoint string `json:"userinfo_endpoint,omitempty"` + UserinfoSigningAlgValuesSupported []string `json:"userinfo_signing_alg_values_supported,omitempty"` } -/** - * @author Daniel DeGroff - */ -type TwoFactorMethod struct { - Authenticator AuthenticatorConfiguration `json:"authenticator,omitempty"` - Email string `json:"email,omitempty"` - Id string `json:"id,omitempty"` - LastUsed bool `json:"lastUsed"` - Method string `json:"method,omitempty"` - MobilePhone string `json:"mobilePhone,omitempty"` - Secret string `json:"secret,omitempty"` +func (b *OpenIdConfiguration) SetStatus(status int) { + b.StatusCode = status } /** - * Models the event types that FusionAuth produces. + * COSE Elliptic Curve identifier to determine which elliptic curve to use with a given key * - * @author Brian Pontarelli + * @author Spencer Witt */ -type EventType string +type CoseEllipticCurve string -func (e EventType) String() string { +func (e CoseEllipticCurve) String() string { return string(e) } const ( - EventType_JWTPublicKeyUpdate EventType = "jwt.public-key.update" - EventType_JWTRefreshTokenRevoke EventType = "jwt.refresh-token.revoke" - EventType_JWTRefresh EventType = "jwt.refresh" - EventType_AuditLogCreate EventType = "audit-log.create" - EventType_EventLogCreate EventType = "event-log.create" - EventType_KickstartSuccess EventType = "kickstart.success" - EventType_GroupCreate EventType = "group.create" - EventType_GroupCreateComplete EventType = "group.create.complete" - EventType_GroupDelete EventType = "group.delete" - EventType_GroupDeleteComplete EventType = "group.delete.complete" - EventType_GroupMemberAdd EventType = "group.member.add" - EventType_GroupMemberAddComplete EventType = "group.member.add.complete" - EventType_GroupMemberRemove EventType = "group.member.remove" - EventType_GroupMemberRemoveComplete EventType = "group.member.remove.complete" - EventType_GroupMemberUpdate EventType = "group.member.update" - EventType_GroupMemberUpdateComplete EventType = "group.member.update.complete" - EventType_GroupUpdate EventType = "group.update" - EventType_GroupUpdateComplete EventType = "group.update.complete" - EventType_UserAction EventType = "user.action" - EventType_UserBulkCreate EventType = "user.bulk.create" - EventType_UserCreate EventType = "user.create" - EventType_UserCreateComplete EventType = "user.create.complete" - EventType_UserDeactivate EventType = "user.deactivate" - EventType_UserDelete EventType = "user.delete" - EventType_UserDeleteComplete EventType = "user.delete.complete" - EventType_UserEmailUpdate EventType = "user.email.update" - EventType_UserEmailVerified EventType = "user.email.verified" - EventType_UserIdentityProviderLink EventType = "user.identity-provider.link" - EventType_UserIdentityProviderUnlink EventType = "user.identity-provider.unlink" - EventType_UserLoginIdDuplicateOnCreate EventType = "user.loginId.duplicate.create" - EventType_UserLoginIdDuplicateOnUpdate EventType = "user.loginId.duplicate.update" - EventType_UserLoginFailed EventType = "user.login.failed" - EventType_UserLoginNewDevice EventType = "user.login.new-device" - EventType_UserLoginSuccess EventType = "user.login.success" - EventType_UserLoginSuspicious EventType = "user.login.suspicious" - EventType_UserPasswordBreach EventType = "user.password.breach" - EventType_UserPasswordResetSend EventType = "user.password.reset.send" - EventType_UserPasswordResetStart EventType = "user.password.reset.start" - EventType_UserPasswordResetSuccess EventType = "user.password.reset.success" - EventType_UserPasswordUpdate EventType = "user.password.update" - EventType_UserReactivate EventType = "user.reactivate" - EventType_UserRegistrationCreate EventType = "user.registration.create" - EventType_UserRegistrationCreateComplete EventType = "user.registration.create.complete" - EventType_UserRegistrationDelete EventType = "user.registration.delete" - EventType_UserRegistrationDeleteComplete EventType = "user.registration.delete.complete" - EventType_UserRegistrationUpdate EventType = "user.registration.update" - EventType_UserRegistrationUpdateComplete EventType = "user.registration.update.complete" - EventType_UserRegistrationVerified EventType = "user.registration.verified" - EventType_UserTwoFactorMethodAdd EventType = "user.two-factor.method.add" - EventType_UserTwoFactorMethodRemove EventType = "user.two-factor.method.remove" - EventType_UserUpdate EventType = "user.update" - EventType_UserUpdateComplete EventType = "user.update.complete" - EventType_Test EventType = "test" + CoseEllipticCurve_Reserved CoseEllipticCurve = "Reserved" + CoseEllipticCurve_P256 CoseEllipticCurve = "P256" + CoseEllipticCurve_P384 CoseEllipticCurve = "P384" + CoseEllipticCurve_P521 CoseEllipticCurve = "P521" + CoseEllipticCurve_X25519 CoseEllipticCurve = "X25519" + CoseEllipticCurve_X448 CoseEllipticCurve = "X448" + CoseEllipticCurve_Ed25519 CoseEllipticCurve = "Ed25519" + CoseEllipticCurve_Ed448 CoseEllipticCurve = "Ed448" + CoseEllipticCurve_Secp256k1 CoseEllipticCurve = "Secp256k1" ) /** - * Tenant search response + * Form response. * - * @author Mark Manes + * @author Daniel DeGroff */ -type TenantSearchResponse struct { +type FormResponse struct { BaseHTTPResponse - Tenants []Tenant `json:"tenants,omitempty"` - Total int64 `json:"total,omitempty"` + Form Form `json:"form,omitempty"` + Forms []Form `json:"forms,omitempty"` } -func (b *TenantSearchResponse) SetStatus(status int) { +func (b *FormResponse) SetStatus(status int) { b.StatusCode = status } -/** - * Search API request. - * - * @author Brian Pontarelli - */ -type SearchRequest struct { - ExpandableRequest - Search UserSearchCriteria `json:"search,omitempty"` +// Do not require a setter for 'type', it is defined by the concrete class and is not mutable +type BaseIdentityProvider struct { + Enableable + ApplicationConfiguration map[string]interface{} `json:"applicationConfiguration,omitempty"` + Data map[string]interface{} `json:"data,omitempty"` + Debug bool `json:"debug"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LambdaConfiguration ProviderLambdaConfiguration `json:"lambdaConfiguration,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + LinkingStrategy IdentityProviderLinkingStrategy `json:"linkingStrategy,omitempty"` + Name string `json:"name,omitempty"` + TenantConfiguration map[string]IdentityProviderTenantConfiguration `json:"tenantConfiguration,omitempty"` + Type IdentityProviderType `json:"type,omitempty"` +} + +type ProviderLambdaConfiguration struct { + ReconcileId string `json:"reconcileId,omitempty"` } /** - * Lambda search response - * - * @author Mark Manes + * @author Daniel DeGroff */ -type LambdaSearchResponse struct { +type ValidateResponse struct { BaseHTTPResponse - Lambdas []Lambda `json:"lambdas,omitempty"` - Total int64 `json:"total,omitempty"` + Jwt JWT `json:"jwt,omitempty"` } -func (b *LambdaSearchResponse) SetStatus(status int) { +func (b *ValidateResponse) SetStatus(status int) { b.StatusCode = status } -type Templates struct { - AccountEdit string `json:"accountEdit,omitempty"` - AccountIndex string `json:"accountIndex,omitempty"` - AccountTwoFactorDisable string `json:"accountTwoFactorDisable,omitempty"` - AccountTwoFactorEnable string `json:"accountTwoFactorEnable,omitempty"` - AccountTwoFactorIndex string `json:"accountTwoFactorIndex,omitempty"` - AccountWebAuthnAdd string `json:"accountWebAuthnAdd,omitempty"` - AccountWebAuthnDelete string `json:"accountWebAuthnDelete,omitempty"` - AccountWebAuthnIndex string `json:"accountWebAuthnIndex,omitempty"` - ConfirmationRequired string `json:"confirmationRequired,omitempty"` - EmailComplete string `json:"emailComplete,omitempty"` - EmailSend string `json:"emailSend,omitempty"` - EmailSent string `json:"emailSent,omitempty"` - EmailVerificationRequired string `json:"emailVerificationRequired,omitempty"` - EmailVerify string `json:"emailVerify,omitempty"` - Helpers string `json:"helpers,omitempty"` - Index string `json:"index,omitempty"` - Oauth2Authorize string `json:"oauth2Authorize,omitempty"` - Oauth2AuthorizedNotRegistered string `json:"oauth2AuthorizedNotRegistered,omitempty"` - Oauth2ChildRegistrationNotAllowed string `json:"oauth2ChildRegistrationNotAllowed,omitempty"` - Oauth2ChildRegistrationNotAllowedComplete string `json:"oauth2ChildRegistrationNotAllowedComplete,omitempty"` - Oauth2CompleteRegistration string `json:"oauth2CompleteRegistration,omitempty"` - Oauth2Consent string `json:"oauth2Consent,omitempty"` - Oauth2Device string `json:"oauth2Device,omitempty"` - Oauth2DeviceComplete string `json:"oauth2DeviceComplete,omitempty"` - Oauth2Error string `json:"oauth2Error,omitempty"` - Oauth2Logout string `json:"oauth2Logout,omitempty"` - Oauth2Passwordless string `json:"oauth2Passwordless,omitempty"` - Oauth2Register string `json:"oauth2Register,omitempty"` - Oauth2StartIdPLink string `json:"oauth2StartIdPLink,omitempty"` - Oauth2TwoFactor string `json:"oauth2TwoFactor,omitempty"` - Oauth2TwoFactorEnable string `json:"oauth2TwoFactorEnable,omitempty"` - Oauth2TwoFactorEnableComplete string `json:"oauth2TwoFactorEnableComplete,omitempty"` - Oauth2TwoFactorMethods string `json:"oauth2TwoFactorMethods,omitempty"` - Oauth2Wait string `json:"oauth2Wait,omitempty"` - Oauth2WebAuthn string `json:"oauth2WebAuthn,omitempty"` - Oauth2WebAuthnReauth string `json:"oauth2WebAuthnReauth,omitempty"` - Oauth2WebAuthnReauthEnable string `json:"oauth2WebAuthnReauthEnable,omitempty"` - PasswordChange string `json:"passwordChange,omitempty"` - PasswordComplete string `json:"passwordComplete,omitempty"` - PasswordForgot string `json:"passwordForgot,omitempty"` - PasswordSent string `json:"passwordSent,omitempty"` - RegistrationComplete string `json:"registrationComplete,omitempty"` - RegistrationSend string `json:"registrationSend,omitempty"` - RegistrationSent string `json:"registrationSent,omitempty"` - RegistrationVerificationRequired string `json:"registrationVerificationRequired,omitempty"` - RegistrationVerify string `json:"registrationVerify,omitempty"` - Samlv2Logout string `json:"samlv2Logout,omitempty"` - Unauthorized string `json:"unauthorized,omitempty"` +/** + * @author Daniel DeGroff + */ +type VerifyRegistrationResponse struct { + BaseHTTPResponse + OneTimeCode string `json:"oneTimeCode,omitempty"` + VerificationId string `json:"verificationId,omitempty"` +} + +func (b *VerifyRegistrationResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Search request for Lambdas - * - * @author Mark Manes + * @author Daniel DeGroff */ -type LambdaSearchRequest struct { - Search LambdaSearchCriteria `json:"search,omitempty"` +type LoginRecordSearchCriteria struct { + BaseSearchCriteria + ApplicationId string `json:"applicationId,omitempty"` + End int64 `json:"end,omitempty"` + Start int64 `json:"start,omitempty"` + UserId string `json:"userId,omitempty"` } /** - * Models the User Password Reset Send Event. - * * @author Daniel DeGroff */ -type UserPasswordResetSendEvent struct { - BaseUserEvent +type OAuthResponse struct { + BaseHTTPResponse +} + +func (b *OAuthResponse) SetStatus(status int) { + b.StatusCode = status } /** - * The Integration Request + * Domain for a public key, key pair or an HMAC secret. This is used by KeyMaster to manage keys for JWTs, SAML, etc. * - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type IntegrationRequest struct { - Integrations Integrations `json:"integrations,omitempty"` +type Key struct { + Algorithm KeyAlgorithm `json:"algorithm,omitempty"` + Certificate string `json:"certificate,omitempty"` + CertificateInformation CertificateInformation `json:"certificateInformation,omitempty"` + ExpirationInstant int64 `json:"expirationInstant,omitempty"` + HasPrivateKey bool `json:"hasPrivateKey"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + Issuer string `json:"issuer,omitempty"` + Kid string `json:"kid,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + Length int `json:"length,omitempty"` + Name string `json:"name,omitempty"` + PrivateKey string `json:"privateKey,omitempty"` + PublicKey string `json:"publicKey,omitempty"` + Secret string `json:"secret,omitempty"` + Type KeyType `json:"type,omitempty"` } -type TOTPAlgorithm string +type KeyAlgorithm string -func (e TOTPAlgorithm) String() string { +func (e KeyAlgorithm) String() string { return string(e) } -const ( - TOTPAlgorithm_HmacSHA1 TOTPAlgorithm = "HmacSHA1" - TOTPAlgorithm_HmacSHA256 TOTPAlgorithm = "HmacSHA256" - TOTPAlgorithm_HmacSHA512 TOTPAlgorithm = "HmacSHA512" +const ( + KeyAlgorithm_ES256 KeyAlgorithm = "ES256" + KeyAlgorithm_ES384 KeyAlgorithm = "ES384" + KeyAlgorithm_ES512 KeyAlgorithm = "ES512" + KeyAlgorithm_HS256 KeyAlgorithm = "HS256" + KeyAlgorithm_HS384 KeyAlgorithm = "HS384" + KeyAlgorithm_HS512 KeyAlgorithm = "HS512" + KeyAlgorithm_RS256 KeyAlgorithm = "RS256" + KeyAlgorithm_RS384 KeyAlgorithm = "RS384" + KeyAlgorithm_RS512 KeyAlgorithm = "RS512" ) -type LDAPSecurityMethod string +type KeyType string -func (e LDAPSecurityMethod) String() string { +func (e KeyType) String() string { return string(e) } const ( - LDAPSecurityMethod_None LDAPSecurityMethod = "None" - LDAPSecurityMethod_LDAPS LDAPSecurityMethod = "LDAPS" - LDAPSecurityMethod_StartTLS LDAPSecurityMethod = "StartTLS" + KeyType_EC KeyType = "EC" + KeyType_RSA KeyType = "RSA" + KeyType_HMAC KeyType = "HMAC" ) -/** - * User API delete request object. - * - * @author Daniel DeGroff - */ -type UserDeleteRequest struct { - BaseEventRequest - DryRun bool `json:"dryRun"` - HardDelete bool `json:"hardDelete"` - Limit int `json:"limit,omitempty"` - Query string `json:"query,omitempty"` - QueryString string `json:"queryString,omitempty"` - UserIds []string `json:"userIds,omitempty"` +type CertificateInformation struct { + Issuer string `json:"issuer,omitempty"` + Md5Fingerprint string `json:"md5Fingerprint,omitempty"` + SerialNumber string `json:"serialNumber,omitempty"` + Sha1Fingerprint string `json:"sha1Fingerprint,omitempty"` + Sha1Thumbprint string `json:"sha1Thumbprint,omitempty"` + Sha256Fingerprint string `json:"sha256Fingerprint,omitempty"` + Sha256Thumbprint string `json:"sha256Thumbprint,omitempty"` + Subject string `json:"subject,omitempty"` + ValidFrom int64 `json:"validFrom,omitempty"` + ValidTo int64 `json:"validTo,omitempty"` } /** - * @author Daniel DeGroff + * Controls the policy for requesting user permission to grant access to requested scopes during an OAuth workflow + * for a third-party application. + * + * @author Spencer Witt */ -type IdentityProviderStartLoginRequest struct { - BaseLoginRequest - Data map[string]string `json:"data,omitempty"` - IdentityProviderId string `json:"identityProviderId,omitempty"` - LoginId string `json:"loginId,omitempty"` - State map[string]interface{} `json:"state,omitempty"` -} - -type UniqueUsernameStrategy string +type OAuthScopeConsentMode string -func (e UniqueUsernameStrategy) String() string { +func (e OAuthScopeConsentMode) String() string { return string(e) } const ( - UniqueUsernameStrategy_Always UniqueUsernameStrategy = "Always" - UniqueUsernameStrategy_OnCollision UniqueUsernameStrategy = "OnCollision" + OAuthScopeConsentMode_AlwaysPrompt OAuthScopeConsentMode = "AlwaysPrompt" + OAuthScopeConsentMode_RememberDecision OAuthScopeConsentMode = "RememberDecision" + OAuthScopeConsentMode_NeverPrompt OAuthScopeConsentMode = "NeverPrompt" ) /** - * @author Daniel DeGroff + * Search criteria for entity grants. + * + * @author Brian Pontarelli */ -type ExternalJWTApplicationConfiguration struct { - BaseIdentityProviderApplicationConfiguration +type EntityGrantSearchCriteria struct { + BaseSearchCriteria + EntityId string `json:"entityId,omitempty"` + Name string `json:"name,omitempty"` + UserId string `json:"userId,omitempty"` } /** - * @author Brian Pontarelli + * @author Trevor Smith */ -type LoginResponse struct { +type ConnectorResponse struct { BaseHTTPResponse - Actions []LoginPreventedResponse `json:"actions,omitempty"` - ChangePasswordId string `json:"changePasswordId,omitempty"` - ChangePasswordReason ChangePasswordReason `json:"changePasswordReason,omitempty"` - ConfigurableMethods []string `json:"configurableMethods,omitempty"` - EmailVerificationId string `json:"emailVerificationId,omitempty"` - Methods []TwoFactorMethod `json:"methods,omitempty"` - PendingIdPLinkId string `json:"pendingIdPLinkId,omitempty"` - RefreshToken string `json:"refreshToken,omitempty"` - RefreshTokenId string `json:"refreshTokenId,omitempty"` - RegistrationVerificationId string `json:"registrationVerificationId,omitempty"` - State map[string]interface{} `json:"state,omitempty"` - ThreatsDetected []AuthenticationThreats `json:"threatsDetected,omitempty"` - Token string `json:"token,omitempty"` - TokenExpirationInstant int64 `json:"tokenExpirationInstant,omitempty"` - TrustToken string `json:"trustToken,omitempty"` - TwoFactorId string `json:"twoFactorId,omitempty"` - TwoFactorTrustId string `json:"twoFactorTrustId,omitempty"` - User User `json:"user,omitempty"` + Connector BaseConnectorConfiguration `json:"connector,omitempty"` + Connectors []BaseConnectorConfiguration `json:"connectors,omitempty"` } -func (b *LoginResponse) SetStatus(status int) { +func (b *ConnectorResponse) SetStatus(status int) { b.StatusCode = status } /** - * The Application Scope API response. + * Models the FusionAuth connector. * - * @author Spencer Witt + * @author Trevor Smith */ -type ApplicationOAuthScopeResponse struct { - BaseHTTPResponse - Scope ApplicationOAuthScope `json:"scope,omitempty"` +type FusionAuthConnectorConfiguration struct { + BaseConnectorConfiguration } -func (b *ApplicationOAuthScopeResponse) SetStatus(status int) { - b.StatusCode = status +/** + * @author Daniel DeGroff + */ +type RefreshTokenSlidingWindowConfiguration struct { + MaximumTimeToLiveInMinutes int `json:"maximumTimeToLiveInMinutes,omitempty"` } /** - * Search API response. + * Search request for Themes. * - * @author Brian Pontarelli + * @author Mark Manes */ -type SearchResponse struct { - BaseHTTPResponse - ExpandableResponse - NextResults string `json:"nextResults,omitempty"` - Total int64 `json:"total,omitempty"` - Users []User `json:"users,omitempty"` +type ThemeSearchRequest struct { + Search ThemeSearchCriteria `json:"search,omitempty"` } -func (b *SearchResponse) SetStatus(status int) { - b.StatusCode = status +/** + * Search request for Consents + * + * @author Spencer Witt + */ +type ConsentSearchRequest struct { + Search ConsentSearchCriteria `json:"search,omitempty"` } /** * @author Daniel DeGroff */ -type SendResponse struct { - BaseHTTPResponse - AnonymousResults map[string]EmailTemplateErrors `json:"anonymousResults,omitempty"` - Results map[string]EmailTemplateErrors `json:"results,omitempty"` -} +type ObjectState string -func (b *SendResponse) SetStatus(status int) { - b.StatusCode = status +func (e ObjectState) String() string { + return string(e) } +const ( + ObjectState_Active ObjectState = "Active" + ObjectState_Inactive ObjectState = "Inactive" + ObjectState_PendingDelete ObjectState = "PendingDelete" +) + /** - * @author Daniel DeGroff + * Search request for Identity Providers + * + * @author Spencer Witt */ -type SystemLogsExportRequest struct { - BaseExportRequest - IncludeArchived bool `json:"includeArchived"` - LastNBytes int `json:"lastNBytes,omitempty"` +type IdentityProviderSearchRequest struct { + Search IdentityProviderSearchCriteria `json:"search,omitempty"` } /** * @author Daniel DeGroff */ -type ReactorMetricsResponse struct { - BaseHTTPResponse - Metrics ReactorMetrics `json:"metrics,omitempty"` -} - -func (b *ReactorMetricsResponse) SetStatus(status int) { - b.StatusCode = status +type RefreshTokenRevocationPolicy struct { + OnLoginPrevented bool `json:"onLoginPrevented"` + OnMultiFactorEnable bool `json:"onMultiFactorEnable"` + OnPasswordChanged bool `json:"onPasswordChanged"` } /** - * Location information. Useful for IP addresses and other displayable data objects. + * Models a family grouping of users. * * @author Brian Pontarelli */ -type Location struct { - City string `json:"city,omitempty"` - Country string `json:"country,omitempty"` - DisplayString string `json:"displayString,omitempty"` - Latitude float64 `json:"latitude,omitempty"` - Longitude float64 `json:"longitude,omitempty"` - Region string `json:"region,omitempty"` - Zipcode string `json:"zipcode,omitempty"` -} - -/** - * @author Brett Guy - */ -type TenantAccessControlConfiguration struct { - UiIPAccessControlListId string `json:"uiIPAccessControlListId,omitempty"` +type Family struct { + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + Members []FamilyMember `json:"members,omitempty"` } /** - * @author Daniel DeGroff + * The Application Scope API response. + * + * @author Spencer Witt */ -type TenantResponse struct { +type ApplicationOAuthScopeResponse struct { BaseHTTPResponse - Tenant Tenant `json:"tenant,omitempty"` - Tenants []Tenant `json:"tenants,omitempty"` + Scope ApplicationOAuthScope `json:"scope,omitempty"` } -func (b *TenantResponse) SetStatus(status int) { +func (b *ApplicationOAuthScopeResponse) SetStatus(status int) { b.StatusCode = status } /** - * @author Brett Guy - */ -type TwilioMessengerConfiguration struct { - BaseMessengerConfiguration - AccountSID string `json:"accountSID,omitempty"` - AuthToken string `json:"authToken,omitempty"` - FromPhoneNumber string `json:"fromPhoneNumber,omitempty"` - MessagingServiceSid string `json:"messagingServiceSid,omitempty"` - Url string `json:"url,omitempty"` -} - -/** - * @author Daniel DeGroff - */ -type VerificationStrategy string - -func (e VerificationStrategy) String() string { - return string(e) -} - -const ( - VerificationStrategy_ClickableLink VerificationStrategy = "ClickableLink" - VerificationStrategy_FormField VerificationStrategy = "FormField" -) - -/** - * Model a user event when a two-factor method has been removed. - * * @author Daniel DeGroff */ -type UserTwoFactorMethodAddEvent struct { - BaseUserEvent - Method TwoFactorMethod `json:"method,omitempty"` +type OAuth2Configuration struct { + AuthorizedOriginURLs []string `json:"authorizedOriginURLs,omitempty"` + AuthorizedRedirectURLs []string `json:"authorizedRedirectURLs,omitempty"` + AuthorizedURLValidationPolicy Oauth2AuthorizedURLValidationPolicy `json:"authorizedURLValidationPolicy,omitempty"` + ClientAuthenticationPolicy ClientAuthenticationPolicy `json:"clientAuthenticationPolicy,omitempty"` + ClientId string `json:"clientId,omitempty"` + ClientSecret string `json:"clientSecret,omitempty"` + ConsentMode OAuthScopeConsentMode `json:"consentMode,omitempty"` + Debug bool `json:"debug"` + DeviceVerificationURL string `json:"deviceVerificationURL,omitempty"` + EnabledGrants []GrantType `json:"enabledGrants,omitempty"` + GenerateRefreshTokens bool `json:"generateRefreshTokens"` + LogoutBehavior LogoutBehavior `json:"logoutBehavior,omitempty"` + LogoutURL string `json:"logoutURL,omitempty"` + ProofKeyForCodeExchangePolicy ProofKeyForCodeExchangePolicy `json:"proofKeyForCodeExchangePolicy,omitempty"` + ProvidedScopePolicy ProvidedScopePolicy `json:"providedScopePolicy,omitempty"` + Relationship OAuthApplicationRelationship `json:"relationship,omitempty"` + RequireClientAuthentication bool `json:"requireClientAuthentication"` + RequireRegistration bool `json:"requireRegistration"` + ScopeHandlingPolicy OAuthScopeHandlingPolicy `json:"scopeHandlingPolicy,omitempty"` + UnknownScopePolicy UnknownScopePolicy `json:"unknownScopePolicy,omitempty"` } /** - * API request to start a WebAuthn registration ceremony - * - * @author Spencer Witt + * Interface for all identity providers that are passwordless and do not accept a password. */ -type WebAuthnRegisterStartRequest struct { - DisplayName string `json:"displayName,omitempty"` - Name string `json:"name,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - UserId string `json:"userId,omitempty"` - Workflow WebAuthnWorkflow `json:"workflow,omitempty"` +type PasswordlessIdentityProvider struct { } /** - * @author Daniel DeGroff + * A log for an event that happened to a User. + * + * @author Brian Pontarelli */ -type MaximumPasswordAge struct { - Enableable - Days int `json:"days,omitempty"` +type UserComment struct { + Comment string `json:"comment,omitempty"` + CommenterId string `json:"commenterId,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + UserId string `json:"userId,omitempty"` } /** - * @author Brett Guy + * @author Brett Pontarelli */ -type IPAccessControlEntry struct { - Action IPAccessControlEntryAction `json:"action,omitempty"` - EndIPAddress string `json:"endIPAddress,omitempty"` - StartIPAddress string `json:"startIPAddress,omitempty"` +type TenantSSOConfiguration struct { + DeviceTrustTimeToLiveInSeconds int `json:"deviceTrustTimeToLiveInSeconds,omitempty"` } /** - * Models the Group Member Update Event. + * Models the Group Created Event. * * @author Daniel DeGroff */ -type GroupMemberUpdateEvent struct { +type GroupCreateCompleteEvent struct { BaseGroupEvent - Members []GroupMember `json:"members,omitempty"` } /** - * Models the User Deactivate Event. - * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type UserDeactivateEvent struct { - BaseUserEvent +type TwoFactorMethod struct { + Authenticator AuthenticatorConfiguration `json:"authenticator,omitempty"` + Email string `json:"email,omitempty"` + Id string `json:"id,omitempty"` + LastUsed bool `json:"lastUsed"` + Method string `json:"method,omitempty"` + MobilePhone string `json:"mobilePhone,omitempty"` + Secret string `json:"secret,omitempty"` } /** - * Search criteria for the webhook event log. + * Search criteria for Tenants * - * @author Spencer Witt + * @author Mark Manes */ -type WebhookEventLogSearchCriteria struct { +type TenantSearchCriteria struct { BaseSearchCriteria - End int64 `json:"end,omitempty"` - Event string `json:"event,omitempty"` - EventResult WebhookEventResult `json:"eventResult,omitempty"` - EventType EventType `json:"eventType,omitempty"` - Start int64 `json:"start,omitempty"` + Name string `json:"name,omitempty"` } /** - * Group Member Response + * Models the User Identity Provider Link Event. * - * @author Daniel DeGroff + * @author Rob Davis */ -type MemberResponse struct { - BaseHTTPResponse - Members map[string][]GroupMember `json:"members,omitempty"` -} - -func (b *MemberResponse) SetStatus(status int) { - b.StatusCode = status +type UserIdentityProviderLinkEvent struct { + BaseUserEvent + IdentityProviderLink IdentityProviderLink `json:"identityProviderLink,omitempty"` } /** - * Webhook event log search request. - * - * @author Spencer Witt + * @author Michael Sleevi */ -type WebhookEventLogSearchRequest struct { - Search WebhookEventLogSearchCriteria `json:"search,omitempty"` +type PreviewMessageTemplateRequest struct { + Locale string `json:"locale,omitempty"` + MessageTemplate MessageTemplate `json:"messageTemplate,omitempty"` } /** - * API response for completing WebAuthn assertion + * Login API request object used for login to third-party systems (i.e. Login with Facebook). * - * @author Spencer Witt - */ -type WebAuthnAssertResponse struct { - BaseHTTPResponse - Credential WebAuthnCredential `json:"credential,omitempty"` -} - -func (b *WebAuthnAssertResponse) SetStatus(status int) { - b.StatusCode = status -} - -/** - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type SecureGeneratorType string - -func (e SecureGeneratorType) String() string { - return string(e) +type IdentityProviderLoginRequest struct { + BaseLoginRequest + Data map[string]string `json:"data,omitempty"` + EncodedJWT string `json:"encodedJWT,omitempty"` + IdentityProviderId string `json:"identityProviderId,omitempty"` + NoLink bool `json:"noLink"` } -const ( - SecureGeneratorType_RandomDigits SecureGeneratorType = "randomDigits" - SecureGeneratorType_RandomBytes SecureGeneratorType = "randomBytes" - SecureGeneratorType_RandomAlpha SecureGeneratorType = "randomAlpha" - SecureGeneratorType_RandomAlphaNumeric SecureGeneratorType = "randomAlphaNumeric" -) - /** - * XML canonicalization method enumeration. This is used for the IdP and SP side of FusionAuth SAML. + * An action that can be executed on a user (discipline or reward potentially). * * @author Brian Pontarelli */ -type CanonicalizationMethod string - -func (e CanonicalizationMethod) String() string { - return string(e) +type UserAction struct { + Active bool `json:"active"` + CancelEmailTemplateId string `json:"cancelEmailTemplateId,omitempty"` + EndEmailTemplateId string `json:"endEmailTemplateId,omitempty"` + Id string `json:"id,omitempty"` + IncludeEmailInEventJSON bool `json:"includeEmailInEventJSON"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + LocalizedNames map[string]string `json:"localizedNames,omitempty"` + ModifyEmailTemplateId string `json:"modifyEmailTemplateId,omitempty"` + Name string `json:"name,omitempty"` + Options []UserActionOption `json:"options,omitempty"` + PreventLogin bool `json:"preventLogin"` + SendEndEvent bool `json:"sendEndEvent"` + StartEmailTemplateId string `json:"startEmailTemplateId,omitempty"` + Temporal bool `json:"temporal"` + TransactionType TransactionType `json:"transactionType,omitempty"` + UserEmailingEnabled bool `json:"userEmailingEnabled"` + UserNotificationsEnabled bool `json:"userNotificationsEnabled"` } -const ( - CanonicalizationMethod_Exclusive CanonicalizationMethod = "exclusive" - CanonicalizationMethod_ExclusiveWithComments CanonicalizationMethod = "exclusive_with_comments" - CanonicalizationMethod_Inclusive CanonicalizationMethod = "inclusive" - CanonicalizationMethod_InclusiveWithComments CanonicalizationMethod = "inclusive_with_comments" -) - /** - * Search criteria for themes - * - * @author Mark Manes + * @author Trevor Smith */ -type ThemeSearchCriteria struct { - BaseSearchCriteria - Name string `json:"name,omitempty"` - Type ThemeType `json:"type,omitempty"` +type Theme struct { + Data map[string]interface{} `json:"data,omitempty"` + DefaultMessages string `json:"defaultMessages,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + LocalizedMessages map[string]string `json:"localizedMessages,omitempty"` + Name string `json:"name,omitempty"` + Stylesheet string `json:"stylesheet,omitempty"` + Templates Templates `json:"templates,omitempty"` + Type ThemeType `json:"type,omitempty"` + Variables SimpleThemeVariables `json:"variables,omitempty"` +} + +type Templates struct { + AccountEdit string `json:"accountEdit,omitempty"` + AccountIndex string `json:"accountIndex,omitempty"` + AccountTwoFactorDisable string `json:"accountTwoFactorDisable,omitempty"` + AccountTwoFactorEnable string `json:"accountTwoFactorEnable,omitempty"` + AccountTwoFactorIndex string `json:"accountTwoFactorIndex,omitempty"` + AccountWebAuthnAdd string `json:"accountWebAuthnAdd,omitempty"` + AccountWebAuthnDelete string `json:"accountWebAuthnDelete,omitempty"` + AccountWebAuthnIndex string `json:"accountWebAuthnIndex,omitempty"` + ConfirmationRequired string `json:"confirmationRequired,omitempty"` + EmailComplete string `json:"emailComplete,omitempty"` + EmailSend string `json:"emailSend,omitempty"` + EmailSent string `json:"emailSent,omitempty"` + EmailVerificationRequired string `json:"emailVerificationRequired,omitempty"` + EmailVerify string `json:"emailVerify,omitempty"` + Helpers string `json:"helpers,omitempty"` + Index string `json:"index,omitempty"` + Oauth2Authorize string `json:"oauth2Authorize,omitempty"` + Oauth2AuthorizedNotRegistered string `json:"oauth2AuthorizedNotRegistered,omitempty"` + Oauth2ChildRegistrationNotAllowed string `json:"oauth2ChildRegistrationNotAllowed,omitempty"` + Oauth2ChildRegistrationNotAllowedComplete string `json:"oauth2ChildRegistrationNotAllowedComplete,omitempty"` + Oauth2CompleteRegistration string `json:"oauth2CompleteRegistration,omitempty"` + Oauth2Consent string `json:"oauth2Consent,omitempty"` + Oauth2Device string `json:"oauth2Device,omitempty"` + Oauth2DeviceComplete string `json:"oauth2DeviceComplete,omitempty"` + Oauth2Error string `json:"oauth2Error,omitempty"` + Oauth2Logout string `json:"oauth2Logout,omitempty"` + Oauth2Passwordless string `json:"oauth2Passwordless,omitempty"` + Oauth2Register string `json:"oauth2Register,omitempty"` + Oauth2StartIdPLink string `json:"oauth2StartIdPLink,omitempty"` + Oauth2TwoFactor string `json:"oauth2TwoFactor,omitempty"` + Oauth2TwoFactorEnable string `json:"oauth2TwoFactorEnable,omitempty"` + Oauth2TwoFactorEnableComplete string `json:"oauth2TwoFactorEnableComplete,omitempty"` + Oauth2TwoFactorMethods string `json:"oauth2TwoFactorMethods,omitempty"` + Oauth2Wait string `json:"oauth2Wait,omitempty"` + Oauth2WebAuthn string `json:"oauth2WebAuthn,omitempty"` + Oauth2WebAuthnReauth string `json:"oauth2WebAuthnReauth,omitempty"` + Oauth2WebAuthnReauthEnable string `json:"oauth2WebAuthnReauthEnable,omitempty"` + PasswordChange string `json:"passwordChange,omitempty"` + PasswordComplete string `json:"passwordComplete,omitempty"` + PasswordForgot string `json:"passwordForgot,omitempty"` + PasswordSent string `json:"passwordSent,omitempty"` + RegistrationComplete string `json:"registrationComplete,omitempty"` + RegistrationSend string `json:"registrationSend,omitempty"` + RegistrationSent string `json:"registrationSent,omitempty"` + RegistrationVerificationRequired string `json:"registrationVerificationRequired,omitempty"` + RegistrationVerify string `json:"registrationVerify,omitempty"` + Samlv2Logout string `json:"samlv2Logout,omitempty"` + Unauthorized string `json:"unauthorized,omitempty"` } /** * @author Daniel DeGroff */ -type RateLimitedRequestType string +type IdentityProviderType string -func (e RateLimitedRequestType) String() string { +func (e IdentityProviderType) String() string { return string(e) } const ( - RateLimitedRequestType_FailedLogin RateLimitedRequestType = "FailedLogin" - RateLimitedRequestType_ForgotPassword RateLimitedRequestType = "ForgotPassword" - RateLimitedRequestType_SendEmailVerification RateLimitedRequestType = "SendEmailVerification" - RateLimitedRequestType_SendPasswordless RateLimitedRequestType = "SendPasswordless" - RateLimitedRequestType_SendRegistrationVerification RateLimitedRequestType = "SendRegistrationVerification" - RateLimitedRequestType_SendTwoFactor RateLimitedRequestType = "SendTwoFactor" + IdentityProviderType_Apple IdentityProviderType = "Apple" + IdentityProviderType_EpicGames IdentityProviderType = "EpicGames" + IdentityProviderType_ExternalJWT IdentityProviderType = "ExternalJWT" + IdentityProviderType_Facebook IdentityProviderType = "Facebook" + IdentityProviderType_Google IdentityProviderType = "Google" + IdentityProviderType_HYPR IdentityProviderType = "HYPR" + IdentityProviderType_LinkedIn IdentityProviderType = "LinkedIn" + IdentityProviderType_Nintendo IdentityProviderType = "Nintendo" + IdentityProviderType_OpenIDConnect IdentityProviderType = "OpenIDConnect" + IdentityProviderType_SAMLv2 IdentityProviderType = "SAMLv2" + IdentityProviderType_SAMLv2IdPInitiated IdentityProviderType = "SAMLv2IdPInitiated" + IdentityProviderType_SonyPSN IdentityProviderType = "SonyPSN" + IdentityProviderType_Steam IdentityProviderType = "Steam" + IdentityProviderType_Twitch IdentityProviderType = "Twitch" + IdentityProviderType_Twitter IdentityProviderType = "Twitter" + IdentityProviderType_Xbox IdentityProviderType = "Xbox" ) /** - * @author Daniel DeGroff + * @author Brett Guy */ -type LoginHintConfiguration struct { - Enableable - ParameterName string `json:"parameterName,omitempty"` +type IPAccessControlList struct { + Data map[string]interface{} `json:"data,omitempty"` + Entries []IPAccessControlEntry `json:"entries,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + Name string `json:"name,omitempty"` } /** - * Controls the policy for whether OAuth workflows will more strictly adhere to the OAuth and OIDC specification - * or run in backwards compatibility mode. - * - * @author David Charles + * @author Daniel DeGroff */ -type OAuthScopeHandlingPolicy string +type VerificationStrategy string -func (e OAuthScopeHandlingPolicy) String() string { +func (e VerificationStrategy) String() string { return string(e) } const ( - OAuthScopeHandlingPolicy_Compatibility OAuthScopeHandlingPolicy = "Compatibility" - OAuthScopeHandlingPolicy_Strict OAuthScopeHandlingPolicy = "Strict" + VerificationStrategy_ClickableLink VerificationStrategy = "ClickableLink" + VerificationStrategy_FormField VerificationStrategy = "FormField" ) /** - * API request for managing families and members. + * This class contains the managed fields that are also put into the database during FusionAuth setup. + *

+ * Internal Note: These fields are also declared in SQL in order to bootstrap the system. These need to stay in sync. + * Any changes to these fields needs to also be reflected in mysql.sql and postgresql.sql * * @author Brian Pontarelli */ -type FamilyRequest struct { - FamilyMember FamilyMember `json:"familyMember,omitempty"` +type ManagedFields struct { } /** - * @author Matthew Altman + * Webhook event log search request. + * + * @author Spencer Witt */ -type LogoutBehavior string +type WebhookEventLogSearchRequest struct { + Search WebhookEventLogSearchCriteria `json:"search,omitempty"` +} -func (e LogoutBehavior) String() string { +/** + * @author Daniel DeGroff + */ +type AuthenticatorConfiguration struct { + Algorithm TOTPAlgorithm `json:"algorithm,omitempty"` + CodeLength int `json:"codeLength,omitempty"` + TimeStep int `json:"timeStep,omitempty"` +} + +type TOTPAlgorithm string + +func (e TOTPAlgorithm) String() string { return string(e) } const ( - LogoutBehavior_RedirectOnly LogoutBehavior = "RedirectOnly" - LogoutBehavior_AllApplications LogoutBehavior = "AllApplications" + TOTPAlgorithm_HmacSHA1 TOTPAlgorithm = "HmacSHA1" + TOTPAlgorithm_HmacSHA256 TOTPAlgorithm = "HmacSHA256" + TOTPAlgorithm_HmacSHA512 TOTPAlgorithm = "HmacSHA512" ) /** - * The response from the total report. This report stores the total numbers for each application. + * Models action reasons. * * @author Brian Pontarelli */ -type TotalsReportResponse struct { - BaseHTTPResponse - ApplicationTotals map[string]Totals `json:"applicationTotals,omitempty"` - GlobalRegistrations int64 `json:"globalRegistrations,omitempty"` - TotalGlobalRegistrations int64 `json:"totalGlobalRegistrations,omitempty"` -} - -func (b *TotalsReportResponse) SetStatus(status int) { - b.StatusCode = status +type UserActionReason struct { + Code string `json:"code,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + LocalizedTexts map[string]string `json:"localizedTexts,omitempty"` + Text string `json:"text,omitempty"` } /** - * A historical state of a user log event. Since events can be modified, this stores the historical state. + * A User's WebAuthnCredential. Contains all data required to complete WebAuthn authentication ceremonies. * - * @author Brian Pontarelli + * @author Spencer Witt */ -type LogHistory struct { - HistoryItems []HistoryItem `json:"historyItems,omitempty"` +type WebAuthnCredential struct { + Algorithm CoseAlgorithmIdentifier `json:"algorithm,omitempty"` + AttestationType AttestationType `json:"attestationType,omitempty"` + AuthenticatorSupportsUserVerification bool `json:"authenticatorSupportsUserVerification"` + CredentialId string `json:"credentialId,omitempty"` + Data map[string]interface{} `json:"data,omitempty"` + Discoverable bool `json:"discoverable"` + DisplayName string `json:"displayName,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastUseInstant int64 `json:"lastUseInstant,omitempty"` + Name string `json:"name,omitempty"` + PublicKey string `json:"publicKey,omitempty"` + RelyingPartyId string `json:"relyingPartyId,omitempty"` + SignCount int `json:"signCount,omitempty"` + TenantId string `json:"tenantId,omitempty"` + Transports []string `json:"transports,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + UserId string `json:"userId,omitempty"` } /** - * Models the User Create Registration Event. - * * @author Daniel DeGroff */ -type UserRegistrationCreateEvent struct { - BaseUserEvent - ApplicationId string `json:"applicationId,omitempty"` - Registration UserRegistration `json:"registration,omitempty"` +type TestEvent struct { + BaseEvent + Message string `json:"message,omitempty"` } /** - * Search request for Applications + * Models the Refresh Token Revoke Event. This event might be for a single token, a user + * or an entire application. * - * @author Spencer Witt + * @author Brian Pontarelli */ -type ApplicationSearchRequest struct { - ExpandableRequest - Search ApplicationSearchCriteria `json:"search,omitempty"` +type JWTRefreshTokenRevokeEvent struct { + BaseEvent + ApplicationId string `json:"applicationId,omitempty"` + ApplicationTimeToLiveInSeconds map[string]int `json:"applicationTimeToLiveInSeconds,omitempty"` + RefreshToken RefreshToken `json:"refreshToken,omitempty"` + User User `json:"user,omitempty"` + UserId string `json:"userId,omitempty"` } /** - * A webhook call response. - * - * @author Spencer Witt + * @author Trevor Smith */ -type WebhookCallResponse struct { - BaseHTTPResponse - Exception string `json:"exception,omitempty"` - StatusCode int `json:"statusCode,omitempty"` - Url string `json:"url,omitempty"` +type ConnectorPolicy struct { + ConnectorId string `json:"connectorId,omitempty"` + Data map[string]interface{} `json:"data,omitempty"` + Domains []string `json:"domains,omitempty"` + Migrate bool `json:"migrate"` } -func (b *WebhookCallResponse) SetStatus(status int) { - b.StatusCode = status +/** + * @author Brett Pontarelli + */ +type AuthenticationThreats string + +func (e AuthenticationThreats) String() string { + return string(e) } +const ( + AuthenticationThreats_ImpossibleTravel AuthenticationThreats = "ImpossibleTravel" +) + /** - * API request for User consent types. + * Models the User Password Reset Send Event. * * @author Daniel DeGroff */ -type ConsentRequest struct { - Consent Consent `json:"consent,omitempty"` +type UserPasswordResetSendEvent struct { + BaseUserEvent } /** + * Event to indicate kickstart has been successfully completed. + * * @author Daniel DeGroff */ -type FacebookApplicationConfiguration struct { - BaseIdentityProviderApplicationConfiguration - AppId string `json:"appId,omitempty"` - ButtonText string `json:"buttonText,omitempty"` - ClientSecret string `json:"client_secret,omitempty"` - Fields string `json:"fields,omitempty"` - LoginMethod IdentityProviderLoginMethod `json:"loginMethod,omitempty"` - Permissions string `json:"permissions,omitempty"` +type KickstartSuccessEvent struct { + BaseEvent + InstanceId string `json:"instanceId,omitempty"` } /** - * @author Johnathon Wood + * User API delete request object. + * + * @author Daniel DeGroff */ -type Oauth2AuthorizedURLValidationPolicy string - -func (e Oauth2AuthorizedURLValidationPolicy) String() string { - return string(e) +type UserDeleteRequest struct { + BaseEventRequest + DryRun bool `json:"dryRun"` + HardDelete bool `json:"hardDelete"` + Limit int `json:"limit,omitempty"` + Query string `json:"query,omitempty"` + QueryString string `json:"queryString,omitempty"` + UserIds []string `json:"userIds,omitempty"` } -const ( - Oauth2AuthorizedURLValidationPolicy_AllowWildcards Oauth2AuthorizedURLValidationPolicy = "AllowWildcards" - Oauth2AuthorizedURLValidationPolicy_ExactMatch Oauth2AuthorizedURLValidationPolicy = "ExactMatch" -) +/** + * @author Brett Guy + */ +type TenantAccessControlConfiguration struct { + UiIPAccessControlListId string `json:"uiIPAccessControlListId,omitempty"` +} /** - * Models content user action options. + * This class is a simple attachment with a byte array, name and MIME type. * * @author Brian Pontarelli */ -type UserActionOption struct { - LocalizedNames map[string]string `json:"localizedNames,omitempty"` - Name string `json:"name,omitempty"` +type Attachment struct { + Attachment []byte `json:"attachment,omitempty"` + Mime string `json:"mime,omitempty"` + Name string `json:"name,omitempty"` } /** - * Identifies the WebAuthn workflow. This will affect the parameters used for credential creation - * and request based on the Tenant configuration. + * Interface for any object that can provide JSON Web key Information. + */ +type JSONWebKeyInfoProvider struct { +} + +/** + * Tenant-level configuration for WebAuthn * * @author Spencer Witt */ -type WebAuthnWorkflow string - -func (e WebAuthnWorkflow) String() string { - return string(e) +type TenantWebAuthnConfiguration struct { + Enableable + BootstrapWorkflow TenantWebAuthnWorkflowConfiguration `json:"bootstrapWorkflow,omitempty"` + Debug bool `json:"debug"` + ReauthenticationWorkflow TenantWebAuthnWorkflowConfiguration `json:"reauthenticationWorkflow,omitempty"` + RelyingPartyId string `json:"relyingPartyId,omitempty"` + RelyingPartyName string `json:"relyingPartyName,omitempty"` } -const ( - WebAuthnWorkflow_Bootstrap WebAuthnWorkflow = "bootstrap" - WebAuthnWorkflow_General WebAuthnWorkflow = "general" - WebAuthnWorkflow_Reauthentication WebAuthnWorkflow = "reauthentication" -) - /** - * An action that can be executed on a user (discipline or reward potentially). + * Email template request. * * @author Brian Pontarelli */ -type UserAction struct { - Active bool `json:"active"` - CancelEmailTemplateId string `json:"cancelEmailTemplateId,omitempty"` - EndEmailTemplateId string `json:"endEmailTemplateId,omitempty"` - Id string `json:"id,omitempty"` - IncludeEmailInEventJSON bool `json:"includeEmailInEventJSON"` - InsertInstant int64 `json:"insertInstant,omitempty"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - LocalizedNames map[string]string `json:"localizedNames,omitempty"` - ModifyEmailTemplateId string `json:"modifyEmailTemplateId,omitempty"` - Name string `json:"name,omitempty"` - Options []UserActionOption `json:"options,omitempty"` - PreventLogin bool `json:"preventLogin"` - SendEndEvent bool `json:"sendEndEvent"` - StartEmailTemplateId string `json:"startEmailTemplateId,omitempty"` - Temporal bool `json:"temporal"` - TransactionType TransactionType `json:"transactionType,omitempty"` - UserEmailingEnabled bool `json:"userEmailingEnabled"` - UserNotificationsEnabled bool `json:"userNotificationsEnabled"` +type EmailTemplateRequest struct { + EmailTemplate EmailTemplate `json:"emailTemplate,omitempty"` } /** - * Forgot password response object. - * * @author Daniel DeGroff */ -type ForgotPasswordResponse struct { +type IdentityProviderPendingLinkResponse struct { BaseHTTPResponse - ChangePasswordId string `json:"changePasswordId,omitempty"` + IdentityProviderTenantConfiguration IdentityProviderTenantConfiguration `json:"identityProviderTenantConfiguration,omitempty"` + LinkCount int `json:"linkCount,omitempty"` + PendingIdPLink PendingIdPLink `json:"pendingIdPLink,omitempty"` } -func (b *ForgotPasswordResponse) SetStatus(status int) { +func (b *IdentityProviderPendingLinkResponse) SetStatus(status int) { b.StatusCode = status } /** - * Models the JWT Refresh Event. This event will be fired when a JWT is "refreshed" (generated) using a Refresh Token. - * * @author Daniel DeGroff */ -type JWTRefreshEvent struct { - BaseEvent - ApplicationId string `json:"applicationId,omitempty"` - Original string `json:"original,omitempty"` - RefreshToken string `json:"refreshToken,omitempty"` - Token string `json:"token,omitempty"` - UserId string `json:"userId,omitempty"` +type PasswordlessSendRequest struct { + ApplicationId string `json:"applicationId,omitempty"` + Code string `json:"code,omitempty"` + LoginId string `json:"loginId,omitempty"` + State map[string]interface{} `json:"state,omitempty"` } /** - * Search results. - * - * @author Brian Pontarelli + * @author Daniel DeGroff */ -type SearchResults struct { - NextResults string `json:"nextResults,omitempty"` - Results []interface{} `json:"results,omitempty"` - Total int64 `json:"total,omitempty"` - TotalEqualToActual bool `json:"totalEqualToActual"` +type TenantRegistrationConfiguration struct { + BlockedDomains []string `json:"blockedDomains,omitempty"` } /** - * Search request for entities + * @author Daniel DeGroff + */ +type IdentityProviderLink struct { + Data map[string]interface{} `json:"data,omitempty"` + DisplayName string `json:"displayName,omitempty"` + IdentityProviderId string `json:"identityProviderId,omitempty"` + IdentityProviderName string `json:"identityProviderName,omitempty"` + IdentityProviderType IdentityProviderType `json:"identityProviderType,omitempty"` + IdentityProviderUserId string `json:"identityProviderUserId,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastLoginInstant int64 `json:"lastLoginInstant,omitempty"` + TenantId string `json:"tenantId,omitempty"` + Token string `json:"token,omitempty"` + UserId string `json:"userId,omitempty"` +} + +/** + * Registration API request object. * - * @author Brett Guy + * @author Brian Pontarelli */ -type EntitySearchResponse struct { +type RegistrationResponse struct { BaseHTTPResponse - Entities []Entity `json:"entities,omitempty"` - NextResults string `json:"nextResults,omitempty"` - Total int64 `json:"total,omitempty"` + RefreshToken string `json:"refreshToken,omitempty"` + Registration UserRegistration `json:"registration,omitempty"` + RegistrationVerificationId string `json:"registrationVerificationId,omitempty"` + RegistrationVerificationOneTimeCode string `json:"registrationVerificationOneTimeCode,omitempty"` + Token string `json:"token,omitempty"` + TokenExpirationInstant int64 `json:"tokenExpirationInstant,omitempty"` + User User `json:"user,omitempty"` } -func (b *EntitySearchResponse) SetStatus(status int) { +func (b *RegistrationResponse) SetStatus(status int) { b.StatusCode = status } /** - * @author Derek Klatt + * A role given to a user for a specific application. + * + * @author Seth Musselman */ -type PasswordValidationRules struct { - BreachDetection PasswordBreachDetection `json:"breachDetection,omitempty"` - MaxLength int `json:"maxLength,omitempty"` - MinLength int `json:"minLength,omitempty"` - RememberPreviousPasswords RememberPreviousPasswords `json:"rememberPreviousPasswords,omitempty"` - RequireMixedCase bool `json:"requireMixedCase"` - RequireNonAlpha bool `json:"requireNonAlpha"` - RequireNumber bool `json:"requireNumber"` - ValidateOnLogin bool `json:"validateOnLogin"` +type ApplicationRole struct { + Description string `json:"description,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + IsDefault bool `json:"isDefault"` + IsSuperRole bool `json:"isSuperRole"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + Name string `json:"name,omitempty"` } /** + * Google social login provider parameters. + * * @author Daniel DeGroff */ -type SecretResponse struct { - BaseHTTPResponse - Secret string `json:"secret,omitempty"` - SecretBase32Encoded string `json:"secretBase32Encoded,omitempty"` -} - -func (b *SecretResponse) SetStatus(status int) { - b.StatusCode = status +type GoogleIdentityProviderProperties struct { + Api string `json:"api,omitempty"` + Button string `json:"button,omitempty"` } /** - * Twitter social login provider. - * * @author Daniel DeGroff */ -type TwitterIdentityProvider struct { - BaseIdentityProvider - ButtonText string `json:"buttonText,omitempty"` - ConsumerKey string `json:"consumerKey,omitempty"` - ConsumerSecret string `json:"consumerSecret,omitempty"` +type JWKSResponse struct { + BaseHTTPResponse + Keys []JSONWebKey `json:"keys,omitempty"` } -/** - * @author Daniel DeGroff - */ -type HYPRIdentityProvider struct { - BaseIdentityProvider - RelyingPartyApplicationId string `json:"relyingPartyApplicationId,omitempty"` - RelyingPartyURL string `json:"relyingPartyURL,omitempty"` +func (b *JWKSResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Models the User Password Reset Success Event. + * Steam API modes. * * @author Daniel DeGroff */ -type UserPasswordResetSuccessEvent struct { - BaseUserEvent +type SteamAPIMode string + +func (e SteamAPIMode) String() string { + return string(e) } +const ( + SteamAPIMode_Public SteamAPIMode = "Public" + SteamAPIMode_Partner SteamAPIMode = "Partner" +) + /** - * Something that can be required and thus also optional. This currently extends Enableable because anything that is - * required/optional is almost always enableable as well. + * Lambda API response object. * * @author Brian Pontarelli */ -type Requirable struct { - Enableable - Required bool `json:"required"` +type LambdaResponse struct { + BaseHTTPResponse + Lambda Lambda `json:"lambda,omitempty"` + Lambdas []Lambda `json:"lambdas,omitempty"` } -/** - * JWT Configuration for entities. - */ -type EntityJWTConfiguration struct { - Enableable - AccessTokenKeyId string `json:"accessTokenKeyId,omitempty"` - TimeToLiveInSeconds int `json:"timeToLiveInSeconds,omitempty"` +func (b *LambdaResponse) SetStatus(status int) { + b.StatusCode = status } /** - * @author Daniel DeGroff + * Models the JWT public key Refresh Token Revoke Event. This event might be for a single + * token, a user or an entire application. + * + * @author Brian Pontarelli */ -type ReloadRequest struct { - Names []string `json:"names,omitempty"` +type JWTPublicKeyUpdateEvent struct { + BaseEvent + ApplicationIds []string `json:"applicationIds,omitempty"` } /** - * Search request for user comments + * The Integration Request * - * @author Spencer Witt + * @author Daniel DeGroff */ -type UserCommentSearchRequest struct { - Search UserCommentSearchCriteria `json:"search,omitempty"` +type IntegrationRequest struct { + Integrations Integrations `json:"integrations,omitempty"` } /** - * Request to complete the WebAuthn registration ceremony - * - * @author Spencer Witt + * @author Brett Pontarelli */ -type WebAuthnLoginRequest struct { - BaseLoginRequest - Credential WebAuthnPublicKeyAuthenticationRequest `json:"credential,omitempty"` - Origin string `json:"origin,omitempty"` - RpId string `json:"rpId,omitempty"` - TwoFactorTrustId string `json:"twoFactorTrustId,omitempty"` +type CaptchaMethod string + +func (e CaptchaMethod) String() string { + return string(e) } +const ( + CaptchaMethod_GoogleRecaptchaV2 CaptchaMethod = "GoogleRecaptchaV2" + CaptchaMethod_GoogleRecaptchaV3 CaptchaMethod = "GoogleRecaptchaV3" + CaptchaMethod_HCaptcha CaptchaMethod = "HCaptcha" + CaptchaMethod_HCaptchaEnterprise CaptchaMethod = "HCaptchaEnterprise" +) + /** - * domain POJO to represent AuthenticationKey + * Models the event types that FusionAuth produces. * - * @author sanjay + * @author Brian Pontarelli */ -type APIKey struct { - Id string `json:"id,omitempty"` - InsertInstant int64 `json:"insertInstant,omitempty"` - IpAccessControlListId string `json:"ipAccessControlListId,omitempty"` - Key string `json:"key,omitempty"` - KeyManager bool `json:"keyManager"` - LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` - MetaData APIKeyMetaData `json:"metaData,omitempty"` - Permissions APIKeyPermissions `json:"permissions,omitempty"` - TenantId string `json:"tenantId,omitempty"` +type EventType string + +func (e EventType) String() string { + return string(e) } +const ( + EventType_JWTPublicKeyUpdate EventType = "jwt.public-key.update" + EventType_JWTRefreshTokenRevoke EventType = "jwt.refresh-token.revoke" + EventType_JWTRefresh EventType = "jwt.refresh" + EventType_AuditLogCreate EventType = "audit-log.create" + EventType_EventLogCreate EventType = "event-log.create" + EventType_KickstartSuccess EventType = "kickstart.success" + EventType_GroupCreate EventType = "group.create" + EventType_GroupCreateComplete EventType = "group.create.complete" + EventType_GroupDelete EventType = "group.delete" + EventType_GroupDeleteComplete EventType = "group.delete.complete" + EventType_GroupMemberAdd EventType = "group.member.add" + EventType_GroupMemberAddComplete EventType = "group.member.add.complete" + EventType_GroupMemberRemove EventType = "group.member.remove" + EventType_GroupMemberRemoveComplete EventType = "group.member.remove.complete" + EventType_GroupMemberUpdate EventType = "group.member.update" + EventType_GroupMemberUpdateComplete EventType = "group.member.update.complete" + EventType_GroupUpdate EventType = "group.update" + EventType_GroupUpdateComplete EventType = "group.update.complete" + EventType_UserAction EventType = "user.action" + EventType_UserBulkCreate EventType = "user.bulk.create" + EventType_UserCreate EventType = "user.create" + EventType_UserCreateComplete EventType = "user.create.complete" + EventType_UserDeactivate EventType = "user.deactivate" + EventType_UserDelete EventType = "user.delete" + EventType_UserDeleteComplete EventType = "user.delete.complete" + EventType_UserEmailUpdate EventType = "user.email.update" + EventType_UserEmailVerified EventType = "user.email.verified" + EventType_UserIdentityProviderLink EventType = "user.identity-provider.link" + EventType_UserIdentityProviderUnlink EventType = "user.identity-provider.unlink" + EventType_UserLoginIdDuplicateOnCreate EventType = "user.loginId.duplicate.create" + EventType_UserLoginIdDuplicateOnUpdate EventType = "user.loginId.duplicate.update" + EventType_UserLoginFailed EventType = "user.login.failed" + EventType_UserLoginNewDevice EventType = "user.login.new-device" + EventType_UserLoginSuccess EventType = "user.login.success" + EventType_UserLoginSuspicious EventType = "user.login.suspicious" + EventType_UserPasswordBreach EventType = "user.password.breach" + EventType_UserPasswordResetSend EventType = "user.password.reset.send" + EventType_UserPasswordResetStart EventType = "user.password.reset.start" + EventType_UserPasswordResetSuccess EventType = "user.password.reset.success" + EventType_UserPasswordUpdate EventType = "user.password.update" + EventType_UserReactivate EventType = "user.reactivate" + EventType_UserRegistrationCreate EventType = "user.registration.create" + EventType_UserRegistrationCreateComplete EventType = "user.registration.create.complete" + EventType_UserRegistrationDelete EventType = "user.registration.delete" + EventType_UserRegistrationDeleteComplete EventType = "user.registration.delete.complete" + EventType_UserRegistrationUpdate EventType = "user.registration.update" + EventType_UserRegistrationUpdateComplete EventType = "user.registration.update.complete" + EventType_UserRegistrationVerified EventType = "user.registration.verified" + EventType_UserTwoFactorMethodAdd EventType = "user.two-factor.method.add" + EventType_UserTwoFactorMethodRemove EventType = "user.two-factor.method.remove" + EventType_UserUpdate EventType = "user.update" + EventType_UserUpdateComplete EventType = "user.update.complete" + EventType_Test EventType = "test" +) + /** - * Search criteria for webhooks. - * - * @author Spencer Witt + * @author Daniel DeGroff */ -type WebhookSearchCriteria struct { - BaseSearchCriteria - Description string `json:"description,omitempty"` - TenantId string `json:"tenantId,omitempty"` - Url string `json:"url,omitempty"` +type PasswordlessStartResponse struct { + BaseHTTPResponse + Code string `json:"code,omitempty"` +} + +func (b *PasswordlessStartResponse) SetStatus(status int) { + b.StatusCode = status } /** @@ -7671,374 +7695,350 @@ const ( ) /** - * Models the User Password Reset Start Event. - * * @author Daniel DeGroff */ -type UserPasswordResetStartEvent struct { - BaseUserEvent +type AppleApplicationConfiguration struct { + BaseIdentityProviderApplicationConfiguration + BundleId string `json:"bundleId,omitempty"` + ButtonText string `json:"buttonText,omitempty"` + KeyId string `json:"keyId,omitempty"` + Scope string `json:"scope,omitempty"` + ServicesId string `json:"servicesId,omitempty"` + TeamId string `json:"teamId,omitempty"` } /** - * Models the Group Delete Event. + * Audit log response. * - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type GroupDeleteEvent struct { - BaseGroupEvent -} - -type MultiFactorEmailTemplate struct { - TemplateId string `json:"templateId,omitempty"` -} - -type OAuthErrorReason string - -func (e OAuthErrorReason) String() string { - return string(e) +type AuditLogResponse struct { + BaseHTTPResponse + AuditLog AuditLog `json:"auditLog,omitempty"` } -const ( - OAuthErrorReason_AuthCodeNotFound OAuthErrorReason = "auth_code_not_found" - OAuthErrorReason_AccessTokenMalformed OAuthErrorReason = "access_token_malformed" - OAuthErrorReason_AccessTokenExpired OAuthErrorReason = "access_token_expired" - OAuthErrorReason_AccessTokenUnavailableForProcessing OAuthErrorReason = "access_token_unavailable_for_processing" - OAuthErrorReason_AccessTokenFailedProcessing OAuthErrorReason = "access_token_failed_processing" - OAuthErrorReason_AccessTokenInvalid OAuthErrorReason = "access_token_invalid" - OAuthErrorReason_AccessTokenRequired OAuthErrorReason = "access_token_required" - OAuthErrorReason_RefreshTokenNotFound OAuthErrorReason = "refresh_token_not_found" - OAuthErrorReason_RefreshTokenTypeNotSupported OAuthErrorReason = "refresh_token_type_not_supported" - OAuthErrorReason_InvalidClientId OAuthErrorReason = "invalid_client_id" - OAuthErrorReason_InvalidUserCredentials OAuthErrorReason = "invalid_user_credentials" - OAuthErrorReason_InvalidGrantType OAuthErrorReason = "invalid_grant_type" - OAuthErrorReason_InvalidOrigin OAuthErrorReason = "invalid_origin" - OAuthErrorReason_InvalidOriginOpaque OAuthErrorReason = "invalid_origin_opaque" - OAuthErrorReason_InvalidPkceCodeVerifier OAuthErrorReason = "invalid_pkce_code_verifier" - OAuthErrorReason_InvalidPkceCodeChallenge OAuthErrorReason = "invalid_pkce_code_challenge" - OAuthErrorReason_InvalidPkceCodeChallengeMethod OAuthErrorReason = "invalid_pkce_code_challenge_method" - OAuthErrorReason_InvalidRedirectUri OAuthErrorReason = "invalid_redirect_uri" - OAuthErrorReason_InvalidResponseMode OAuthErrorReason = "invalid_response_mode" - OAuthErrorReason_InvalidResponseType OAuthErrorReason = "invalid_response_type" - OAuthErrorReason_InvalidIdTokenHint OAuthErrorReason = "invalid_id_token_hint" - OAuthErrorReason_InvalidPostLogoutRedirectUri OAuthErrorReason = "invalid_post_logout_redirect_uri" - OAuthErrorReason_InvalidDeviceCode OAuthErrorReason = "invalid_device_code" - OAuthErrorReason_InvalidUserCode OAuthErrorReason = "invalid_user_code" - OAuthErrorReason_InvalidAdditionalClientId OAuthErrorReason = "invalid_additional_client_id" - OAuthErrorReason_InvalidTargetEntityScope OAuthErrorReason = "invalid_target_entity_scope" - OAuthErrorReason_InvalidEntityPermissionScope OAuthErrorReason = "invalid_entity_permission_scope" - OAuthErrorReason_InvalidUserId OAuthErrorReason = "invalid_user_id" - OAuthErrorReason_GrantTypeDisabled OAuthErrorReason = "grant_type_disabled" - OAuthErrorReason_MissingClientId OAuthErrorReason = "missing_client_id" - OAuthErrorReason_MissingClientSecret OAuthErrorReason = "missing_client_secret" - OAuthErrorReason_MissingCode OAuthErrorReason = "missing_code" - OAuthErrorReason_MissingCodeChallenge OAuthErrorReason = "missing_code_challenge" - OAuthErrorReason_MissingCodeVerifier OAuthErrorReason = "missing_code_verifier" - OAuthErrorReason_MissingDeviceCode OAuthErrorReason = "missing_device_code" - OAuthErrorReason_MissingGrantType OAuthErrorReason = "missing_grant_type" - OAuthErrorReason_MissingRedirectUri OAuthErrorReason = "missing_redirect_uri" - OAuthErrorReason_MissingRefreshToken OAuthErrorReason = "missing_refresh_token" - OAuthErrorReason_MissingResponseType OAuthErrorReason = "missing_response_type" - OAuthErrorReason_MissingToken OAuthErrorReason = "missing_token" - OAuthErrorReason_MissingUserCode OAuthErrorReason = "missing_user_code" - OAuthErrorReason_MissingUserId OAuthErrorReason = "missing_user_id" - OAuthErrorReason_MissingVerificationUri OAuthErrorReason = "missing_verification_uri" - OAuthErrorReason_LoginPrevented OAuthErrorReason = "login_prevented" - OAuthErrorReason_NotLicensed OAuthErrorReason = "not_licensed" - OAuthErrorReason_UserCodeExpired OAuthErrorReason = "user_code_expired" - OAuthErrorReason_UserExpired OAuthErrorReason = "user_expired" - OAuthErrorReason_UserLocked OAuthErrorReason = "user_locked" - OAuthErrorReason_UserNotFound OAuthErrorReason = "user_not_found" - OAuthErrorReason_ClientAuthenticationMissing OAuthErrorReason = "client_authentication_missing" - OAuthErrorReason_InvalidClientAuthenticationScheme OAuthErrorReason = "invalid_client_authentication_scheme" - OAuthErrorReason_InvalidClientAuthentication OAuthErrorReason = "invalid_client_authentication" - OAuthErrorReason_ClientIdMismatch OAuthErrorReason = "client_id_mismatch" - OAuthErrorReason_ChangePasswordAdministrative OAuthErrorReason = "change_password_administrative" - OAuthErrorReason_ChangePasswordBreached OAuthErrorReason = "change_password_breached" - OAuthErrorReason_ChangePasswordExpired OAuthErrorReason = "change_password_expired" - OAuthErrorReason_ChangePasswordValidation OAuthErrorReason = "change_password_validation" - OAuthErrorReason_Unknown OAuthErrorReason = "unknown" - OAuthErrorReason_MissingRequiredScope OAuthErrorReason = "missing_required_scope" - OAuthErrorReason_UnknownScope OAuthErrorReason = "unknown_scope" - OAuthErrorReason_ConsentCanceled OAuthErrorReason = "consent_canceled" -) - -/** - * @author Brett Pontarelli - */ -type TenantSSOConfiguration struct { - DeviceTrustTimeToLiveInSeconds int `json:"deviceTrustTimeToLiveInSeconds,omitempty"` +func (b *AuditLogResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Supply information on credential type and algorithm to the authenticator. + * domain POJO to represent AuthenticationKey * - * @author Spencer Witt + * @author sanjay */ -type PublicKeyCredentialParameters struct { - Alg CoseAlgorithmIdentifier `json:"alg,omitempty"` - Type PublicKeyCredentialType `json:"type,omitempty"` +type APIKey struct { + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + IpAccessControlListId string `json:"ipAccessControlListId,omitempty"` + Key string `json:"key,omitempty"` + KeyManager bool `json:"keyManager"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + MetaData APIKeyMetaData `json:"metaData,omitempty"` + Permissions APIKeyPermissions `json:"permissions,omitempty"` + TenantId string `json:"tenantId,omitempty"` } -/** - * API response for consent. - * - * @author Daniel DeGroff - */ -type ConsentResponse struct { - BaseHTTPResponse - Consent Consent `json:"consent,omitempty"` - Consents []Consent `json:"consents,omitempty"` +type APIKeyMetaData struct { + Attributes map[string]string `json:"attributes,omitempty"` } -func (b *ConsentResponse) SetStatus(status int) { - b.StatusCode = status +type APIKeyPermissions struct { + Endpoints map[string][]string `json:"endpoints,omitempty"` } /** - * Models the Group Member Remove Event. + * The application's relationship to the authorization server. First-party applications will be granted implicit permission for requested scopes. + * Third-party applications will use the {@link OAuthScopeConsentMode} policy. * - * @author Daniel DeGroff + * @author Spencer Witt */ -type GroupMemberRemoveEvent struct { - BaseGroupEvent - Members []GroupMember `json:"members,omitempty"` +type OAuthApplicationRelationship string + +func (e OAuthApplicationRelationship) String() string { + return string(e) } +const ( + OAuthApplicationRelationship_FirstParty OAuthApplicationRelationship = "FirstParty" + OAuthApplicationRelationship_ThirdParty OAuthApplicationRelationship = "ThirdParty" +) + /** * @author Daniel DeGroff */ -type IdentityProviderPendingLinkResponse struct { - BaseHTTPResponse - IdentityProviderTenantConfiguration IdentityProviderTenantConfiguration `json:"identityProviderTenantConfiguration,omitempty"` - LinkCount int `json:"linkCount,omitempty"` - PendingIdPLink PendingIdPLink `json:"pendingIdPLink,omitempty"` +type IdentityProviderOauth2Configuration struct { + AuthorizationEndpoint string `json:"authorization_endpoint,omitempty"` + ClientId string `json:"client_id,omitempty"` + ClientSecret string `json:"client_secret,omitempty"` + ClientAuthenticationMethod ClientAuthenticationMethod `json:"clientAuthenticationMethod,omitempty"` + EmailClaim string `json:"emailClaim,omitempty"` + EmailVerifiedClaim string `json:"emailVerifiedClaim,omitempty"` + Issuer string `json:"issuer,omitempty"` + Scope string `json:"scope,omitempty"` + TokenEndpoint string `json:"token_endpoint,omitempty"` + UniqueIdClaim string `json:"uniqueIdClaim,omitempty"` + UserinfoEndpoint string `json:"userinfo_endpoint,omitempty"` + UsernameClaim string `json:"usernameClaim,omitempty"` } -func (b *IdentityProviderPendingLinkResponse) SetStatus(status int) { - b.StatusCode = status +type ClientAuthenticationMethod string + +func (e ClientAuthenticationMethod) String() string { + return string(e) } +const ( + ClientAuthenticationMethod_None ClientAuthenticationMethod = "none" + ClientAuthenticationMethod_ClientSecretBasic ClientAuthenticationMethod = "client_secret_basic" + ClientAuthenticationMethod_ClientSecretPost ClientAuthenticationMethod = "client_secret_post" +) + /** - * Change password response object. - * * @author Daniel DeGroff */ -type ChangePasswordResponse struct { - BaseHTTPResponse - OneTimePassword string `json:"oneTimePassword,omitempty"` - State map[string]interface{} `json:"state,omitempty"` -} - -func (b *ChangePasswordResponse) SetStatus(status int) { - b.StatusCode = status +type LinkedInIdentityProvider struct { + BaseIdentityProvider + ButtonText string `json:"buttonText,omitempty"` + ClientId string `json:"client_id,omitempty"` + ClientSecret string `json:"client_secret,omitempty"` + Scope string `json:"scope,omitempty"` } /** - * The user action response object. - * * @author Brian Pontarelli */ -type ActionResponse struct { +type LoginResponse struct { BaseHTTPResponse - Action UserActionLog `json:"action,omitempty"` - Actions []UserActionLog `json:"actions,omitempty"` -} - -func (b *ActionResponse) SetStatus(status int) { - b.StatusCode = status + Actions []LoginPreventedResponse `json:"actions,omitempty"` + ChangePasswordId string `json:"changePasswordId,omitempty"` + ChangePasswordReason ChangePasswordReason `json:"changePasswordReason,omitempty"` + ConfigurableMethods []string `json:"configurableMethods,omitempty"` + EmailVerificationId string `json:"emailVerificationId,omitempty"` + Methods []TwoFactorMethod `json:"methods,omitempty"` + PendingIdPLinkId string `json:"pendingIdPLinkId,omitempty"` + RefreshToken string `json:"refreshToken,omitempty"` + RefreshTokenId string `json:"refreshTokenId,omitempty"` + RegistrationVerificationId string `json:"registrationVerificationId,omitempty"` + State map[string]interface{} `json:"state,omitempty"` + ThreatsDetected []AuthenticationThreats `json:"threatsDetected,omitempty"` + Token string `json:"token,omitempty"` + TokenExpirationInstant int64 `json:"tokenExpirationInstant,omitempty"` + TrustToken string `json:"trustToken,omitempty"` + TwoFactorId string `json:"twoFactorId,omitempty"` + TwoFactorTrustId string `json:"twoFactorTrustId,omitempty"` + User User `json:"user,omitempty"` } - -type Totals struct { - Logins int64 `json:"logins,omitempty"` - Registrations int64 `json:"registrations,omitempty"` - TotalRegistrations int64 `json:"totalRegistrations,omitempty"` + +func (b *LoginResponse) SetStatus(status int) { + b.StatusCode = status } /** - * Config for regular SAML IDP configurations that support IdP initiated requests + * Models a consent. * - * @author Lyle Schemmerling + * @author Daniel DeGroff */ -type SAMLv2IdpInitiatedConfiguration struct { +type Consent struct { + ConsentEmailTemplateId string `json:"consentEmailTemplateId,omitempty"` + CountryMinimumAgeForSelfConsent map[string]int `json:"countryMinimumAgeForSelfConsent,omitempty"` + Data map[string]interface{} `json:"data,omitempty"` + DefaultMinimumAgeForSelfConsent int `json:"defaultMinimumAgeForSelfConsent,omitempty"` + EmailPlus EmailPlus `json:"emailPlus,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + MultipleValuesAllowed bool `json:"multipleValuesAllowed"` + Name string `json:"name,omitempty"` + Values []string `json:"values,omitempty"` +} + +type EmailPlus struct { Enableable - Issuer string `json:"issuer,omitempty"` + EmailTemplateId string `json:"emailTemplateId,omitempty"` + MaximumTimeToSendEmailInHours int `json:"maximumTimeToSendEmailInHours,omitempty"` + MinimumTimeToSendEmailInHours int `json:"minimumTimeToSendEmailInHours,omitempty"` } /** - * Request for the system configuration API. + * Base class for all {@link Group} and {@link GroupMember} events. * - * @author Brian Pontarelli + * @author Spencer Witt */ -type SystemConfigurationRequest struct { - SystemConfiguration SystemConfiguration `json:"systemConfiguration,omitempty"` +type BaseGroupEvent struct { + BaseEvent + Group Group `json:"group,omitempty"` } /** - * User Action API request object. + * Models a specific entity type permission. This permission can be granted to users or other entities. * * @author Brian Pontarelli */ -type UserActionRequest struct { - UserAction UserAction `json:"userAction,omitempty"` -} - -type ClientAuthenticationMethod string - -func (e ClientAuthenticationMethod) String() string { - return string(e) -} - -const ( - ClientAuthenticationMethod_None ClientAuthenticationMethod = "none" - ClientAuthenticationMethod_ClientSecretBasic ClientAuthenticationMethod = "client_secret_basic" - ClientAuthenticationMethod_ClientSecretPost ClientAuthenticationMethod = "client_secret_post" -) - -/** - * @author Brett Guy - */ -type IPAccessControlListResponse struct { - BaseHTTPResponse - IpAccessControlList IPAccessControlList `json:"ipAccessControlList,omitempty"` - IpAccessControlLists []IPAccessControlList `json:"ipAccessControlLists,omitempty"` -} - -func (b *IPAccessControlListResponse) SetStatus(status int) { - b.StatusCode = status +type EntityTypePermission struct { + Data map[string]interface{} `json:"data,omitempty"` + Description string `json:"description,omitempty"` + Id string `json:"id,omitempty"` + InsertInstant int64 `json:"insertInstant,omitempty"` + IsDefault bool `json:"isDefault"` + LastUpdateInstant int64 `json:"lastUpdateInstant,omitempty"` + Name string `json:"name,omitempty"` } /** - * Request for managing FusionAuth Reactor and licenses. + * This class is the user query. It provides a build pattern as well as public fields for use on forms and in actions. * * @author Brian Pontarelli */ -type ReactorRequest struct { - License string `json:"license,omitempty"` - LicenseId string `json:"licenseId,omitempty"` +type UserSearchCriteria struct { + BaseElasticSearchCriteria } /** - * Controls the policy for requesting user permission to grant access to requested scopes during an OAuth workflow - * for a third-party application. + * User comment search response * * @author Spencer Witt */ -type OAuthScopeConsentMode string - -func (e OAuthScopeConsentMode) String() string { - return string(e) -} - -const ( - OAuthScopeConsentMode_AlwaysPrompt OAuthScopeConsentMode = "AlwaysPrompt" - OAuthScopeConsentMode_RememberDecision OAuthScopeConsentMode = "RememberDecision" - OAuthScopeConsentMode_NeverPrompt OAuthScopeConsentMode = "NeverPrompt" -) - -/** - * @author Michael Sleevi - */ -type MessageTemplateResponse struct { +type UserCommentSearchResponse struct { BaseHTTPResponse - MessageTemplate MessageTemplate `json:"messageTemplate,omitempty"` - MessageTemplates []MessageTemplate `json:"messageTemplates,omitempty"` + Total int64 `json:"total,omitempty"` + UserComments []UserComment `json:"userComments,omitempty"` } -func (b *MessageTemplateResponse) SetStatus(status int) { +func (b *UserCommentSearchResponse) SetStatus(status int) { b.StatusCode = status } /** - * @author Brett Pontarelli + * @author Daniel DeGroff */ -type IdentityProviderLoginMethod string - -func (e IdentityProviderLoginMethod) String() string { - return string(e) +type IdentityProviderRequest struct { + IdentityProvider BaseIdentityProvider `json:"identityProvider,omitempty"` } -const ( - IdentityProviderLoginMethod_UsePopup IdentityProviderLoginMethod = "UsePopup" - IdentityProviderLoginMethod_UseRedirect IdentityProviderLoginMethod = "UseRedirect" - IdentityProviderLoginMethod_UseVendorJavaScript IdentityProviderLoginMethod = "UseVendorJavaScript" -) - /** - * @author Brett Guy + * Search criteria for Identity Providers. + * + * @author Spencer Witt */ -type MessengerRequest struct { - Messenger BaseMessengerConfiguration `json:"messenger,omitempty"` +type IdentityProviderSearchCriteria struct { + BaseSearchCriteria + ApplicationId string `json:"applicationId,omitempty"` + Name string `json:"name,omitempty"` + Type IdentityProviderType `json:"type,omitempty"` } /** - * Request for the Tenant API to delete a tenant rather than using the URL parameters. + * Standard error domain object that can also be used as the response from an API call. * * @author Brian Pontarelli */ -type TenantDeleteRequest struct { - BaseEventRequest - Async bool `json:"async"` +type Errors struct { + FieldErrors map[string][]Error `json:"fieldErrors,omitempty"` + GeneralErrors []Error `json:"generalErrors,omitempty"` +} + +func (e Errors) Present() bool { + return len(e.FieldErrors) != 0 || len(e.GeneralErrors) != 0 +} + +func (e Errors) Error() string { + var messages []string + for _, generalError := range e.GeneralErrors { + messages = append(messages, generalError.Message) + } + for fieldName, fieldErrors := range e.FieldErrors { + var fieldMessages []string + for _, fieldError := range fieldErrors { + fieldMessages = append(fieldMessages, fieldError.Message) + } + messages = append(messages, fmt.Sprintf("%s: %s", fieldName, strings.Join(fieldMessages, ","))) + } + return strings.Join(messages, " ") } /** - * An Event "event" to indicate an event log was created. + * Defines an error. * - * @author Daniel DeGroff + * @author Brian Pontarelli */ -type EventLogCreateEvent struct { - BaseEvent - EventLog EventLog `json:"eventLog,omitempty"` +type Error struct { + Code string `json:"code,omitempty"` + Data map[string]interface{} `json:"data,omitempty"` + Message string `json:"message,omitempty"` } /** - * The possible result states of a webhook event. This tracks the success of the overall webhook transaction according to the {@link TransactionType} - * and configured webhooks. + * Available JSON Web Algorithms (JWA) as described in RFC 7518 available for this JWT implementation. * - * @author Spencer Witt + * @author Daniel DeGroff */ -type WebhookEventResult string +type Algorithm string -func (e WebhookEventResult) String() string { +func (e Algorithm) String() string { return string(e) } const ( - WebhookEventResult_Failed WebhookEventResult = "Failed" - WebhookEventResult_Running WebhookEventResult = "Running" - WebhookEventResult_Succeeded WebhookEventResult = "Succeeded" + Algorithm_ES256 Algorithm = "ES256" + Algorithm_ES384 Algorithm = "ES384" + Algorithm_ES512 Algorithm = "ES512" + Algorithm_HS256 Algorithm = "HS256" + Algorithm_HS384 Algorithm = "HS384" + Algorithm_HS512 Algorithm = "HS512" + Algorithm_PS256 Algorithm = "PS256" + Algorithm_PS384 Algorithm = "PS384" + Algorithm_PS512 Algorithm = "PS512" + Algorithm_RS256 Algorithm = "RS256" + Algorithm_RS384 Algorithm = "RS384" + Algorithm_RS512 Algorithm = "RS512" + Algorithm_None Algorithm = "none" ) -type UniqueUsernameConfiguration struct { - Enableable - NumberOfDigits int `json:"numberOfDigits,omitempty"` - Separator string `json:"separator,omitempty"` - Strategy UniqueUsernameStrategy `json:"strategy,omitempty"` -} - -/** - * @author Daniel DeGroff - */ -type SAMLv2IdPInitiatedApplicationConfiguration struct { - BaseIdentityProviderApplicationConfiguration -} - /** - * Event log response. + * JSON Web Token (JWT) as defined by RFC 7519. + *

+ * From RFC 7519 Section 1. Introduction:
+ *    The suggested pronunciation of JWT is the same as the English word "jot".
+ * 
+ * The JWT is not Thread-Safe and should not be re-used. * * @author Daniel DeGroff */ -type EventLogResponse struct { - BaseHTTPResponse - EventLog EventLog `json:"eventLog,omitempty"` -} - -func (b *EventLogResponse) SetStatus(status int) { - b.StatusCode = status +type JWT struct { + Aud interface{} `json:"aud,omitempty"` + Exp int64 `json:"exp,omitempty"` + Iat int64 `json:"iat,omitempty"` + Iss string `json:"iss,omitempty"` + Jti string `json:"jti,omitempty"` + Nbf int64 `json:"nbf,omitempty"` + OtherClaims map[string]interface{} `json:"otherClaims,omitempty"` + Sub string `json:"sub,omitempty"` } /** + * A JSON Web Key as defined by RFC 7517 JSON Web Key (JWK) + * Section 4 and RFC 7518 JSON Web Algorithms (JWA). + * * @author Daniel DeGroff */ -type TenantRegistrationConfiguration struct { - BlockedDomains []string `json:"blockedDomains,omitempty"` +type JSONWebKey struct { + Alg Algorithm `json:"alg,omitempty"` + Crv string `json:"crv,omitempty"` + D string `json:"d,omitempty"` + Dp string `json:"dp,omitempty"` + Dq string `json:"dq,omitempty"` + E string `json:"e,omitempty"` + Kid string `json:"kid,omitempty"` + Kty KeyType `json:"kty,omitempty"` + N string `json:"n,omitempty"` + Other map[string]interface{} `json:"other,omitempty"` + P string `json:"p,omitempty"` + Q string `json:"q,omitempty"` + Qi string `json:"qi,omitempty"` + Use string `json:"use,omitempty"` + X string `json:"x,omitempty"` + X5c []string `json:"x5c,omitempty"` + X5t string `json:"x5t,omitempty"` + X5t_S256 string `json:"x5t#S256,omitempty"` + Y string `json:"y,omitempty"` } diff --git a/pkg/fusionauth/Domain_dynamic_test.go b/pkg/fusionauth/Domain_dynamic_test.go index a64937a..a1d3510 100644 --- a/pkg/fusionauth/Domain_dynamic_test.go +++ b/pkg/fusionauth/Domain_dynamic_test.go @@ -21,332 +21,332 @@ import ( "testing" ) -func Test_FormDataTypeImplementsStringer(t *testing.T) { - var enum interface{} = FormDataType("Test") +func Test_GrantTypeImplementsStringer(t *testing.T) { + var enum interface{} = GrantType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("FormDataType does not implement stringer interface\n") + t.Errorf("GrantType does not implement stringer interface\n") } } -func Test_BreachedPasswordStatusImplementsStringer(t *testing.T) { - var enum interface{} = BreachedPasswordStatus("Test") +func Test_AttestationTypeImplementsStringer(t *testing.T) { + var enum interface{} = AttestationType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("BreachedPasswordStatus does not implement stringer interface\n") + t.Errorf("AttestationType does not implement stringer interface\n") } } -func Test_ConsentStatusImplementsStringer(t *testing.T) { - var enum interface{} = ConsentStatus("Test") +func Test_EmailSecurityTypeImplementsStringer(t *testing.T) { + var enum interface{} = EmailSecurityType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("ConsentStatus does not implement stringer interface\n") + t.Errorf("EmailSecurityType does not implement stringer interface\n") } } -func Test_ApplicationMultiFactorTrustPolicyImplementsStringer(t *testing.T) { - var enum interface{} = ApplicationMultiFactorTrustPolicy("Test") +func Test_UniqueUsernameStrategyImplementsStringer(t *testing.T) { + var enum interface{} = UniqueUsernameStrategy("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("ApplicationMultiFactorTrustPolicy does not implement stringer interface\n") + t.Errorf("UniqueUsernameStrategy does not implement stringer interface\n") } } -func Test_UserStateImplementsStringer(t *testing.T) { - var enum interface{} = UserState("Test") +func Test_TokenTypeImplementsStringer(t *testing.T) { + var enum interface{} = TokenType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("UserState does not implement stringer interface\n") + t.Errorf("TokenType does not implement stringer interface\n") } } -func Test_GrantTypeImplementsStringer(t *testing.T) { - var enum interface{} = GrantType("Test") +func Test_ContentStatusImplementsStringer(t *testing.T) { + var enum interface{} = ContentStatus("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("GrantType does not implement stringer interface\n") + t.Errorf("ContentStatus does not implement stringer interface\n") } } -func Test_OAuthApplicationRelationshipImplementsStringer(t *testing.T) { - var enum interface{} = OAuthApplicationRelationship("Test") +func Test_LogoutBehaviorImplementsStringer(t *testing.T) { + var enum interface{} = LogoutBehavior("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("OAuthApplicationRelationship does not implement stringer interface\n") + t.Errorf("LogoutBehavior does not implement stringer interface\n") } } -func Test_ReactorFeatureStatusImplementsStringer(t *testing.T) { - var enum interface{} = ReactorFeatureStatus("Test") +func Test_FamilyRoleImplementsStringer(t *testing.T) { + var enum interface{} = FamilyRole("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("ReactorFeatureStatus does not implement stringer interface\n") + t.Errorf("FamilyRole does not implement stringer interface\n") } } -func Test_ThemeTypeImplementsStringer(t *testing.T) { - var enum interface{} = ThemeType("Test") +func Test_CoseAlgorithmIdentifierImplementsStringer(t *testing.T) { + var enum interface{} = CoseAlgorithmIdentifier("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("ThemeType does not implement stringer interface\n") + t.Errorf("CoseAlgorithmIdentifier does not implement stringer interface\n") } } -func Test_ProofKeyForCodeExchangePolicyImplementsStringer(t *testing.T) { - var enum interface{} = ProofKeyForCodeExchangePolicy("Test") +func Test_ReactorFeatureStatusImplementsStringer(t *testing.T) { + var enum interface{} = ReactorFeatureStatus("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("ProofKeyForCodeExchangePolicy does not implement stringer interface\n") + t.Errorf("ReactorFeatureStatus does not implement stringer interface\n") } } -func Test_TokenTypeImplementsStringer(t *testing.T) { - var enum interface{} = TokenType("Test") +func Test_UnverifiedBehaviorImplementsStringer(t *testing.T) { + var enum interface{} = UnverifiedBehavior("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("TokenType does not implement stringer interface\n") + t.Errorf("UnverifiedBehavior does not implement stringer interface\n") } } -func Test_XMLSignatureLocationImplementsStringer(t *testing.T) { - var enum interface{} = XMLSignatureLocation("Test") +func Test_MessengerTypeImplementsStringer(t *testing.T) { + var enum interface{} = MessengerType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("XMLSignatureLocation does not implement stringer interface\n") + t.Errorf("MessengerType does not implement stringer interface\n") } } -func Test_AuthenticatorAttachmentPreferenceImplementsStringer(t *testing.T) { - var enum interface{} = AuthenticatorAttachmentPreference("Test") +func Test_BreachActionImplementsStringer(t *testing.T) { + var enum interface{} = BreachAction("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("AuthenticatorAttachmentPreference does not implement stringer interface\n") + t.Errorf("BreachAction does not implement stringer interface\n") } } -func Test_IPAccessControlEntryActionImplementsStringer(t *testing.T) { - var enum interface{} = IPAccessControlEntryAction("Test") +func Test_BreachMatchModeImplementsStringer(t *testing.T) { + var enum interface{} = BreachMatchMode("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("IPAccessControlEntryAction does not implement stringer interface\n") + t.Errorf("BreachMatchMode does not implement stringer interface\n") } } -func Test_MessageTypeImplementsStringer(t *testing.T) { - var enum interface{} = MessageType("Test") +func Test_FormFieldAdminPolicyImplementsStringer(t *testing.T) { + var enum interface{} = FormFieldAdminPolicy("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("MessageType does not implement stringer interface\n") + t.Errorf("FormFieldAdminPolicy does not implement stringer interface\n") } } -func Test_ContentStatusImplementsStringer(t *testing.T) { - var enum interface{} = ContentStatus("Test") +func Test_AttestationConveyancePreferenceImplementsStringer(t *testing.T) { + var enum interface{} = AttestationConveyancePreference("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("ContentStatus does not implement stringer interface\n") + t.Errorf("AttestationConveyancePreference does not implement stringer interface\n") } } -func Test_FormControlImplementsStringer(t *testing.T) { - var enum interface{} = FormControl("Test") +func Test_WebhookEventResultImplementsStringer(t *testing.T) { + var enum interface{} = WebhookEventResult("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("FormControl does not implement stringer interface\n") + t.Errorf("WebhookEventResult does not implement stringer interface\n") } } -func Test_BreachMatchModeImplementsStringer(t *testing.T) { - var enum interface{} = BreachMatchMode("Test") +func Test_WebAuthnWorkflowImplementsStringer(t *testing.T) { + var enum interface{} = WebAuthnWorkflow("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("BreachMatchMode does not implement stringer interface\n") + t.Errorf("WebAuthnWorkflow does not implement stringer interface\n") } } -func Test_CoseKeyTypeImplementsStringer(t *testing.T) { - var enum interface{} = CoseKeyType("Test") +func Test_ConsentStatusImplementsStringer(t *testing.T) { + var enum interface{} = ConsentStatus("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("CoseKeyType does not implement stringer interface\n") + t.Errorf("ConsentStatus does not implement stringer interface\n") } } -func Test_SAMLv2DestinationAssertionPolicyImplementsStringer(t *testing.T) { - var enum interface{} = SAMLv2DestinationAssertionPolicy("Test") +func Test_HTTPMethodImplementsStringer(t *testing.T) { + var enum interface{} = HTTPMethod("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("SAMLv2DestinationAssertionPolicy does not implement stringer interface\n") + t.Errorf("HTTPMethod does not implement stringer interface\n") } } -func Test_PublicKeyCredentialTypeImplementsStringer(t *testing.T) { - var enum interface{} = PublicKeyCredentialType("Test") +func Test_UserStateImplementsStringer(t *testing.T) { + var enum interface{} = UserState("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("PublicKeyCredentialType does not implement stringer interface\n") + t.Errorf("UserState does not implement stringer interface\n") } } -func Test_FormFieldAdminPolicyImplementsStringer(t *testing.T) { - var enum interface{} = FormFieldAdminPolicy("Test") +func Test_RefreshTokenExpirationPolicyImplementsStringer(t *testing.T) { + var enum interface{} = RefreshTokenExpirationPolicy("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("FormFieldAdminPolicy does not implement stringer interface\n") + t.Errorf("RefreshTokenExpirationPolicy does not implement stringer interface\n") } } -func Test_HTTPMethodImplementsStringer(t *testing.T) { - var enum interface{} = HTTPMethod("Test") +func Test_KeyUseImplementsStringer(t *testing.T) { + var enum interface{} = KeyUse("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("HTTPMethod does not implement stringer interface\n") + t.Errorf("KeyUse does not implement stringer interface\n") } } -func Test_CoseAlgorithmIdentifierImplementsStringer(t *testing.T) { - var enum interface{} = CoseAlgorithmIdentifier("Test") +func Test_BreachedPasswordStatusImplementsStringer(t *testing.T) { + var enum interface{} = BreachedPasswordStatus("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("CoseAlgorithmIdentifier does not implement stringer interface\n") + t.Errorf("BreachedPasswordStatus does not implement stringer interface\n") } } -func Test_LambdaTypeImplementsStringer(t *testing.T) { - var enum interface{} = LambdaType("Test") +func Test_FormControlImplementsStringer(t *testing.T) { + var enum interface{} = FormControl("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("LambdaType does not implement stringer interface\n") + t.Errorf("FormControl does not implement stringer interface\n") } } -func Test_AttestationConveyancePreferenceImplementsStringer(t *testing.T) { - var enum interface{} = AttestationConveyancePreference("Test") +func Test_OAuthScopeHandlingPolicyImplementsStringer(t *testing.T) { + var enum interface{} = OAuthScopeHandlingPolicy("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("AttestationConveyancePreference does not implement stringer interface\n") + t.Errorf("OAuthScopeHandlingPolicy does not implement stringer interface\n") } } -func Test_ObjectStateImplementsStringer(t *testing.T) { - var enum interface{} = ObjectState("Test") +func Test_WebhookAttemptResultImplementsStringer(t *testing.T) { + var enum interface{} = WebhookAttemptResult("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("ObjectState does not implement stringer interface\n") + t.Errorf("WebhookAttemptResult does not implement stringer interface\n") } } -func Test_AuthenticationThreatsImplementsStringer(t *testing.T) { - var enum interface{} = AuthenticationThreats("Test") +func Test_EventLogTypeImplementsStringer(t *testing.T) { + var enum interface{} = EventLogType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("AuthenticationThreats does not implement stringer interface\n") + t.Errorf("EventLogType does not implement stringer interface\n") } } -func Test_ResidentKeyRequirementImplementsStringer(t *testing.T) { - var enum interface{} = ResidentKeyRequirement("Test") +func Test_TransactionTypeImplementsStringer(t *testing.T) { + var enum interface{} = TransactionType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("ResidentKeyRequirement does not implement stringer interface\n") + t.Errorf("TransactionType does not implement stringer interface\n") } } -func Test_ClientAuthenticationPolicyImplementsStringer(t *testing.T) { - var enum interface{} = ClientAuthenticationPolicy("Test") +func Test_CoseKeyTypeImplementsStringer(t *testing.T) { + var enum interface{} = CoseKeyType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("ClientAuthenticationPolicy does not implement stringer interface\n") + t.Errorf("CoseKeyType does not implement stringer interface\n") } } -func Test_RefreshTokenUsagePolicyImplementsStringer(t *testing.T) { - var enum interface{} = RefreshTokenUsagePolicy("Test") +func Test_ThemeTypeImplementsStringer(t *testing.T) { + var enum interface{} = ThemeType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("RefreshTokenUsagePolicy does not implement stringer interface\n") + t.Errorf("ThemeType does not implement stringer interface\n") } } -func Test_WebhookAttemptResultImplementsStringer(t *testing.T) { - var enum interface{} = WebhookAttemptResult("Test") +func Test_ConnectorTypeImplementsStringer(t *testing.T) { + var enum interface{} = ConnectorType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("WebhookAttemptResult does not implement stringer interface\n") + t.Errorf("ConnectorType does not implement stringer interface\n") } } -func Test_DeviceTypeImplementsStringer(t *testing.T) { - var enum interface{} = DeviceType("Test") +func Test_ProofKeyForCodeExchangePolicyImplementsStringer(t *testing.T) { + var enum interface{} = ProofKeyForCodeExchangePolicy("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("DeviceType does not implement stringer interface\n") + t.Errorf("ProofKeyForCodeExchangePolicy does not implement stringer interface\n") } } -func Test_CaptchaMethodImplementsStringer(t *testing.T) { - var enum interface{} = CaptchaMethod("Test") +func Test_MessageTypeImplementsStringer(t *testing.T) { + var enum interface{} = MessageType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("CaptchaMethod does not implement stringer interface\n") + t.Errorf("MessageType does not implement stringer interface\n") } } -func Test_KeyAlgorithmImplementsStringer(t *testing.T) { - var enum interface{} = KeyAlgorithm("Test") +func Test_ResidentKeyRequirementImplementsStringer(t *testing.T) { + var enum interface{} = ResidentKeyRequirement("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("KeyAlgorithm does not implement stringer interface\n") + t.Errorf("ResidentKeyRequirement does not implement stringer interface\n") } } -func Test_FormTypeImplementsStringer(t *testing.T) { - var enum interface{} = FormType("Test") +func Test_ChangePasswordReasonImplementsStringer(t *testing.T) { + var enum interface{} = ChangePasswordReason("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("FormType does not implement stringer interface\n") + t.Errorf("ChangePasswordReason does not implement stringer interface\n") } } -func Test_AttestationTypeImplementsStringer(t *testing.T) { - var enum interface{} = AttestationType("Test") +func Test_LDAPSecurityMethodImplementsStringer(t *testing.T) { + var enum interface{} = LDAPSecurityMethod("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("AttestationType does not implement stringer interface\n") + t.Errorf("LDAPSecurityMethod does not implement stringer interface\n") } } -func Test_KeyTypeImplementsStringer(t *testing.T) { - var enum interface{} = KeyType("Test") +func Test_Oauth2AuthorizedURLValidationPolicyImplementsStringer(t *testing.T) { + var enum interface{} = Oauth2AuthorizedURLValidationPolicy("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("KeyType does not implement stringer interface\n") + t.Errorf("Oauth2AuthorizedURLValidationPolicy does not implement stringer interface\n") } } -func Test_ConnectorTypeImplementsStringer(t *testing.T) { - var enum interface{} = ConnectorType("Test") +func Test_AuthenticatorAttachmentImplementsStringer(t *testing.T) { + var enum interface{} = AuthenticatorAttachment("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("ConnectorType does not implement stringer interface\n") + t.Errorf("AuthenticatorAttachment does not implement stringer interface\n") } } -func Test_MultiFactorLoginPolicyImplementsStringer(t *testing.T) { - var enum interface{} = MultiFactorLoginPolicy("Test") +func Test_IdentityProviderLoginMethodImplementsStringer(t *testing.T) { + var enum interface{} = IdentityProviderLoginMethod("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("MultiFactorLoginPolicy does not implement stringer interface\n") + t.Errorf("IdentityProviderLoginMethod does not implement stringer interface\n") } } -func Test_AuthenticatorAttachmentImplementsStringer(t *testing.T) { - var enum interface{} = AuthenticatorAttachment("Test") +func Test_RefreshTokenUsagePolicyImplementsStringer(t *testing.T) { + var enum interface{} = RefreshTokenUsagePolicy("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("AuthenticatorAttachment does not implement stringer interface\n") + t.Errorf("RefreshTokenUsagePolicy does not implement stringer interface\n") } } -func Test_CoseEllipticCurveImplementsStringer(t *testing.T) { - var enum interface{} = CoseEllipticCurve("Test") +func Test_SAMLv2DestinationAssertionPolicyImplementsStringer(t *testing.T) { + var enum interface{} = SAMLv2DestinationAssertionPolicy("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("CoseEllipticCurve does not implement stringer interface\n") + t.Errorf("SAMLv2DestinationAssertionPolicy does not implement stringer interface\n") } } -func Test_LoginIdTypeImplementsStringer(t *testing.T) { - var enum interface{} = LoginIdType("Test") +func Test_OAuthErrorReasonImplementsStringer(t *testing.T) { + var enum interface{} = OAuthErrorReason("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("LoginIdType does not implement stringer interface\n") + t.Errorf("OAuthErrorReason does not implement stringer interface\n") } } -func Test_RegistrationTypeImplementsStringer(t *testing.T) { - var enum interface{} = RegistrationType("Test") +func Test_OAuthErrorTypeImplementsStringer(t *testing.T) { + var enum interface{} = OAuthErrorType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("RegistrationType does not implement stringer interface\n") + t.Errorf("OAuthErrorType does not implement stringer interface\n") } } -func Test_RefreshTokenExpirationPolicyImplementsStringer(t *testing.T) { - var enum interface{} = RefreshTokenExpirationPolicy("Test") +func Test_DeviceTypeImplementsStringer(t *testing.T) { + var enum interface{} = DeviceType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("RefreshTokenExpirationPolicy does not implement stringer interface\n") + t.Errorf("DeviceType does not implement stringer interface\n") } } -func Test_UnverifiedBehaviorImplementsStringer(t *testing.T) { - var enum interface{} = UnverifiedBehavior("Test") +func Test_ApplicationMultiFactorTrustPolicyImplementsStringer(t *testing.T) { + var enum interface{} = ApplicationMultiFactorTrustPolicy("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("UnverifiedBehavior does not implement stringer interface\n") + t.Errorf("ApplicationMultiFactorTrustPolicy does not implement stringer interface\n") } } -func Test_UserActionPhaseImplementsStringer(t *testing.T) { - var enum interface{} = UserActionPhase("Test") +func Test_RateLimitedRequestTypeImplementsStringer(t *testing.T) { + var enum interface{} = RateLimitedRequestType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("UserActionPhase does not implement stringer interface\n") + t.Errorf("RateLimitedRequestType does not implement stringer interface\n") } } @@ -357,254 +357,254 @@ func Test_LambdaEngineTypeImplementsStringer(t *testing.T) { } } -func Test_OAuthErrorTypeImplementsStringer(t *testing.T) { - var enum interface{} = OAuthErrorType("Test") +func Test_UserVerificationRequirementImplementsStringer(t *testing.T) { + var enum interface{} = UserVerificationRequirement("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("OAuthErrorType does not implement stringer interface\n") + t.Errorf("UserVerificationRequirement does not implement stringer interface\n") } } -func Test_SortImplementsStringer(t *testing.T) { - var enum interface{} = Sort("Test") +func Test_ExpiryUnitImplementsStringer(t *testing.T) { + var enum interface{} = ExpiryUnit("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("Sort does not implement stringer interface\n") + t.Errorf("ExpiryUnit does not implement stringer interface\n") } } -func Test_SAMLLogoutBehaviorImplementsStringer(t *testing.T) { - var enum interface{} = SAMLLogoutBehavior("Test") +func Test_ClientAuthenticationPolicyImplementsStringer(t *testing.T) { + var enum interface{} = ClientAuthenticationPolicy("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("SAMLLogoutBehavior does not implement stringer interface\n") + t.Errorf("ClientAuthenticationPolicy does not implement stringer interface\n") } } -func Test_IdentityProviderLinkingStrategyImplementsStringer(t *testing.T) { - var enum interface{} = IdentityProviderLinkingStrategy("Test") +func Test_FormTypeImplementsStringer(t *testing.T) { + var enum interface{} = FormType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("IdentityProviderLinkingStrategy does not implement stringer interface\n") + t.Errorf("FormType does not implement stringer interface\n") } } -func Test_BreachActionImplementsStringer(t *testing.T) { - var enum interface{} = BreachAction("Test") +func Test_CanonicalizationMethodImplementsStringer(t *testing.T) { + var enum interface{} = CanonicalizationMethod("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("BreachAction does not implement stringer interface\n") + t.Errorf("CanonicalizationMethod does not implement stringer interface\n") } } -func Test_EventLogTypeImplementsStringer(t *testing.T) { - var enum interface{} = EventLogType("Test") +func Test_SecureGeneratorTypeImplementsStringer(t *testing.T) { + var enum interface{} = SecureGeneratorType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("EventLogType does not implement stringer interface\n") + t.Errorf("SecureGeneratorType does not implement stringer interface\n") } } -func Test_AlgorithmImplementsStringer(t *testing.T) { - var enum interface{} = Algorithm("Test") +func Test_FormDataTypeImplementsStringer(t *testing.T) { + var enum interface{} = FormDataType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("Algorithm does not implement stringer interface\n") + t.Errorf("FormDataType does not implement stringer interface\n") } } -func Test_KeyUseImplementsStringer(t *testing.T) { - var enum interface{} = KeyUse("Test") +func Test_IdentityProviderLinkingStrategyImplementsStringer(t *testing.T) { + var enum interface{} = IdentityProviderLinkingStrategy("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("KeyUse does not implement stringer interface\n") + t.Errorf("IdentityProviderLinkingStrategy does not implement stringer interface\n") } } -func Test_FamilyRoleImplementsStringer(t *testing.T) { - var enum interface{} = FamilyRole("Test") +func Test_MultiFactorLoginPolicyImplementsStringer(t *testing.T) { + var enum interface{} = MultiFactorLoginPolicy("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("FamilyRole does not implement stringer interface\n") + t.Errorf("MultiFactorLoginPolicy does not implement stringer interface\n") } } -func Test_TransactionTypeImplementsStringer(t *testing.T) { - var enum interface{} = TransactionType("Test") +func Test_IPAccessControlEntryActionImplementsStringer(t *testing.T) { + var enum interface{} = IPAccessControlEntryAction("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("TransactionType does not implement stringer interface\n") + t.Errorf("IPAccessControlEntryAction does not implement stringer interface\n") } } -func Test_UserVerificationRequirementImplementsStringer(t *testing.T) { - var enum interface{} = UserVerificationRequirement("Test") +func Test_UserActionPhaseImplementsStringer(t *testing.T) { + var enum interface{} = UserActionPhase("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("UserVerificationRequirement does not implement stringer interface\n") + t.Errorf("UserActionPhase does not implement stringer interface\n") } } -func Test_SteamAPIModeImplementsStringer(t *testing.T) { - var enum interface{} = SteamAPIMode("Test") +func Test_LambdaTypeImplementsStringer(t *testing.T) { + var enum interface{} = LambdaType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("SteamAPIMode does not implement stringer interface\n") + t.Errorf("LambdaType does not implement stringer interface\n") } } -func Test_ChangePasswordReasonImplementsStringer(t *testing.T) { - var enum interface{} = ChangePasswordReason("Test") +func Test_SystemTrustedProxyConfigurationPolicyImplementsStringer(t *testing.T) { + var enum interface{} = SystemTrustedProxyConfigurationPolicy("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("ChangePasswordReason does not implement stringer interface\n") + t.Errorf("SystemTrustedProxyConfigurationPolicy does not implement stringer interface\n") } } -func Test_EmailSecurityTypeImplementsStringer(t *testing.T) { - var enum interface{} = EmailSecurityType("Test") +func Test_LoginIdTypeImplementsStringer(t *testing.T) { + var enum interface{} = LoginIdType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("EmailSecurityType does not implement stringer interface\n") + t.Errorf("LoginIdType does not implement stringer interface\n") } } -func Test_ExpiryUnitImplementsStringer(t *testing.T) { - var enum interface{} = ExpiryUnit("Test") +func Test_RegistrationTypeImplementsStringer(t *testing.T) { + var enum interface{} = RegistrationType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("ExpiryUnit does not implement stringer interface\n") + t.Errorf("RegistrationType does not implement stringer interface\n") } } -func Test_MessengerTypeImplementsStringer(t *testing.T) { - var enum interface{} = MessengerType("Test") +func Test_SAMLLogoutBehaviorImplementsStringer(t *testing.T) { + var enum interface{} = SAMLLogoutBehavior("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("MessengerType does not implement stringer interface\n") + t.Errorf("SAMLLogoutBehavior does not implement stringer interface\n") } } -func Test_IdentityProviderTypeImplementsStringer(t *testing.T) { - var enum interface{} = IdentityProviderType("Test") +func Test_XMLSignatureLocationImplementsStringer(t *testing.T) { + var enum interface{} = XMLSignatureLocation("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("IdentityProviderType does not implement stringer interface\n") + t.Errorf("XMLSignatureLocation does not implement stringer interface\n") } } -func Test_SystemTrustedProxyConfigurationPolicyImplementsStringer(t *testing.T) { - var enum interface{} = SystemTrustedProxyConfigurationPolicy("Test") +func Test_SortImplementsStringer(t *testing.T) { + var enum interface{} = Sort("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("SystemTrustedProxyConfigurationPolicy does not implement stringer interface\n") + t.Errorf("Sort does not implement stringer interface\n") } } -func Test_EventTypeImplementsStringer(t *testing.T) { - var enum interface{} = EventType("Test") +func Test_AuthenticatorAttachmentPreferenceImplementsStringer(t *testing.T) { + var enum interface{} = AuthenticatorAttachmentPreference("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("EventType does not implement stringer interface\n") + t.Errorf("AuthenticatorAttachmentPreference does not implement stringer interface\n") } } -func Test_TOTPAlgorithmImplementsStringer(t *testing.T) { - var enum interface{} = TOTPAlgorithm("Test") +func Test_PublicKeyCredentialTypeImplementsStringer(t *testing.T) { + var enum interface{} = PublicKeyCredentialType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("TOTPAlgorithm does not implement stringer interface\n") + t.Errorf("PublicKeyCredentialType does not implement stringer interface\n") } } -func Test_LDAPSecurityMethodImplementsStringer(t *testing.T) { - var enum interface{} = LDAPSecurityMethod("Test") +func Test_CoseEllipticCurveImplementsStringer(t *testing.T) { + var enum interface{} = CoseEllipticCurve("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("LDAPSecurityMethod does not implement stringer interface\n") + t.Errorf("CoseEllipticCurve does not implement stringer interface\n") } } -func Test_UniqueUsernameStrategyImplementsStringer(t *testing.T) { - var enum interface{} = UniqueUsernameStrategy("Test") +func Test_KeyAlgorithmImplementsStringer(t *testing.T) { + var enum interface{} = KeyAlgorithm("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("UniqueUsernameStrategy does not implement stringer interface\n") + t.Errorf("KeyAlgorithm does not implement stringer interface\n") } } -func Test_VerificationStrategyImplementsStringer(t *testing.T) { - var enum interface{} = VerificationStrategy("Test") +func Test_KeyTypeImplementsStringer(t *testing.T) { + var enum interface{} = KeyType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("VerificationStrategy does not implement stringer interface\n") + t.Errorf("KeyType does not implement stringer interface\n") } } -func Test_SecureGeneratorTypeImplementsStringer(t *testing.T) { - var enum interface{} = SecureGeneratorType("Test") +func Test_OAuthScopeConsentModeImplementsStringer(t *testing.T) { + var enum interface{} = OAuthScopeConsentMode("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("SecureGeneratorType does not implement stringer interface\n") + t.Errorf("OAuthScopeConsentMode does not implement stringer interface\n") } } -func Test_CanonicalizationMethodImplementsStringer(t *testing.T) { - var enum interface{} = CanonicalizationMethod("Test") +func Test_ObjectStateImplementsStringer(t *testing.T) { + var enum interface{} = ObjectState("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("CanonicalizationMethod does not implement stringer interface\n") + t.Errorf("ObjectState does not implement stringer interface\n") } } -func Test_RateLimitedRequestTypeImplementsStringer(t *testing.T) { - var enum interface{} = RateLimitedRequestType("Test") +func Test_IdentityProviderTypeImplementsStringer(t *testing.T) { + var enum interface{} = IdentityProviderType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("RateLimitedRequestType does not implement stringer interface\n") + t.Errorf("IdentityProviderType does not implement stringer interface\n") } } -func Test_OAuthScopeHandlingPolicyImplementsStringer(t *testing.T) { - var enum interface{} = OAuthScopeHandlingPolicy("Test") +func Test_VerificationStrategyImplementsStringer(t *testing.T) { + var enum interface{} = VerificationStrategy("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("OAuthScopeHandlingPolicy does not implement stringer interface\n") + t.Errorf("VerificationStrategy does not implement stringer interface\n") } } -func Test_LogoutBehaviorImplementsStringer(t *testing.T) { - var enum interface{} = LogoutBehavior("Test") +func Test_TOTPAlgorithmImplementsStringer(t *testing.T) { + var enum interface{} = TOTPAlgorithm("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("LogoutBehavior does not implement stringer interface\n") + t.Errorf("TOTPAlgorithm does not implement stringer interface\n") } } -func Test_Oauth2AuthorizedURLValidationPolicyImplementsStringer(t *testing.T) { - var enum interface{} = Oauth2AuthorizedURLValidationPolicy("Test") +func Test_AuthenticationThreatsImplementsStringer(t *testing.T) { + var enum interface{} = AuthenticationThreats("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("Oauth2AuthorizedURLValidationPolicy does not implement stringer interface\n") + t.Errorf("AuthenticationThreats does not implement stringer interface\n") } } -func Test_WebAuthnWorkflowImplementsStringer(t *testing.T) { - var enum interface{} = WebAuthnWorkflow("Test") +func Test_SteamAPIModeImplementsStringer(t *testing.T) { + var enum interface{} = SteamAPIMode("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("WebAuthnWorkflow does not implement stringer interface\n") + t.Errorf("SteamAPIMode does not implement stringer interface\n") } } -func Test_UnknownScopePolicyImplementsStringer(t *testing.T) { - var enum interface{} = UnknownScopePolicy("Test") +func Test_CaptchaMethodImplementsStringer(t *testing.T) { + var enum interface{} = CaptchaMethod("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("UnknownScopePolicy does not implement stringer interface\n") + t.Errorf("CaptchaMethod does not implement stringer interface\n") } } -func Test_OAuthErrorReasonImplementsStringer(t *testing.T) { - var enum interface{} = OAuthErrorReason("Test") +func Test_EventTypeImplementsStringer(t *testing.T) { + var enum interface{} = EventType("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("OAuthErrorReason does not implement stringer interface\n") + t.Errorf("EventType does not implement stringer interface\n") } } -func Test_ClientAuthenticationMethodImplementsStringer(t *testing.T) { - var enum interface{} = ClientAuthenticationMethod("Test") +func Test_UnknownScopePolicyImplementsStringer(t *testing.T) { + var enum interface{} = UnknownScopePolicy("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("ClientAuthenticationMethod does not implement stringer interface\n") + t.Errorf("UnknownScopePolicy does not implement stringer interface\n") } } -func Test_OAuthScopeConsentModeImplementsStringer(t *testing.T) { - var enum interface{} = OAuthScopeConsentMode("Test") +func Test_OAuthApplicationRelationshipImplementsStringer(t *testing.T) { + var enum interface{} = OAuthApplicationRelationship("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("OAuthScopeConsentMode does not implement stringer interface\n") + t.Errorf("OAuthApplicationRelationship does not implement stringer interface\n") } } -func Test_IdentityProviderLoginMethodImplementsStringer(t *testing.T) { - var enum interface{} = IdentityProviderLoginMethod("Test") +func Test_ClientAuthenticationMethodImplementsStringer(t *testing.T) { + var enum interface{} = ClientAuthenticationMethod("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("IdentityProviderLoginMethod does not implement stringer interface\n") + t.Errorf("ClientAuthenticationMethod does not implement stringer interface\n") } } -func Test_WebhookEventResultImplementsStringer(t *testing.T) { - var enum interface{} = WebhookEventResult("Test") +func Test_AlgorithmImplementsStringer(t *testing.T) { + var enum interface{} = Algorithm("Test") if _, ok := enum.(fmt.Stringer); !ok { - t.Errorf("WebhookEventResult does not implement stringer interface\n") + t.Errorf("Algorithm does not implement stringer interface\n") } }