config

package
v0.0.0-...-09efcc3 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 49 Imported by: 6

Documentation

Index

Constants

View Source
const (
	AuthenticationFlowSignupFlowStepTypeIdentify            = AuthenticationFlowSignupFlowStepType(AuthenticationFlowStepTypeIdentify)
	AuthenticationFlowSignupFlowStepTypeCreateAuthenticator = AuthenticationFlowSignupFlowStepType(AuthenticationFlowStepTypeCreateAuthenticator)
	AuthenticationFlowSignupFlowStepTypeVerify              = AuthenticationFlowSignupFlowStepType(AuthenticationFlowStepTypeVerify)
	AuthenticationFlowSignupFlowStepTypeFillInUserProfile   = AuthenticationFlowSignupFlowStepType(AuthenticationFlowStepTypeFillInUserProfile)
	AuthenticationFlowSignupFlowStepTypeViewRecoveryCode    = AuthenticationFlowSignupFlowStepType(AuthenticationFlowStepTypeViewRecoveryCode)
	AuthenticationFlowSignupFlowStepTypePromptCreatePasskey = AuthenticationFlowSignupFlowStepType(AuthenticationFlowStepTypePromptCreatePasskey)
)
View Source
const (
	AuthenticationFlowLoginFlowStepTypeIdentify               = AuthenticationFlowLoginFlowStepType(AuthenticationFlowStepTypeIdentify)
	AuthenticationFlowLoginFlowStepTypeAuthenticate           = AuthenticationFlowLoginFlowStepType(AuthenticationFlowStepTypeAuthenticate)
	AuthenticationFlowLoginFlowStepTypeCheckAccountStatus     = AuthenticationFlowLoginFlowStepType(AuthenticationFlowStepTypeCheckAccountStatus)
	AuthenticationFlowLoginFlowStepTypeTerminateOtherSessions = AuthenticationFlowLoginFlowStepType(AuthenticationFlowStepTypeTerminateOtherSessions)
	AuthenticationFlowLoginFlowStepTypeChangePassword         = AuthenticationFlowLoginFlowStepType(AuthenticationFlowStepTypeChangePassword)
	AuthenticationFlowLoginFlowStepTypePromptCreatePasskey    = AuthenticationFlowLoginFlowStepType(AuthenticationFlowStepTypePromptCreatePasskey)
)
View Source
const (
	AuthenticationFlowReauthFlowStepTypeIdentify     = AuthenticationFlowReauthFlowStepType(AuthenticationFlowStepTypeIdentify)
	AuthenticationFlowReauthFlowStepTypeAuthenticate = AuthenticationFlowReauthFlowStepType(AuthenticationFlowStepTypeAuthenticate)
)
View Source
const (
	AuthenticationFlowAccountRecoveryFlowTypeIdentify                  = AuthenticationFlowAccountRecoveryFlowType(AuthenticationFlowStepTypeIdentify)
	AuthenticationFlowAccountRecoveryFlowTypeSelectDestination         = AuthenticationFlowAccountRecoveryFlowType(AuthenticationFlowStepTypeSelectDestination)
	AuthenticationFlowAccountRecoveryFlowTypeVerifyAccountRecoveryCode = AuthenticationFlowAccountRecoveryFlowType(AuthenticationFlowStepTypeVerifyAccountRecoveryCode)
	AuthenticationFlowAccountRecoveryFlowTypeResetPassword             = AuthenticationFlowAccountRecoveryFlowType(AuthenticationFlowStepTypeResetPassword)
)
View Source
const (
	AuthenticationFlowAccountRecoveryIdentificationEmail = AuthenticationFlowAccountRecoveryIdentification(AuthenticationFlowIdentificationEmail)
	AuthenticationFlowAccountRecoveryIdentificationPhone = AuthenticationFlowAccountRecoveryIdentification(AuthenticationFlowIdentificationPhone)
)
View Source
const (
	AuthenticationFlowAccountRecoveryIdentificationOnFailureError  = AuthenticationFlowAccountRecoveryIdentificationOnFailure("error")
	AuthenticationFlowAccountRecoveryIdentificationOnFailureIgnore = AuthenticationFlowAccountRecoveryIdentificationOnFailure("ignore")
)
View Source
const (
	// DefaultIDPSessionLifetime is 52 weeks (364 days).
	DefaultIDPSessionLifetime DurationSeconds = 52 * 7 * 86400
	// DefaultIDPSessionIdleTimeout is 30 days.
	DefaultIDPSessionIdleTimeout DurationSeconds = 30 * 86400
	// DefaultIDPSessionIdleTimeoutEnabled is true.
	DefaultIDPSessionIdleTimeoutEnabled bool = true

	// DefaultRefreshTokenLifetime is DefaultIDPSessionLifetime.
	DefaultRefreshTokenLifetime DurationSeconds = DefaultIDPSessionLifetime
	// DefaultRefreshTokenIdleTimeout is DefaultIDPSessionIdleTimeout.
	DefaultRefreshTokenIdleTimeout DurationSeconds = DefaultIDPSessionIdleTimeout
	// DefaultRefreshTokenIdleTimeoutEnabled is DefaultIDPSessionIdleTimeoutEnabled.
	DefaultRefreshTokenIdleTimeoutEnabled bool = DefaultIDPSessionIdleTimeoutEnabled

	// DefaultAccessTokenLifetime is 30 minutes.
	DefaultAccessTokenLifetime DurationSeconds = 30 * 60
)
View Source
const (
	AccessControlLevelHidden    accesscontrol.Level = 1
	AccessControlLevelReadonly  accesscontrol.Level = 2
	AccessControlLevelReadwrite accesscontrol.Level = 3
)
View Source
const (
	RoleEndUser  accesscontrol.Role = "end_user"
	RoleBearer   accesscontrol.Role = "bearer"
	RolePortalUI accesscontrol.Role = "portal_ui"
)
View Source
const (
	AuthenticationFlowSignupLoginFlowStepTypeIdentify = AuthenticationFlowSignupLoginFlowStepType(AuthenticationFlowStepTypeIdentify)
)

Variables

View Source
var DefaultAccountLinkingLDAPEmailItem = &AccountLinkingLDAPItem{
	AttributeName: &AccountLinkingJSONPointer{Pointer: "/email"},
	UserProfile:   &AccountLinkingJSONPointer{Pointer: "/email"},
	Action:        AccountLinkingActionError,
}
View Source
var DefaultAccountLinkingLDAPPhoneItem = &AccountLinkingLDAPItem{
	AttributeName: &AccountLinkingJSONPointer{Pointer: "/phone_number"},
	UserProfile:   &AccountLinkingJSONPointer{Pointer: "/phone_number"},
	Action:        AccountLinkingActionError,
}
View Source
var DefaultAccountLinkingLDAPUsernameItem = &AccountLinkingLDAPItem{
	AttributeName: &AccountLinkingJSONPointer{Pointer: "/preferred_username"},
	UserProfile:   &AccountLinkingJSONPointer{Pointer: "/preferred_username"},
	Action:        AccountLinkingActionError,
}
View Source
var DefaultAccountLinkingLoginIDEmailItem = &AccountLinkingLoginIDItem{
	UserProfile: &AccountLinkingJSONPointer{Pointer: "/email"},
	Action:      AccountLinkingActionError,
}
View Source
var DefaultAccountLinkingLoginIDPhoneItem = &AccountLinkingLoginIDItem{
	UserProfile: &AccountLinkingJSONPointer{Pointer: "/phone_number"},
	Action:      AccountLinkingActionError,
}
View Source
var DefaultAccountLinkingLoginIDUsernameItem = &AccountLinkingLoginIDItem{
	UserProfile: &AccountLinkingJSONPointer{Pointer: "/preferred_username"},
	Action:      AccountLinkingActionError,
}
View Source
var DefaultAccountLinkingOAuthItem = &AccountLinkingOAuthItem{
	OAuthClaim:  &AccountLinkingJSONPointer{Pointer: "/email"},
	UserProfile: &AccountLinkingJSONPointer{Pointer: "/email"},
	Action:      AccountLinkingActionError,
}
View Source
var FeatureConfigSchema = validation.NewMultipartSchema("FeatureConfig")
View Source
var Schema = validation.NewMultipartSchema("AppConfig")
View Source
var SecretConfigSchema = validation.NewMultipartSchema("SecretConfig")

Functions

func DiffAppConfig

func DiffAppConfig(originalConfig *AppConfig, newConfig *AppConfig) (string, error)

func DumpSchema

func DumpSchema() (string, error)

func DumpSecretConfigSchema

func DumpSecretConfigSchema() (string, error)

func NewSecretMaskLogHook

func NewSecretMaskLogHook(cfg *SecretConfig) logrus.Hook

func OAuthSSOProviderConfigSchemaBuilder

func OAuthSSOProviderConfigSchemaBuilder(builder validation.SchemaBuilder) validation.SchemaBuilder

func PopulateDefaultValues

func PopulateDefaultValues(config *AppConfig)

func PopulateFeatureConfigDefaultValues

func PopulateFeatureConfigDefaultValues(config *FeatureConfig)

func SetFieldDefaults

func SetFieldDefaults(value interface{})

Types

type AWSS3ObjectStoreConfig

type AWSS3ObjectStoreConfig struct {
	BucketName      string `envconfig:"BUCKET_NAME"`
	Region          string `envconfig:"REGION"`
	AccessKeyID     string `envconfig:"ACCESS_KEY_ID"`
	SecretAccessKey string `envconfig:"SECRET_ACCESS_KEY"`
}

func (*AWSS3ObjectStoreConfig) Initialize

func (c *AWSS3ObjectStoreConfig) Initialize(ctx *validation.Context)

func (*AWSS3ObjectStoreConfig) Validate

func (c *AWSS3ObjectStoreConfig) Validate(ctx *validation.Context)

type AbstractObjectStoreConfig

type AbstractObjectStoreConfig struct {
	Type             ObjectStoreType                   `envconfig:"TYPE"`
	AWSS3            AWSS3ObjectStoreConfig            `envconfig:"AWS_S3"`
	GCPGCS           GCPGCSObjectStoreConfig           `envconfig:"GCP_GCS"`
	AzureBlobStorage AzureBlobStorageObjectStoreConfig `envconfig:"AZURE_BLOB_STORAGE"`
	MinIO            MinIOObjectStoreConfig            `envconfig:"MINIO"`
}

AbstractObjectStoreConfig is a type to configure object store for a feature. This type IS NOT intended to be used directly. You should create a new type of this type.

func (*AbstractObjectStoreConfig) Initialize

func (c *AbstractObjectStoreConfig) Initialize(ctx *validation.Context)

func (*AbstractObjectStoreConfig) Validate

func (c *AbstractObjectStoreConfig) Validate(ctx *validation.Context)

type AccessControlLevelString

type AccessControlLevelString string
const (
	AccessControlLevelStringDefault   AccessControlLevelString = ""
	AccessControlLevelStringHidden    AccessControlLevelString = "hidden"
	AccessControlLevelStringReadonly  AccessControlLevelString = "readonly"
	AccessControlLevelStringReadwrite AccessControlLevelString = "readwrite"
)

func (AccessControlLevelString) Level

type AccountAnonymizationConfig

type AccountAnonymizationConfig struct {
	GracePeriod DurationDays `json:"grace_period_days,omitempty"`
}

func (*AccountAnonymizationConfig) SetDefaults

func (c *AccountAnonymizationConfig) SetDefaults()

type AccountDeletionConfig

type AccountDeletionConfig struct {
	ScheduledByEndUserEnabled bool         `json:"scheduled_by_end_user_enabled,omitempty"`
	GracePeriod               DurationDays `json:"grace_period_days,omitempty"`
}

func (*AccountDeletionConfig) SetDefaults

func (c *AccountDeletionConfig) SetDefaults()

type AccountLinkingAction

type AccountLinkingAction string
const (
	AccountLinkingActionError        AccountLinkingAction = "error"
	AccountLinkingActionLoginAndLink AccountLinkingAction = "login_and_link"
)

type AccountLinkingConfig

type AccountLinkingConfig struct {
	OAuth   []*AccountLinkingOAuthItem   `json:"oauth,omitempty"`
	LoginID []*AccountLinkingLoginIDItem `json:"login_id,omitempty"`
}

type AccountLinkingJSONPointer

type AccountLinkingJSONPointer struct {
	Pointer string `json:"pointer,omitempty"`
}

func (*AccountLinkingJSONPointer) MustGetFirstLevelReferenceTokenOrPanic

func (p *AccountLinkingJSONPointer) MustGetFirstLevelReferenceTokenOrPanic() string

func (*AccountLinkingJSONPointer) MustGetOneLevelJSONPointerOrPanic

func (p *AccountLinkingJSONPointer) MustGetOneLevelJSONPointerOrPanic() jsonpointer.T

type AccountLinkingLDAPItem

type AccountLinkingLDAPItem struct {
	Name          string                     `json:"name,omitempty"`
	ServerName    string                     `json:"server_name,omitempty"`
	AttributeName *AccountLinkingJSONPointer `json:"attribute_name,omitempty"`
	UserProfile   *AccountLinkingJSONPointer `json:"user_profile,omitempty"`
	Action        AccountLinkingAction       `json:"action,omitempty"`
}

type AccountLinkingLoginIDItem

type AccountLinkingLoginIDItem struct {
	Name        string                     `json:"name,omitempty"`
	Key         string                     `json:"key,omitempty"`
	UserProfile *AccountLinkingJSONPointer `json:"user_profile,omitempty"`
	Action      AccountLinkingAction       `json:"action,omitempty"`
}

type AccountLinkingOAuthItem

type AccountLinkingOAuthItem struct {
	Name        string                     `json:"name,omitempty"`
	Alias       string                     `json:"alias,omitempty"`
	OAuthClaim  *AccountLinkingJSONPointer `json:"oauth_claim,omitempty"`
	UserProfile *AccountLinkingJSONPointer `json:"user_profile,omitempty"`
	Action      AccountLinkingAction       `json:"action,omitempty"`
}

type AccountMigrationConfig

type AccountMigrationConfig struct {
	Hook *AccountMigrationHookConfig `json:"hook,omitempty"`
}

type AccountMigrationHookConfig

type AccountMigrationHookConfig struct {
	URL     string          `json:"url,omitempty"`
	Timeout DurationSeconds `json:"timeout,omitempty"`
}

func (*AccountMigrationHookConfig) SetDefaults

func (c *AccountMigrationHookConfig) SetDefaults()

type AccountRecoveryChannel

type AccountRecoveryChannel struct {
	Channel AccountRecoveryCodeChannel `json:"channel,omitempty"`
	OTPForm AccountRecoveryCodeForm    `json:"otp_form,omitempty"`
}

func GetAllAccountRecoveryChannel

func GetAllAccountRecoveryChannel() []*AccountRecoveryChannel

type AccountRecoveryCodeChannel

type AccountRecoveryCodeChannel string
const (
	AccountRecoveryCodeChannelSMS      AccountRecoveryCodeChannel = "sms"
	AccountRecoveryCodeChannelEmail    AccountRecoveryCodeChannel = "email"
	AccountRecoveryCodeChannelWhatsapp AccountRecoveryCodeChannel = "whatsapp"
)

type AccountRecoveryCodeForm

type AccountRecoveryCodeForm string
const (
	AccountRecoveryCodeFormLink AccountRecoveryCodeForm = "link"
	AccountRecoveryCodeFormCode AccountRecoveryCodeForm = "code"
)

type AdminAPIAuth

type AdminAPIAuth string
const (
	AdminAPIAuthNone AdminAPIAuth = "none"
	AdminAPIAuthJWT  AdminAPIAuth = "jwt"
)

type AdminAPIAuthKey

type AdminAPIAuthKey struct {
	jwk.Set
}

func (*AdminAPIAuthKey) MarshalJSON

func (c *AdminAPIAuthKey) MarshalJSON() ([]byte, error)

func (*AdminAPIAuthKey) SensitiveStrings

func (c *AdminAPIAuthKey) SensitiveStrings() []string

func (*AdminAPIAuthKey) UnmarshalJSON

func (c *AdminAPIAuthKey) UnmarshalJSON(b []byte) error

type AdminAPIAuthKeyUpdateInstruction

type AdminAPIAuthKeyUpdateInstruction struct {
	Action SecretUpdateInstructionAction `json:"action,omitempty"`

	DeleteData *AdminAPIAuthKeyUpdateInstructionDeleteData `json:"deleteData,omitempty"`
}

func (*AdminAPIAuthKeyUpdateInstruction) ApplyTo

type AdminAPIAuthKeyUpdateInstructionDeleteData

type AdminAPIAuthKeyUpdateInstructionDeleteData struct {
	KeyID string `json:"keyID,omitempty"`
}

type AdminAPIFeatureConfig

type AdminAPIFeatureConfig struct {
	CreateSessionEnabled *bool `json:"create_session_enabled,omitempty"`
	// UserImportUsage is the usage limit on user import API, measured by number of imported users.
	UserImportUsage *UsageLimitConfig `json:"user_import_usage,omitempty"`
	// UserExportUsage is the usage limit on user export API, measured by number of export requests.
	UserExportUsage *UsageLimitConfig `json:"user_export_usage,omitempty"`
}

func (*AdminAPIFeatureConfig) Merge

func (*AdminAPIFeatureConfig) SetDefaults

func (c *AdminAPIFeatureConfig) SetDefaults()

type AllowedFrameAncestors

type AllowedFrameAncestors []string

type AnalyticConfig

type AnalyticConfig struct {
	Enabled bool          `envconfig:"ENABLED" default:"false"`
	Epoch   timeutil.Date `envconfig:"EPOCH"`
}

type AnalyticRedisCredentials

type AnalyticRedisCredentials struct {
	RedisURL string `json:"redis_url,omitempty"`
}

func (*AnalyticRedisCredentials) SensitiveStrings

func (c *AnalyticRedisCredentials) SensitiveStrings() []string

type AppConfig

type AppConfig struct {
	ID AppID `json:"id"`

	HTTP *HTTPConfig `json:"http"`
	Hook *HookConfig `json:"hook,omitempty"`

	UI           *UIConfig           `json:"ui,omitempty"`
	Localization *LocalizationConfig `json:"localization,omitempty"`
	Messaging    *MessagingConfig    `json:"messaging,omitempty"`
	Search       *SearchConfig       `json:"search,omitempty"`

	Authentication       *AuthenticationConfig       `json:"authentication,omitempty"`
	Session              *SessionConfig              `json:"session,omitempty"`
	OAuth                *OAuthConfig                `json:"oauth,omitempty"`
	SAML                 *SAMLConfig                 `json:"saml,omitempty"`
	Identity             *IdentityConfig             `json:"identity,omitempty"`
	Authenticator        *AuthenticatorConfig        `json:"authenticator,omitempty"`
	UserProfile          *UserProfileConfig          `json:"user_profile,omitempty"`
	AccountDeletion      *AccountDeletionConfig      `json:"account_deletion,omitempty"`
	AccountAnonymization *AccountAnonymizationConfig `json:"account_anonymization,omitempty"`
	AccountLinking       *AccountLinkingConfig       `json:"account_linking,omitempty"`

	ForgotPassword            *ForgotPasswordConfig `json:"forgot_password,omitempty"`
	Deprecated_WelcomeMessage *WelcomeMessageConfig `json:"welcome_message,omitempty"`
	Verification              *VerificationConfig   `json:"verification,omitempty"`
	Deprecated_OTP            *OTPLegacyConfig      `json:"otp,omitempty"`

	Deprecated_Web3 *Deprecated_Web3Config `json:"web3,omitempty"`

	GoogleTagManager *GoogleTagManagerConfig `json:"google_tag_manager,omitempty"`

	AccountMigration *AccountMigrationConfig `json:"account_migration,omitempty"`

	Captcha       *CaptchaConfig       `json:"captcha,omitempty"`
	BotProtection *BotProtectionConfig `json:"bot_protection,omitempty"`

	TestMode *TestModeConfig `json:"test_mode,omitempty"`

	AuthenticationFlow *AuthenticationFlowConfig `json:"authentication_flow,omitempty"`
}

func GenerateAppConfigFromOptions

func GenerateAppConfigFromOptions(opts *GenerateAppConfigOptions) *AppConfig

func Parse

func Parse(inputYAML []byte) (*AppConfig, error)

func (*AppConfig) SetDefaults

func (c *AppConfig) SetDefaults()

func (*AppConfig) Validate

func (c *AppConfig) Validate(ctx *validation.Context)

type AppContext

type AppContext struct {
	AppFs     resource.Fs
	PlanFs    resource.Fs
	Resources *resource.Manager
	Config    *Config
	PlanName  string
	Domains   AppDomains
}

type AppDomains

type AppDomains []string

type AppHostSuffixes

type AppHostSuffixes []string

func (AppHostSuffixes) CheckIsDefaultDomain

func (s AppHostSuffixes) CheckIsDefaultDomain(host string) bool

type AppID

type AppID string

type AuditDatabaseCredentials

type AuditDatabaseCredentials struct {
	DatabaseURL    string `json:"database_url,omitempty"`
	DatabaseSchema string `json:"database_schema,omitempty"`
}

func (*AuditDatabaseCredentials) SensitiveStrings

func (c *AuditDatabaseCredentials) SensitiveStrings() []string

func (*AuditDatabaseCredentials) SetDefaults

func (c *AuditDatabaseCredentials) SetDefaults()

type AuditDatabaseCredentialsEnvironmentConfig

type AuditDatabaseCredentialsEnvironmentConfig struct {
	DatabaseURL    string `envconfig:"URL"`
	DatabaseSchema string `envconfig:"SCHEMA" default:"public"`
}

type AuditLogFeatureConfig

type AuditLogFeatureConfig struct {
	RetrievalDays *int `json:"retrieval_days,omitempty"`
}

func (*AuditLogFeatureConfig) Merge

func (*AuditLogFeatureConfig) SetDefaults

func (c *AuditLogFeatureConfig) SetDefaults()

type AuthUISentryDSN

type AuthUISentryDSN string

type AuthUIWindowMessageAllowedOrigins

type AuthUIWindowMessageAllowedOrigins []string

type AuthenticationConfig

type AuthenticationConfig struct {
	Identities                         []model.IdentityType                      `json:"identities,omitempty"`
	PrimaryAuthenticators              *[]model.AuthenticatorType                `json:"primary_authenticators,omitempty"`
	SecondaryAuthenticators            *[]model.AuthenticatorType                `json:"secondary_authenticators,omitempty"`
	SecondaryAuthenticationMode        SecondaryAuthenticationMode               `json:"secondary_authentication_mode,omitempty"`
	SecondaryAuthenticationGracePeriod *SecondaryAuthenticationGracePeriodConfig `json:"secondary_authentication_grace_period,omitempty"`
	DeviceToken                        *DeviceTokenConfig                        `json:"device_token,omitempty"`
	RecoveryCode                       *RecoveryCodeConfig                       `json:"recovery_code,omitempty"`
	PublicSignupDisabled               bool                                      `json:"public_signup_disabled,omitempty"`
	RateLimits                         *AuthenticationRateLimitsConfig           `json:"rate_limits,omitempty"`
	Lockout                            *AuthenticationLockoutConfig              `json:"lockout,omitempty"`
}

func (*AuthenticationConfig) SetDefaults

func (c *AuthenticationConfig) SetDefaults()

type AuthenticationFeatureConfig

type AuthenticationFeatureConfig struct {
	SecondaryAuthenticators *AuthenticatorsFeatureConfig `json:"secondary_authenticators,omitempty"`
}

func (*AuthenticationFeatureConfig) Merge

type AuthenticationFlowAccountLinking

type AuthenticationFlowAccountLinking struct {
	OAuth   []*AuthenticationFlowAccountLinkingOAuthItem   `json:"oauth,omitempty"`
	LoginID []*AuthenticationFlowAccountLinkingLoginIDItem `json:"login_id,omitempty"`
}

type AuthenticationFlowAccountLinkingLoginIDItem

type AuthenticationFlowAccountLinkingLoginIDItem struct {
	Name      string               `json:"name,omitempty"`
	Action    AccountLinkingAction `json:"action,omitempty"`
	LoginFlow string               `json:"login_flow,omitempty"`
}

type AuthenticationFlowAccountLinkingOAuthItem

type AuthenticationFlowAccountLinkingOAuthItem struct {
	Name      string               `json:"name,omitempty"`
	Action    AccountLinkingAction `json:"action,omitempty"`
	LoginFlow string               `json:"login_flow,omitempty"`
}

type AuthenticationFlowAccountRecoveryFlow

type AuthenticationFlowAccountRecoveryFlow struct {
	Name  string                                       `json:"name,omitempty"`
	Steps []*AuthenticationFlowAccountRecoveryFlowStep `json:"steps,omitempty"`
}

func (*AuthenticationFlowAccountRecoveryFlow) GetName

func (*AuthenticationFlowAccountRecoveryFlow) GetSteps

func (*AuthenticationFlowAccountRecoveryFlow) IsFlowObject

func (f *AuthenticationFlowAccountRecoveryFlow) IsFlowObject()

type AuthenticationFlowAccountRecoveryFlowOneOf

type AuthenticationFlowAccountRecoveryFlowOneOf struct {
	Identification AuthenticationFlowAccountRecoveryIdentification          `json:"identification,omitempty"`
	BotProtection  *AuthenticationFlowBotProtection                         `json:"bot_protection,omitempty" nullable:"true"`
	OnFailure      AuthenticationFlowAccountRecoveryIdentificationOnFailure `json:"on_failure,omitempty"`
	Steps          []*AuthenticationFlowAccountRecoveryFlowStep             `json:"steps,omitempty"`
}

func (*AuthenticationFlowAccountRecoveryFlowOneOf) GetBotProtectionConfig

func (*AuthenticationFlowAccountRecoveryFlowOneOf) GetBranchInfo

func (*AuthenticationFlowAccountRecoveryFlowOneOf) GetSteps

func (*AuthenticationFlowAccountRecoveryFlowOneOf) IsFlowObject

type AuthenticationFlowAccountRecoveryFlowStep

type AuthenticationFlowAccountRecoveryFlowStep struct {
	Name string                                    `json:"name,omitempty"`
	Type AuthenticationFlowAccountRecoveryFlowType `json:"type,omitempty"`
	// OneOf is relevant when Type is identify.
	OneOf []*AuthenticationFlowAccountRecoveryFlowOneOf `json:"one_of,omitempty"`
	// EnumerateDestinations is specific to select_destination.
	EnumerateDestinations bool `json:"enumerate_destinations,omitempty"`
	// AllowedChannels is specific to select_destination.
	AllowedChannels []*AccountRecoveryChannel `json:"allowed_channels,omitempty"`
}

func (*AuthenticationFlowAccountRecoveryFlowStep) GetName

func (*AuthenticationFlowAccountRecoveryFlowStep) GetOneOf

func (*AuthenticationFlowAccountRecoveryFlowStep) GetType

func (*AuthenticationFlowAccountRecoveryFlowStep) IsFlowObject

type AuthenticationFlowAccountRecoveryFlowType

type AuthenticationFlowAccountRecoveryFlowType string

type AuthenticationFlowAccountRecoveryIdentification

type AuthenticationFlowAccountRecoveryIdentification AuthenticationFlowIdentification

func (AuthenticationFlowAccountRecoveryIdentification) AuthenticationFlowIdentification

type AuthenticationFlowAccountRecoveryIdentificationOnFailure

type AuthenticationFlowAccountRecoveryIdentificationOnFailure string

type AuthenticationFlowAllowlist

type AuthenticationFlowAllowlist struct {
	Groups []*AuthenticationFlowAllowlistGroup `json:"groups,omitempty"`
	Flows  []*AuthenticationFlowAllowlistFlow  `json:"flows,omitempty"`
}

type AuthenticationFlowAllowlistFlow

type AuthenticationFlowAllowlistFlow struct {
	Type AuthenticationFlowType `json:"type"`
	Name string                 `json:"name"`
}

type AuthenticationFlowAllowlistGroup

type AuthenticationFlowAllowlistGroup struct {
	Name string `json:"name"`
}

type AuthenticationFlowAuthentication

type AuthenticationFlowAuthentication string
const (
	AuthenticationFlowAuthenticationPrimaryPassword      AuthenticationFlowAuthentication = "primary_password"
	AuthenticationFlowAuthenticationPrimaryPasskey       AuthenticationFlowAuthentication = "primary_passkey"
	AuthenticationFlowAuthenticationPrimaryOOBOTPEmail   AuthenticationFlowAuthentication = "primary_oob_otp_email"
	AuthenticationFlowAuthenticationPrimaryOOBOTPSMS     AuthenticationFlowAuthentication = "primary_oob_otp_sms"
	AuthenticationFlowAuthenticationSecondaryPassword    AuthenticationFlowAuthentication = "secondary_password"
	AuthenticationFlowAuthenticationSecondaryTOTP        AuthenticationFlowAuthentication = "secondary_totp"
	AuthenticationFlowAuthenticationSecondaryOOBOTPEmail AuthenticationFlowAuthentication = "secondary_oob_otp_email"
	AuthenticationFlowAuthenticationSecondaryOOBOTPSMS   AuthenticationFlowAuthentication = "secondary_oob_otp_sms"
	AuthenticationFlowAuthenticationRecoveryCode         AuthenticationFlowAuthentication = "recovery_code"
	AuthenticationFlowAuthenticationDeviceToken          AuthenticationFlowAuthentication = "device_token"
)

func (AuthenticationFlowAuthentication) AuthenticatorKind

type AuthenticationFlowBotProtection

type AuthenticationFlowBotProtection struct {
	Mode BotProtectionRiskMode `json:"mode,omitempty"`
}

type AuthenticationFlowConfig

type AuthenticationFlowConfig struct {
	SignupFlows []*AuthenticationFlowSignupFlow `json:"signup_flows,omitempty"`
	// PromoteFlows is intentionally of type AuthenticationFlowSignupFlow
	PromoteFlows         []*AuthenticationFlowSignupFlow          `json:"promote_flows,omitempty"`
	LoginFlows           []*AuthenticationFlowLoginFlow           `json:"login_flows,omitempty"`
	SignupLoginFlows     []*AuthenticationFlowSignupLoginFlow     `json:"signup_login_flows,omitempty"`
	ReauthFlows          []*AuthenticationFlowReauthFlow          `json:"reauth_flows,omitempty"`
	AccountRecoveryFlows []*AuthenticationFlowAccountRecoveryFlow `json:"account_recovery_flows,omitempty"`

	RateLimits *AuthenticationFlowRateLimitsConfig `json:"rate_limits,omitempty"`
}

type AuthenticationFlowIdentification

type AuthenticationFlowIdentification string
const (
	AuthenticationFlowIdentificationEmail    AuthenticationFlowIdentification = "email"
	AuthenticationFlowIdentificationPhone    AuthenticationFlowIdentification = "phone"
	AuthenticationFlowIdentificationUsername AuthenticationFlowIdentification = "username"
	AuthenticationFlowIdentificationOAuth    AuthenticationFlowIdentification = "oauth"
	AuthenticationFlowIdentificationPasskey  AuthenticationFlowIdentification = "passkey"
	AuthenticationFlowIdentificationIDToken  AuthenticationFlowIdentification = "id_token"
	AuthenticationFlowIdentificationLDAP     AuthenticationFlowIdentification = "ldap"
)

func (AuthenticationFlowIdentification) PrimaryAuthentications

func (AuthenticationFlowIdentification) SecondaryAuthentications

type AuthenticationFlowLoginFlow

type AuthenticationFlowLoginFlow struct {
	Name  string                             `json:"name,omitempty"`
	Steps []*AuthenticationFlowLoginFlowStep `json:"steps,omitempty"`
}

func (*AuthenticationFlowLoginFlow) GetName

func (f *AuthenticationFlowLoginFlow) GetName() string

func (*AuthenticationFlowLoginFlow) GetSteps

func (*AuthenticationFlowLoginFlow) IsFlowObject

func (f *AuthenticationFlowLoginFlow) IsFlowObject()

type AuthenticationFlowLoginFlowOneOf

type AuthenticationFlowLoginFlowOneOf struct {
	// Identification is specific to identify.
	Identification AuthenticationFlowIdentification `json:"identification,omitempty"`

	// Authentication is specific to authenticate.
	Authentication AuthenticationFlowAuthentication `json:"authentication,omitempty"`
	// TargetStep is specific to authenticate.
	TargetStep string `json:"target_step,omitempty"`

	// BotProtection is common
	BotProtection *AuthenticationFlowBotProtection `json:"bot_protection,omitempty" nullable:"true"`

	// Steps are common.
	Steps []*AuthenticationFlowLoginFlowStep `json:"steps,omitempty"`
}

func (*AuthenticationFlowLoginFlowOneOf) GetAuthentication

func (*AuthenticationFlowLoginFlowOneOf) GetBotProtectionConfig

func (*AuthenticationFlowLoginFlowOneOf) GetBranchInfo

func (*AuthenticationFlowLoginFlowOneOf) GetSteps

func (*AuthenticationFlowLoginFlowOneOf) GetTargetStepName

func (f *AuthenticationFlowLoginFlowOneOf) GetTargetStepName() string

func (*AuthenticationFlowLoginFlowOneOf) IsFlowObject

func (f *AuthenticationFlowLoginFlowOneOf) IsFlowObject()

func (*AuthenticationFlowLoginFlowOneOf) IsVerificationRequired

func (f *AuthenticationFlowLoginFlowOneOf) IsVerificationRequired() bool

type AuthenticationFlowLoginFlowStep

type AuthenticationFlowLoginFlowStep struct {
	Name string                              `json:"name,omitempty"`
	Type AuthenticationFlowLoginFlowStepType `json:"type,omitempty"`

	// Optional is relevant when Type is authenticate.
	Optional *bool `json:"optional,omitempty"`

	// OneOf is relevant when Type is identify or authenticate.
	OneOf []*AuthenticationFlowLoginFlowOneOf `json:"one_of,omitempty"`

	// TargetStep is relevant when Type is change_password.
	TargetStep string `json:"target_step,omitempty"`
}

func (*AuthenticationFlowLoginFlowStep) GetName

func (*AuthenticationFlowLoginFlowStep) GetOneOf

func (*AuthenticationFlowLoginFlowStep) GetSignupFlowOrLoginFlowOneOf

func (*AuthenticationFlowLoginFlowStep) GetType

func (*AuthenticationFlowLoginFlowStep) IsFlowObject

func (s *AuthenticationFlowLoginFlowStep) IsFlowObject()

func (*AuthenticationFlowLoginFlowStep) IsOptional

func (s *AuthenticationFlowLoginFlowStep) IsOptional() bool

type AuthenticationFlowLoginFlowStepType

type AuthenticationFlowLoginFlowStepType string

type AuthenticationFlowObject

type AuthenticationFlowObject interface {
	IsFlowObject()
}

type AuthenticationFlowObjectAccountLinkingConfigProvider

type AuthenticationFlowObjectAccountLinkingConfigProvider interface {
	GetAccountLinkingConfig() *AuthenticationFlowAccountLinking
}

type AuthenticationFlowObjectBotProtectionConfigProvider

type AuthenticationFlowObjectBotProtectionConfigProvider interface {
	GetBotProtectionConfig() *AuthenticationFlowBotProtection
}

type AuthenticationFlowObjectFlowBranch

type AuthenticationFlowObjectFlowBranch interface {
	AuthenticationFlowObject
	GetSteps() []AuthenticationFlowObject
	GetBranchInfo() AuthenticationFlowObjectFlowBranchInfo
}

type AuthenticationFlowObjectFlowBranchInfo

type AuthenticationFlowObjectFlowBranchInfo struct {
	Identification AuthenticationFlowIdentification `json:"identification,omitempty"`
	Authentication AuthenticationFlowAuthentication `json:"authentication,omitempty"`
}

type AuthenticationFlowObjectFlowRoot

type AuthenticationFlowObjectFlowRoot interface {
	AuthenticationFlowObject
	GetName() string
	GetSteps() []AuthenticationFlowObject
}

type AuthenticationFlowObjectFlowStep

type AuthenticationFlowObjectFlowStep interface {
	AuthenticationFlowObject
	GetName() string
	GetType() AuthenticationFlowStepType
	GetOneOf() []AuthenticationFlowObject
}

type AuthenticationFlowObjectSignupFlowOrLoginFlowOneOf

type AuthenticationFlowObjectSignupFlowOrLoginFlowOneOf interface {
	AuthenticationFlowObjectBotProtectionConfigProvider
	GetAuthentication() AuthenticationFlowAuthentication
	IsVerificationRequired() bool
	GetTargetStepName() string
}

type AuthenticationFlowObjectSignupFlowOrLoginFlowStep

type AuthenticationFlowObjectSignupFlowOrLoginFlowStep interface {
	GetSignupFlowOrLoginFlowOneOf() []AuthenticationFlowObjectSignupFlowOrLoginFlowOneOf
}

type AuthenticationFlowRateLimitsConfig

type AuthenticationFlowRateLimitsConfig struct {
	PerIP *RateLimitConfig `json:"per_ip,omitempty"`
}

func (*AuthenticationFlowRateLimitsConfig) SetDefaults

func (c *AuthenticationFlowRateLimitsConfig) SetDefaults()

type AuthenticationFlowReauthFlow

type AuthenticationFlowReauthFlow struct {
	Name  string                              `json:"name,omitempty"`
	Steps []*AuthenticationFlowReauthFlowStep `json:"steps,omitempty"`
}

func (*AuthenticationFlowReauthFlow) GetName

func (f *AuthenticationFlowReauthFlow) GetName() string

func (*AuthenticationFlowReauthFlow) GetSteps

func (*AuthenticationFlowReauthFlow) IsFlowObject

func (f *AuthenticationFlowReauthFlow) IsFlowObject()

type AuthenticationFlowReauthFlowOneOf

type AuthenticationFlowReauthFlowOneOf struct {
	// Identification is specific to identify.
	Identification AuthenticationFlowIdentification `json:"identification,omitempty"`

	// BotProtection is specific to authenticate.
	BotProtection *AuthenticationFlowBotProtection `json:"bot_protection,omitempty" nullable:"true"`

	// Authentication is specific to authenticate.
	Authentication AuthenticationFlowAuthentication `json:"authentication,omitempty"`

	// Steps are common.
	Steps []*AuthenticationFlowReauthFlowStep `json:"steps,omitempty"`
}

func (*AuthenticationFlowReauthFlowOneOf) GetBotProtectionConfig

func (*AuthenticationFlowReauthFlowOneOf) GetBranchInfo

func (*AuthenticationFlowReauthFlowOneOf) GetSteps

func (*AuthenticationFlowReauthFlowOneOf) IsFlowObject

func (f *AuthenticationFlowReauthFlowOneOf) IsFlowObject()

type AuthenticationFlowReauthFlowStep

type AuthenticationFlowReauthFlowStep struct {
	Name string                               `json:"name,omitempty"`
	Type AuthenticationFlowReauthFlowStepType `json:"type,omitempty"`

	// OneOf is relevant when Type is identify or authenticate.
	OneOf []*AuthenticationFlowReauthFlowOneOf `json:"one_of,omitempty"`
}

func (*AuthenticationFlowReauthFlowStep) GetName

func (*AuthenticationFlowReauthFlowStep) GetOneOf

func (*AuthenticationFlowReauthFlowStep) GetType

func (*AuthenticationFlowReauthFlowStep) IsFlowObject

func (s *AuthenticationFlowReauthFlowStep) IsFlowObject()

type AuthenticationFlowReauthFlowStepType

type AuthenticationFlowReauthFlowStepType string

type AuthenticationFlowSignupFlow

type AuthenticationFlowSignupFlow struct {
	Name  string                              `json:"name,omitempty"`
	Steps []*AuthenticationFlowSignupFlowStep `json:"steps,omitempty"`
}

func (*AuthenticationFlowSignupFlow) GetName

func (f *AuthenticationFlowSignupFlow) GetName() string

func (*AuthenticationFlowSignupFlow) GetSteps

func (*AuthenticationFlowSignupFlow) IsFlowObject

func (f *AuthenticationFlowSignupFlow) IsFlowObject()

type AuthenticationFlowSignupFlowOneOf

type AuthenticationFlowSignupFlowOneOf struct {
	// Identification is specific to identify.
	Identification AuthenticationFlowIdentification `json:"identification,omitempty"`
	// AccountLinking is specific to identify.
	AccountLinking *AuthenticationFlowAccountLinking `json:"account_linking,omitempty"`

	// Authentication is specific to authenticate.
	Authentication AuthenticationFlowAuthentication `json:"authentication,omitempty"`
	// TargetStep is specific to authenticate.
	TargetStep string `json:"target_step,omitempty"`
	// VerificationRequired is specific to OOB.
	VerificationRequired *bool `json:"verification_required,omitempty"`

	// BotProtection is specific to identify & create_authenticator
	BotProtection *AuthenticationFlowBotProtection `json:"bot_protection,omitempty" nullable:"true"`

	// Steps are common.
	Steps []*AuthenticationFlowSignupFlowStep `json:"steps,omitempty"`
}

func (*AuthenticationFlowSignupFlowOneOf) GetAccountLinkingConfig

func (*AuthenticationFlowSignupFlowOneOf) GetAuthentication

func (*AuthenticationFlowSignupFlowOneOf) GetBotProtectionConfig

func (*AuthenticationFlowSignupFlowOneOf) GetBranchInfo

func (*AuthenticationFlowSignupFlowOneOf) GetSteps

func (*AuthenticationFlowSignupFlowOneOf) GetTargetStepName

func (f *AuthenticationFlowSignupFlowOneOf) GetTargetStepName() string

func (*AuthenticationFlowSignupFlowOneOf) IsFlowObject

func (f *AuthenticationFlowSignupFlowOneOf) IsFlowObject()

func (*AuthenticationFlowSignupFlowOneOf) IsVerificationRequired

func (f *AuthenticationFlowSignupFlowOneOf) IsVerificationRequired() bool

type AuthenticationFlowSignupFlowStep

type AuthenticationFlowSignupFlowStep struct {
	Name string                               `json:"name,omitempty"`
	Type AuthenticationFlowSignupFlowStepType `json:"type,omitempty"`

	// OneOf is relevant when Type is identify or authenticate.
	OneOf []*AuthenticationFlowSignupFlowOneOf `json:"one_of,omitempty"`
	// TargetStep is relevant when Type is verify.
	TargetStep string `json:"target_step,omitempty"`
	// UserProfile is relevant when Type is fill_in_user_profile.
	UserProfile []*AuthenticationFlowSignupFlowUserProfile `json:"user_profile,omitempty"`
}

func (*AuthenticationFlowSignupFlowStep) GetName

func (*AuthenticationFlowSignupFlowStep) GetOneOf

func (*AuthenticationFlowSignupFlowStep) GetSignupFlowOrLoginFlowOneOf

func (*AuthenticationFlowSignupFlowStep) GetType

func (*AuthenticationFlowSignupFlowStep) IsFlowObject

func (s *AuthenticationFlowSignupFlowStep) IsFlowObject()

type AuthenticationFlowSignupFlowStepType

type AuthenticationFlowSignupFlowStepType string

type AuthenticationFlowSignupFlowUserProfile

type AuthenticationFlowSignupFlowUserProfile struct {
	Pointer  string `json:"pointer,omitempty"`
	Required bool   `json:"required,omitempty"`
}

type AuthenticationFlowSignupLoginFlow

type AuthenticationFlowSignupLoginFlow struct {
	Name  string                                   `json:"name,omitempty"`
	Steps []*AuthenticationFlowSignupLoginFlowStep `json:"steps,omitempty"`
}

func (*AuthenticationFlowSignupLoginFlow) GetName

func (*AuthenticationFlowSignupLoginFlow) GetSteps

func (*AuthenticationFlowSignupLoginFlow) IsFlowObject

func (f *AuthenticationFlowSignupLoginFlow) IsFlowObject()

type AuthenticationFlowSignupLoginFlowOneOf

type AuthenticationFlowSignupLoginFlowOneOf struct {
	Identification AuthenticationFlowIdentification `json:"identification,omitempty"`
	BotProtection  *AuthenticationFlowBotProtection `json:"bot_protection,omitempty" nullable:"true"`
	SignupFlow     string                           `json:"signup_flow,omitempty"`
	LoginFlow      string                           `json:"login_flow,omitempty"`
}

func (*AuthenticationFlowSignupLoginFlowOneOf) GetBotProtectionConfig

func (*AuthenticationFlowSignupLoginFlowOneOf) GetBranchInfo

func (*AuthenticationFlowSignupLoginFlowOneOf) GetSteps

func (*AuthenticationFlowSignupLoginFlowOneOf) IsFlowObject

func (s *AuthenticationFlowSignupLoginFlowOneOf) IsFlowObject()

type AuthenticationFlowSignupLoginFlowStep

type AuthenticationFlowSignupLoginFlowStep struct {
	Name  string                                    `json:"name,omitempty"`
	Type  AuthenticationFlowSignupLoginFlowStepType `json:"type,omitempty"`
	OneOf []*AuthenticationFlowSignupLoginFlowOneOf `json:"one_of,omitempty"`
}

func (*AuthenticationFlowSignupLoginFlowStep) GetName

func (*AuthenticationFlowSignupLoginFlowStep) GetOneOf

func (*AuthenticationFlowSignupLoginFlowStep) GetType

func (*AuthenticationFlowSignupLoginFlowStep) IsFlowObject

func (s *AuthenticationFlowSignupLoginFlowStep) IsFlowObject()

type AuthenticationFlowSignupLoginFlowStepType

type AuthenticationFlowSignupLoginFlowStepType string

type AuthenticationFlowStepType

type AuthenticationFlowStepType string
const (
	AuthenticationFlowStepTypeIdentify                  AuthenticationFlowStepType = "identify"
	AuthenticationFlowStepTypeAuthenticate              AuthenticationFlowStepType = "authenticate"
	AuthenticationFlowStepTypeCreateAuthenticator       AuthenticationFlowStepType = "create_authenticator"
	AuthenticationFlowStepTypeVerify                    AuthenticationFlowStepType = "verify"
	AuthenticationFlowStepTypeFillInUserProfile         AuthenticationFlowStepType = "fill_in_user_profile"
	AuthenticationFlowStepTypeViewRecoveryCode          AuthenticationFlowStepType = "view_recovery_code"
	AuthenticationFlowStepTypePromptCreatePasskey       AuthenticationFlowStepType = "prompt_create_passkey"
	AuthenticationFlowStepTypeTerminateOtherSessions    AuthenticationFlowStepType = "terminate_other_sessions"
	AuthenticationFlowStepTypeCheckAccountStatus        AuthenticationFlowStepType = "check_account_status"
	AuthenticationFlowStepTypeChangePassword            AuthenticationFlowStepType = "change_password"
	AuthenticationFlowStepTypeSelectDestination         AuthenticationFlowStepType = "select_destination"
	AuthenticationFlowStepTypeVerifyAccountRecoveryCode AuthenticationFlowStepType = "verify_account_recovery_code"
	AuthenticationFlowStepTypeResetPassword             AuthenticationFlowStepType = "reset_password"
)

type AuthenticationFlowType

type AuthenticationFlowType string
const (
	AuthenticationFlowTypeSignup          AuthenticationFlowType = "signup"
	AuthenticationFlowTypePromote         AuthenticationFlowType = "promote"
	AuthenticationFlowTypeLogin           AuthenticationFlowType = "login"
	AuthenticationFlowTypeSignupLogin     AuthenticationFlowType = "signup_login"
	AuthenticationFlowTypeReauth          AuthenticationFlowType = "reauth"
	AuthenticationFlowTypeAccountRecovery AuthenticationFlowType = "account_recovery"
)

type AuthenticationLockoutConfig

type AuthenticationLockoutConfig struct {
	MaxAttempts     int                                `json:"max_attempts,omitempty"`
	HistoryDuration DurationString                     `json:"history_duration,omitempty"`
	MinimumDuration DurationString                     `json:"minimum_duration,omitempty"`
	MaximumDuration DurationString                     `json:"maximum_duration,omitempty"`
	BackoffFactor   *float64                           `json:"backoff_factor,omitempty"`
	LockoutType     AuthenticationLockoutType          `json:"lockout_type,omitempty"`
	Password        *AuthenticationLockoutMethodConfig `json:"password,omitempty"`
	Totp            *AuthenticationLockoutMethodConfig `json:"totp,omitempty"`
	OOBOTP          *AuthenticationLockoutMethodConfig `json:"oob_otp,omitempty"`
	RecoveryCode    *AuthenticationLockoutMethodConfig `json:"recovery_code,omitempty"`
}

func (*AuthenticationLockoutConfig) IsEnabled

func (c *AuthenticationLockoutConfig) IsEnabled() bool

func (*AuthenticationLockoutConfig) SetDefaults

func (c *AuthenticationLockoutConfig) SetDefaults()

type AuthenticationLockoutMethod

type AuthenticationLockoutMethod string
const (
	AuthenticationLockoutMethodPassword     AuthenticationLockoutMethod = "password"
	AuthenticationLockoutMethodOOBOTP       AuthenticationLockoutMethod = "oob_otp"
	AuthenticationLockoutMethodTOTP         AuthenticationLockoutMethod = "totp"
	AuthenticationLockoutMethodRecoveryCode AuthenticationLockoutMethod = "recovery_code"
)

func AuthenticationLockoutMethodFromAuthenticatorType

func AuthenticationLockoutMethodFromAuthenticatorType(t model.AuthenticatorType) (AuthenticationLockoutMethod, bool)

type AuthenticationLockoutMethodConfig

type AuthenticationLockoutMethodConfig struct {
	Enabled bool `json:"enabled"`
}

type AuthenticationLockoutType

type AuthenticationLockoutType string
const (
	AuthenticationLockoutTypePerUser      AuthenticationLockoutType = "per_user"
	AuthenticationLockoutTypePerUserPerIP AuthenticationLockoutType = "per_user_per_ip"
)

type AuthenticationRateLimitsAccountEnumerationConfig

type AuthenticationRateLimitsAccountEnumerationConfig struct {
	PerIP *RateLimitConfig `json:"per_ip,omitempty"`
}

func (*AuthenticationRateLimitsAccountEnumerationConfig) SetDefaults

type AuthenticationRateLimitsConfig

type AuthenticationRateLimitsConfig struct {
	General      *AuthenticationRateLimitsGeneralConfig      `json:"general,omitempty"`
	Password     *AuthenticationRateLimitsPasswordConfig     `json:"password,omitempty"`
	OOBOTP       *AuthenticationRateLimitsOOBOTPConfig       `json:"oob_otp,omitempty"`
	TOTP         *AuthenticationRateLimitsTOTPConfig         `json:"totp,omitempty"`
	Passkey      *AuthenticationRateLimitsPasskeyConfig      `json:"passkey,omitempty"`
	SIWE         *AuthenticationRateLimitsSIWEConfig         `json:"siwe,omitempty"`
	RecoveryCode *AuthenticationRateLimitsRecoveryCodeConfig `json:"recovery_code,omitempty"`
	DeviceToken  *AuthenticationRateLimitsDeviceTokenConfig  `json:"device_token,omitempty"`

	Signup             *AuthenticationRateLimitsSignupConfig             `json:"signup,omitempty"`
	SignupAnonymous    *AuthenticationRateLimitsSignupAnonymousConfig    `json:"signup_anonymous,omitempty"`
	AccountEnumeration *AuthenticationRateLimitsAccountEnumerationConfig `json:"account_enumeration,omitempty"`
}

type AuthenticationRateLimitsDeviceTokenConfig

type AuthenticationRateLimitsDeviceTokenConfig struct {
	PerIP        *RateLimitConfig `json:"per_ip,omitempty"`
	PerUserPerIP *RateLimitConfig `json:"per_user_per_ip,omitempty"`
}

type AuthenticationRateLimitsGeneralConfig

type AuthenticationRateLimitsGeneralConfig struct {
	PerIP        *RateLimitConfig `json:"per_ip,omitempty"`
	PerUserPerIP *RateLimitConfig `json:"per_user_per_ip,omitempty"`
}

func (*AuthenticationRateLimitsGeneralConfig) SetDefaults

func (c *AuthenticationRateLimitsGeneralConfig) SetDefaults()

type AuthenticationRateLimitsOOBOTPConfig

type AuthenticationRateLimitsOOBOTPConfig struct {
	Email *AuthenticationRateLimitsOOBOTPEmailConfig `json:"email,omitempty"`
	SMS   *AuthenticationRateLimitsOOBOTPSMSConfig   `json:"sms,omitempty"`
}

type AuthenticationRateLimitsOOBOTPEmailConfig

type AuthenticationRateLimitsOOBOTPEmailConfig struct {
	TriggerPerIP               *RateLimitConfig `json:"trigger_per_ip,omitempty"`
	TriggerPerUser             *RateLimitConfig `json:"trigger_per_user,omitempty"`
	TriggerCooldown            DurationString   `json:"trigger_cooldown,omitempty"`
	MaxFailedAttemptsRevokeOTP int              `json:"max_failed_attempts_revoke_otp,omitempty"`
	ValidatePerIP              *RateLimitConfig `json:"validate_per_ip,omitempty"`
	ValidatePerUserPerIP       *RateLimitConfig `json:"validate_per_user_per_ip,omitempty"`
}

func (*AuthenticationRateLimitsOOBOTPEmailConfig) SetDefaults

type AuthenticationRateLimitsOOBOTPSMSConfig

type AuthenticationRateLimitsOOBOTPSMSConfig struct {
	TriggerPerIP               *RateLimitConfig `json:"trigger_per_ip,omitempty"`
	TriggerPerUser             *RateLimitConfig `json:"trigger_per_user,omitempty"`
	TriggerCooldown            DurationString   `json:"trigger_cooldown,omitempty"`
	MaxFailedAttemptsRevokeOTP int              `json:"max_failed_attempts_revoke_otp,omitempty"`
	ValidatePerIP              *RateLimitConfig `json:"validate_per_ip,omitempty"`
	ValidatePerUserPerIP       *RateLimitConfig `json:"validate_per_user_per_ip,omitempty"`
}

func (*AuthenticationRateLimitsOOBOTPSMSConfig) SetDefaults

func (c *AuthenticationRateLimitsOOBOTPSMSConfig) SetDefaults()

type AuthenticationRateLimitsPasskeyConfig

type AuthenticationRateLimitsPasskeyConfig struct {
	PerIP *RateLimitConfig `json:"per_ip,omitempty"`
}

type AuthenticationRateLimitsPasswordConfig

type AuthenticationRateLimitsPasswordConfig struct {
	PerIP        *RateLimitConfig `json:"per_ip,omitempty"`
	PerUserPerIP *RateLimitConfig `json:"per_user_per_ip,omitempty"`
}

type AuthenticationRateLimitsRecoveryCodeConfig

type AuthenticationRateLimitsRecoveryCodeConfig struct {
	PerIP        *RateLimitConfig `json:"per_ip,omitempty"`
	PerUserPerIP *RateLimitConfig `json:"per_user_per_ip,omitempty"`
}

type AuthenticationRateLimitsSIWEConfig

type AuthenticationRateLimitsSIWEConfig struct {
	PerIP *RateLimitConfig `json:"per_ip,omitempty"`
}

type AuthenticationRateLimitsSignupAnonymousConfig

type AuthenticationRateLimitsSignupAnonymousConfig struct {
	PerIP *RateLimitConfig `json:"per_ip,omitempty"`
}

func (*AuthenticationRateLimitsSignupAnonymousConfig) SetDefaults

type AuthenticationRateLimitsSignupConfig

type AuthenticationRateLimitsSignupConfig struct {
	PerIP *RateLimitConfig `json:"per_ip,omitempty"`
}

func (*AuthenticationRateLimitsSignupConfig) SetDefaults

func (c *AuthenticationRateLimitsSignupConfig) SetDefaults()

type AuthenticationRateLimitsTOTPConfig

type AuthenticationRateLimitsTOTPConfig struct {
	PerIP        *RateLimitConfig `json:"per_ip,omitempty"`
	PerUserPerIP *RateLimitConfig `json:"per_user_per_ip,omitempty"`
}

type AuthenticatorConfig

type AuthenticatorConfig struct {
	Password *AuthenticatorPasswordConfig `json:"password,omitempty"`
	TOTP     *AuthenticatorTOTPConfig     `json:"totp,omitempty"`
	OOB      *AuthenticatorOOBConfig      `json:"oob_otp,omitempty"`
}

type AuthenticatorEmailOTPMode

type AuthenticatorEmailOTPMode string
const (
	AuthenticatorEmailOTPModeCodeOnly      AuthenticatorEmailOTPMode = "code"
	AuthenticatorEmailOTPModeLoginLinkOnly AuthenticatorEmailOTPMode = "login_link"
)

func (*AuthenticatorEmailOTPMode) IsCodeEnabled

func (m *AuthenticatorEmailOTPMode) IsCodeEnabled() bool

func (*AuthenticatorEmailOTPMode) IsLoginLinkEnabled

func (m *AuthenticatorEmailOTPMode) IsLoginLinkEnabled() bool

type AuthenticatorFeatureConfig

type AuthenticatorFeatureConfig struct {
	Password *AuthenticatorPasswordFeatureConfig `json:"password,omitempty"`
}

func (*AuthenticatorFeatureConfig) Merge

type AuthenticatorOOBConfig

type AuthenticatorOOBConfig struct {
	SMS   *AuthenticatorOOBSMSConfig   `json:"sms,omitempty"`
	Email *AuthenticatorOOBEmailConfig `json:"email,omitempty"`
}

func (*AuthenticatorOOBConfig) GetDefaultChannelFor

type AuthenticatorOOBEmailConfig

type AuthenticatorOOBEmailConfig struct {
	Maximum                    *int                          `json:"maximum,omitempty"`
	EmailOTPMode               AuthenticatorEmailOTPMode     `json:"email_otp_mode,omitempty"`
	Deprecated_CodeValidPeriod DurationString                `json:"code_valid_period,omitempty"`
	ValidPeriods               *AuthenticatorOOBValidPeriods `json:"valid_periods,omitempty"`
}

func (*AuthenticatorOOBEmailConfig) SetDefaults

func (c *AuthenticatorOOBEmailConfig) SetDefaults()

type AuthenticatorOOBOTBSMSFeatureConfig

type AuthenticatorOOBOTBSMSFeatureConfig struct {
	Disabled bool `json:"disabled,omitempty"`
}

type AuthenticatorOOBSMSConfig

type AuthenticatorOOBSMSConfig struct {
	Maximum                    *int                          `json:"maximum,omitempty"`
	PhoneOTPMode               AuthenticatorPhoneOTPMode     `json:"phone_otp_mode,omitempty"`
	Deprecated_CodeValidPeriod DurationString                `json:"code_valid_period,omitempty"`
	ValidPeriods               *AuthenticatorOOBValidPeriods `json:"valid_periods,omitempty"`
}

func (*AuthenticatorOOBSMSConfig) SetDefaults

func (c *AuthenticatorOOBSMSConfig) SetDefaults()

type AuthenticatorOOBValidPeriods

type AuthenticatorOOBValidPeriods struct {
	Link DurationString `json:"link,omitempty"`
	Code DurationString `json:"code,omitempty"`
}

type AuthenticatorPasswordConfig

type AuthenticatorPasswordConfig struct {
	Policy               *PasswordPolicyConfig    `json:"policy,omitempty"`
	Expiry               *PasswordExpiryConfig    `json:"expiry,omitempty"`
	ForceChange          *bool                    `json:"force_change,omitempty"`
	Deprecated_Ratelimit *PasswordRatelimitConfig `json:"ratelimit,omitempty"`
}

func (*AuthenticatorPasswordConfig) SetDefaults

func (c *AuthenticatorPasswordConfig) SetDefaults()

type AuthenticatorPasswordFeatureConfig

type AuthenticatorPasswordFeatureConfig struct {
	Policy *PasswordPolicyFeatureConfig `json:"policy,omitempty"`
}

type AuthenticatorPhoneOTPMode

type AuthenticatorPhoneOTPMode string
const (
	AuthenticatorPhoneOTPModeSMSOnly      AuthenticatorPhoneOTPMode = "sms"
	AuthenticatorPhoneOTPModeWhatsappSMS  AuthenticatorPhoneOTPMode = "whatsapp_sms"
	AuthenticatorPhoneOTPModeWhatsappOnly AuthenticatorPhoneOTPMode = "whatsapp"
)

func (*AuthenticatorPhoneOTPMode) Deprecated_IsSMSEnabled

func (m *AuthenticatorPhoneOTPMode) Deprecated_IsSMSEnabled() bool

func (*AuthenticatorPhoneOTPMode) Deprecated_IsWhatsappEnabled

func (m *AuthenticatorPhoneOTPMode) Deprecated_IsWhatsappEnabled() bool

func (AuthenticatorPhoneOTPMode) GetAvailableChannels

func (m AuthenticatorPhoneOTPMode) GetAvailableChannels() []model.AuthenticatorOOBChannel

func (AuthenticatorPhoneOTPMode) GetDefaultChannel

type AuthenticatorTOTPConfig

type AuthenticatorTOTPConfig struct {
	Maximum *int `json:"maximum,omitempty"`
}

func (*AuthenticatorTOTPConfig) SetDefaults

func (c *AuthenticatorTOTPConfig) SetDefaults()

type AuthenticatorsFeatureConfig

type AuthenticatorsFeatureConfig struct {
	OOBOTPSMS *AuthenticatorOOBOTBSMSFeatureConfig `json:"oob_otp_sms,omitempty"`
}

type AzureBlobStorageObjectStoreConfig

type AzureBlobStorageObjectStoreConfig struct {
	StorageAccount string `envconfig:"STORAGE_ACCOUNT"`
	Container      string `envconfig:"CONTAINER"`
	// ServiceURL is custom Azure blob storage URL. Empty for default URL.
	ServiceURL string `envconfig:"SERVICE_URL"`
	// AccessKey is encoded in standard BASE64.
	AccessKey string `envconfig:"ACCESS_KEY"`
}

func (*AzureBlobStorageObjectStoreConfig) Initialize

func (*AzureBlobStorageObjectStoreConfig) Validate

type BiometricConfig

type BiometricConfig struct {
	ListEnabled *bool `json:"list_enabled,omitempty"`
}

func (*BiometricConfig) SetDefaults

func (c *BiometricConfig) SetDefaults()

type BiometricFeatureConfig

type BiometricFeatureConfig struct {
	Disabled *bool `json:"disabled,omitempty"`
}

func (*BiometricFeatureConfig) SetDefaults

func (c *BiometricFeatureConfig) SetDefaults()

type BlockingHandlerFeatureConfig

type BlockingHandlerFeatureConfig struct {
	Maximum *int `json:"maximum,omitempty"`
}

func (*BlockingHandlerFeatureConfig) SetDefaults

func (c *BlockingHandlerFeatureConfig) SetDefaults()

type BlockingHandlersConfig

type BlockingHandlersConfig struct {
	Event string `json:"event"`
	URL   string `json:"url"`
}

type BotProtectionConfig

type BotProtectionConfig struct {
	Enabled      bool                       `json:"enabled,omitempty"`
	Provider     *BotProtectionProvider     `json:"provider,omitempty" nullable:"true"`
	Requirements *BotProtectionRequirements `json:"requirements,omitempty" nullable:"true"`
}

func (*BotProtectionConfig) GetProviderType

func (c *BotProtectionConfig) GetProviderType() BotProtectionProviderType

func (*BotProtectionConfig) GetSiteKey

func (c *BotProtectionConfig) GetSiteKey() string

func (*BotProtectionConfig) IsEnabled

func (c *BotProtectionConfig) IsEnabled() bool

type BotProtectionProvider

type BotProtectionProvider struct {
	Type    BotProtectionProviderType `json:"type,omitempty"`
	SiteKey string                    `json:"site_key,omitempty"` // only for cloudflare, recaptchav2
}

type BotProtectionProviderCredentials

type BotProtectionProviderCredentials struct {
	Type      BotProtectionProviderType `json:"type,omitempty"`
	SecretKey string                    `json:"secret_key,omitempty"`
}

func (*BotProtectionProviderCredentials) SensitiveStrings

func (c *BotProtectionProviderCredentials) SensitiveStrings() (sensitiveStrings []string)

type BotProtectionProviderCredentialsUpdateInstruction

type BotProtectionProviderCredentialsUpdateInstruction struct {
	Action SecretUpdateInstructionAction                          `json:"action,omitempty"`
	Data   *BotProtectionProviderCredentialsUpdateInstructionData `json:"data,omitempty"`
}

func (*BotProtectionProviderCredentialsUpdateInstruction) ApplyTo

type BotProtectionProviderCredentialsUpdateInstructionData

type BotProtectionProviderCredentialsUpdateInstructionData struct {
	Type      string `json:"type,omitempty"`
	SecretKey string `json:"secretKey,omitempty"`
}

type BotProtectionProviderType

type BotProtectionProviderType string
const (
	BotProtectionProviderTypeCloudflare  BotProtectionProviderType = "cloudflare"
	BotProtectionProviderTypeRecaptchaV2 BotProtectionProviderType = "recaptchav2"
)

type BotProtectionRequirements

type BotProtectionRequirements struct {
	SignupOrLogin   *BotProtectionRequirementsObject `json:"signup_or_login,omitempty"`
	AccountRecovery *BotProtectionRequirementsObject `json:"account_recovery,omitempty"`
	Password        *BotProtectionRequirementsObject `json:"password,omitempty"`
	OOBOTPEmail     *BotProtectionRequirementsObject `json:"oob_otp_email,omitempty"`
	OOBOTPSMS       *BotProtectionRequirementsObject `json:"oob_otp_sms,omitempty"`
}

type BotProtectionRequirementsObject

type BotProtectionRequirementsObject struct {
	Mode BotProtectionRiskMode `json:"mode,omitempty"`
}

type BotProtectionRiskMode

type BotProtectionRiskMode string

NOTE: If you add any new BotProtectionRiskMode, please make corresponding changes in GetStricterBotProtectionRiskMode too

const (
	BotProtectionRiskModeNever  BotProtectionRiskMode = "never"
	BotProtectionRiskModeAlways BotProtectionRiskMode = "always"
)

type CORSAllowedOrigins

type CORSAllowedOrigins string

func (*CORSAllowedOrigins) List

func (c *CORSAllowedOrigins) List() []string

type CSRFKeyMaterials

type CSRFKeyMaterials struct {
	jwk.Set
}

func (*CSRFKeyMaterials) MarshalJSON

func (c *CSRFKeyMaterials) MarshalJSON() ([]byte, error)

func (*CSRFKeyMaterials) SensitiveStrings

func (c *CSRFKeyMaterials) SensitiveStrings() []string

func (*CSRFKeyMaterials) UnmarshalJSON

func (c *CSRFKeyMaterials) UnmarshalJSON(b []byte) error

type CaptchaConfig

type CaptchaConfig struct {
	Deprecated_Provider *Deprecated_CaptchaProvider `json:"provider,omitempty"`
}

type CollaboratorFeatureConfig

type CollaboratorFeatureConfig struct {
	Maximum     *int `json:"maximum,omitempty"`
	SoftMaximum *int `json:"soft_maximum,omitempty"`
}

func (*CollaboratorFeatureConfig) Merge

type Config

type Config struct {
	AppConfig     *AppConfig
	SecretConfig  *SecretConfig
	FeatureConfig *FeatureConfig
}

type CustomAttributeType

type CustomAttributeType string
const (
	CustomAttributeTypeString      CustomAttributeType = "string"
	CustomAttributeTypeNumber      CustomAttributeType = "number"
	CustomAttributeTypeInteger     CustomAttributeType = "integer"
	CustomAttributeTypeEnum        CustomAttributeType = "enum"
	CustomAttributeTypePhoneNumber CustomAttributeType = "phone_number"
	CustomAttributeTypeEmail       CustomAttributeType = "email"
	CustomAttributeTypeURL         CustomAttributeType = "url"
	CustomAttributeTypeCountryCode CustomAttributeType = "country_code"
)

type CustomAttributesAttributeConfig

type CustomAttributesAttributeConfig struct {
	ID            string                              `json:"id,omitempty"`
	Pointer       string                              `json:"pointer,omitempty"`
	Type          CustomAttributeType                 `json:"type,omitempty"`
	AccessControl *UserProfileAttributesAccessControl `json:"access_control,omitempty"`
	Minimum       *float64                            `json:"minimum,omitempty"`
	Maximum       *float64                            `json:"maximum,omitempty"`
	Enum          []string                            `json:"enum,omitempty"`
}

func (*CustomAttributesAttributeConfig) ParseString

func (c *CustomAttributesAttributeConfig) ParseString(strRepr string) (interface{}, error)

func (*CustomAttributesAttributeConfig) SetDefaults

func (c *CustomAttributesAttributeConfig) SetDefaults()

func (*CustomAttributesAttributeConfig) ToSchemaBuilder

func (c *CustomAttributesAttributeConfig) ToSchemaBuilder() (builder validation.SchemaBuilder, err error)

type CustomAttributesConfig

type CustomAttributesConfig struct {
	Attributes []*CustomAttributesAttributeConfig `json:"attributes,omitempty"`
}

func (*CustomAttributesConfig) GetAccessControl

func (c *CustomAttributesConfig) GetAccessControl() accesscontrol.T

type CustomDomainFeatureConfig

type CustomDomainFeatureConfig struct {
	Disabled bool `json:"disabled,omitempty"`
}

func (*CustomDomainFeatureConfig) Merge

type CustomSMSProviderConfig

type CustomSMSProviderConfig struct {
	URL     string           `json:"url,omitempty"`
	Timeout *DurationSeconds `json:"timeout,omitempty"`
}

func (*CustomSMSProviderConfig) SensitiveStrings

func (c *CustomSMSProviderConfig) SensitiveStrings() []string

type DatabaseCredentials

type DatabaseCredentials struct {
	DatabaseURL    string `json:"database_url,omitempty"`
	DatabaseSchema string `json:"database_schema,omitempty"`
}

func (*DatabaseCredentials) SensitiveStrings

func (c *DatabaseCredentials) SensitiveStrings() []string

func (*DatabaseCredentials) SetDefaults

func (c *DatabaseCredentials) SetDefaults()

type DatabaseEnvironmentConfig

type DatabaseEnvironmentConfig struct {
	// When you change the default value, you also need to change NewDefaultDatabaseEnvironmentConfig.
	MaxOpenConn int `envconfig:"MAX_OPEN_CONN" default:"3"`
	// When you change the default value, you also need to change NewDefaultDatabaseEnvironmentConfig.
	MaxIdleConn            int             `envconfig:"MAX_IDLE_CONN" default:"3"`
	ConnMaxLifetimeSeconds DurationSeconds `envconfig:"CONN_MAX_LIFETIME" default:"1800"`
	ConnMaxIdleTimeSeconds DurationSeconds `envconfig:"CONN_MAX_IDLE_TIME" default:"300"`
}

func NewDefaultDatabaseEnvironmentConfig

func NewDefaultDatabaseEnvironmentConfig() *DatabaseEnvironmentConfig

NewDefaultDatabaseEnvironmentConfig provides default database config. When you changes the default values, you also need to change the values in DatabaseEnvironmentConfig.

type DenoEndpoint

type DenoEndpoint string

type Deprecated_CaptchaCloudflareCredentials

type Deprecated_CaptchaCloudflareCredentials struct {
	Secret string `json:"secret,omitempty"`
}

func (*Deprecated_CaptchaCloudflareCredentials) SensitiveStrings

func (c *Deprecated_CaptchaCloudflareCredentials) SensitiveStrings() []string

type Deprecated_CaptchaProvider

type Deprecated_CaptchaProvider string
const (
	Deprecated_CaptchaProviderCloudflare Deprecated_CaptchaProvider = "cloudflare"
)

type Deprecated_NFTConfig

type Deprecated_NFTConfig struct {
	Collections []string `json:"collections,omitempty"`
}

type Deprecated_SIWEConfig

type Deprecated_SIWEConfig struct {
	Networks []string `json:"networks,omitempty"`
}

type Deprecated_Web3Config

type Deprecated_Web3Config struct {
	SIWE *Deprecated_SIWEConfig `json:"siwe,omitempty"`
	NFT  *Deprecated_NFTConfig  `json:"nft,omitempty"`
}

type Deprecated_Web3FeatureConfig

type Deprecated_Web3FeatureConfig struct {
	Deprecated_NFT *Deprecated_Web3NFTFeatureConfig `json:"nft,omitempty"`
}

type Deprecated_Web3NFTFeatureConfig

type Deprecated_Web3NFTFeatureConfig struct {
	Maximum *int `json:"maximum,omitempty"`
}

func (*Deprecated_Web3NFTFeatureConfig) SetDefaults

func (c *Deprecated_Web3NFTFeatureConfig) SetDefaults()

type DevMode

type DevMode bool

type DeviceTokenConfig

type DeviceTokenConfig struct {
	Disabled bool         `json:"disabled,omitempty"`
	ExpireIn DurationDays `json:"expire_in_days,omitempty"`
}

func (*DeviceTokenConfig) SetDefaults

func (c *DeviceTokenConfig) SetDefaults()

type DurationDays

type DurationDays int

func (DurationDays) Duration

func (d DurationDays) Duration() time.Duration

type DurationSeconds

type DurationSeconds int

func (DurationSeconds) Duration

func (d DurationSeconds) Duration() time.Duration

type DurationString

type DurationString string

func (DurationString) Duration

func (d DurationString) Duration() time.Duration

func (DurationString) MaybeDuration

func (d DurationString) MaybeDuration() (time.Duration, bool)

type ElasticsearchCredentials

type ElasticsearchCredentials struct {
	ElasticsearchURL string `json:"elasticsearch_url,omitempty"`
}

func (*ElasticsearchCredentials) SensitiveStrings

func (c *ElasticsearchCredentials) SensitiveStrings() []string

type EmailConfig

type EmailConfig struct {
	Ratelimit *EmailRatelimitConfig `json:"ratelimit,omitempty"`
}

EmailConfig is deprecated.

type EmailRatelimitConfig

type EmailRatelimitConfig struct {
	ResendCooldownSeconds DurationSeconds `json:"resend_cooldown_seconds,omitempty"`
}

func (*EmailRatelimitConfig) SetDefaults

func (c *EmailRatelimitConfig) SetDefaults()

type End2EndBotProtectionEnvironmentConfig

type End2EndBotProtectionEnvironmentConfig struct {
	CloudflareEndpoint  string `envconfig:"E2E_BOT_PROTECTION_CLOUDFLARE_ENDPOINT"`
	RecaptchaV2Endpoint string `envconfig:"E2E_BOT_PROTECTION_RECAPTCHAV2_ENDPOINT"`
}

type EnvironmentConfig

type EnvironmentConfig struct {
	// TrustProxy sets whether HTTP headers from proxy are to be trusted
	TrustProxy TrustProxy `envconfig:"TRUST_PROXY" default:"false"`
	// DevMode sets whether the server would be run under development mode
	DevMode DevMode `envconfig:"DEV_MODE" default:"false"`
	// LogLevel sets the global log level
	LogLevel string `envconfig:"LOG_LEVEL" default:"warn"`
	// SentryDSN sets the sentry DSN.
	SentryDSN SentryDSN `envconfig:"SENTRY_DSN"`
	// AuthUISentryDSN sets the sentry DSN for auth ui.
	AuthUISentryDSN AuthUISentryDSN `envconfig:"AUTH_UI_SENTRY_DSN"`
	// Origins that are allowd to post message to authui
	AuthUIWindowMessageAllowedOrigins AuthUIWindowMessageAllowedOrigins `envconfig:"AUTH_UI_WINDOW_MESSAGE_ALLOWED_ORIGINS"`
	// GlobalDatabase configures the global database
	GlobalDatabase GlobalDatabaseCredentialsEnvironmentConfig `envconfig:"DATABASE"`
	// AuditDatabase configures the audit database
	AuditDatabase AuditDatabaseCredentialsEnvironmentConfig `envconfig:"AUDIT_DATABASE"`
	// DatabaseConfig configures the database connection config
	DatabaseConfig DatabaseEnvironmentConfig `envconfig:"DATABASE_CONFIG"`

	GlobalRedis GlobalRedisCredentialsEnvironmentConfig `envconfig:"REDIS"`
	// RedisConfig configures the redis connection config
	RedisConfig RedisEnvironmentConfig `envconfig:"REDIS_CONFIG"`

	ImagesCDNHost ImagesCDNHost `envconfig:"IMAGES_CDN_HOST"`
	WebAppCDNHost WebAppCDNHost `envconfig:"WEB_APP_CDN_HOST"`

	// CORSAllowOrigins configures a comma-separated list of allowed origins for CORSMiddleware
	CORSAllowedOrigins CORSAllowedOrigins `envconfig:"CORS_ALLOWED_ORIGINS"`

	AllowedFrameAncestors AllowedFrameAncestors `envconfig:"ALLOWED_FRAME_ANCESTORS"`

	DenoEndpoint DenoEndpoint `envconfig:"DENO_ENDPOINT"`

	RateLimits RateLimitsEnvironmentConfig `envconfig:"RATE_LIMITS"`

	SAML SAMLEnvironmentConfig `envconfig:"SAML"`

	// AppHostSuffixes originates from the portal config.
	AppHostSuffixes AppHostSuffixes `envconfig:"APP_HOST_SUFFIXES"`

	// End2EndHTTPProxy sets the HTTP proxy for end-to-end tests
	End2EndHTTPProxy string `envconfig:"E2E_HTTP_PROXY"`
	// End2EndTLSCACertFile sets additional CA certificate for end-to-end tests
	End2EndTLSCACertFile string `envconfig:"E2E_TLS_CA_CERT_FILE"`
	// End2EndBotProtection sets mocked endpoints for bot protection providers verification
	End2EndBotProtection End2EndBotProtectionEnvironmentConfig `envconfig:"E2E_BOT_PROTECTION"`
	// End2EndCSRFProtectionDisabled turns off csrf protection
	End2EndCSRFProtectionDisabled bool `envconfig:"E2E_CSRF_PROTECTION_DISABLED"`

	UIImplementation GlobalUIImplementation `envconfig:"UI_IMPLEMENTATION"`

	UISettingsImplementation GlobalUISettingsImplementation `envconfig:"UI_SETTINGS_IMPLEMENTATION"`

	UserExportObjectStore *UserExportObjectStoreConfig `envconfig:"USEREXPORT_OBJECT_STORE"`

	SMSGatewayConfig SMSGatewayEnvironmentConfig `envconfig:"SMS_GATEWAY"`
}

type FeatureConfig

type FeatureConfig struct {
	Identity         *IdentityFeatureConfig         `json:"identity,omitempty"`
	Authentication   *AuthenticationFeatureConfig   `json:"authentication,omitempty"`
	Authenticator    *AuthenticatorFeatureConfig    `json:"authenticator,omitempty"`
	CustomDomain     *CustomDomainFeatureConfig     `json:"custom_domain,omitempty"`
	UI               *UIFeatureConfig               `json:"ui,omitempty"`
	OAuth            *OAuthFeatureConfig            `json:"oauth,omitempty"`
	Hook             *HookFeatureConfig             `json:"hook,omitempty"`
	AuditLog         *AuditLogFeatureConfig         `json:"audit_log,omitempty"`
	GoogleTagManager *GoogleTagManagerFeatureConfig `json:"google_tag_manager,omitempty"`
	RateLimits       *RateLimitsFeatureConfig       `json:"rate_limits,omitempty"`
	Messaging        *MessagingFeatureConfig        `json:"messaging,omitempty"`
	Collaborator     *CollaboratorFeatureConfig     `json:"collaborator,omitempty"`
	Deprecated_Web3  *Deprecated_Web3FeatureConfig  `json:"web3,omitempty"`
	AdminAPI         *AdminAPIFeatureConfig         `json:"admin_api,omitempty"`
	TestMode         *TestModeFeatureConfig         `json:"test_mode,omitempty"`
}

func NewEffectiveDefaultFeatureConfig

func NewEffectiveDefaultFeatureConfig() *FeatureConfig

func ParseFeatureConfig

func ParseFeatureConfig(inputYAML []byte) (*FeatureConfig, error)

func ParseFeatureConfigWithoutDefaults

func ParseFeatureConfigWithoutDefaults(inputYAML []byte) (*FeatureConfig, error)

func (*FeatureConfig) Merge

func (c *FeatureConfig) Merge(layer *FeatureConfig) *FeatureConfig

type FeatureTestModeEmailSuppressed

type FeatureTestModeEmailSuppressed bool

type FeatureTestModeSMSSuppressed

type FeatureTestModeSMSSuppressed bool

type FeatureTestModeWhatsappSuppressed

type FeatureTestModeWhatsappSuppressed bool

type ForgotPasswordConfig

type ForgotPasswordConfig struct {
	Enabled *bool `json:"enabled,omitempty"`

	Deprecated_ResetCodeExpiry DurationSeconds             `json:"reset_code_expiry_seconds,omitempty"`
	Deprecated_CodeValidPeriod DurationString              `json:"code_valid_period,omitempty"`
	ValidPeriods               *ForgotPasswordValidPeriods `json:"valid_periods,omitempty"`

	RateLimits *ForgotPasswordRateLimitsConfig `json:"rate_limits,omitempty"`
}

func (*ForgotPasswordConfig) SetDefaults

func (c *ForgotPasswordConfig) SetDefaults()

type ForgotPasswordRateLimitsConfig

type ForgotPasswordRateLimitsConfig struct {
	Email *ForgotPasswordRateLimitsEmailConfig `json:"email,omitempty"`
	SMS   *ForgotPasswordRateLimitsSMSConfig   `json:"sms,omitempty"`
}

type ForgotPasswordRateLimitsEmailConfig

type ForgotPasswordRateLimitsEmailConfig struct {
	TriggerPerIP    *RateLimitConfig `json:"trigger_per_ip,omitempty"`
	TriggerCooldown DurationString   `json:"trigger_cooldown,omitempty"`
	ValidatePerIP   *RateLimitConfig `json:"validate_per_ip,omitempty"`
}

func (*ForgotPasswordRateLimitsEmailConfig) SetDefaults

func (c *ForgotPasswordRateLimitsEmailConfig) SetDefaults()

type ForgotPasswordRateLimitsSMSConfig

type ForgotPasswordRateLimitsSMSConfig struct {
	TriggerPerIP    *RateLimitConfig `json:"trigger_per_ip,omitempty"`
	TriggerCooldown DurationString   `json:"trigger_cooldown,omitempty"`
	ValidatePerIP   *RateLimitConfig `json:"validate_per_ip,omitempty"`
}

func (*ForgotPasswordRateLimitsSMSConfig) SetDefaults

func (c *ForgotPasswordRateLimitsSMSConfig) SetDefaults()

type ForgotPasswordValidPeriods

type ForgotPasswordValidPeriods struct {
	Link DurationString `json:"link,omitempty"`
	Code DurationString `json:"code,omitempty"`
}

type GCPGCSObjectStoreConfig

type GCPGCSObjectStoreConfig struct {
	BucketName          string `envconfig:"BUCKET_NAME"`
	ServiceAccount      string `envconfig:"SERVICE_ACCOUNT"`
	CredentialsJSONPath string `envconfig:"CREDENTIALS_JSON_PATH"`
	CredentialsJSON     []byte `ignored:"true"`
}

func (*GCPGCSObjectStoreConfig) Initialize

func (c *GCPGCSObjectStoreConfig) Initialize(ctx *validation.Context)

func (*GCPGCSObjectStoreConfig) Validate

func (c *GCPGCSObjectStoreConfig) Validate(ctx *validation.Context)

type GenerateAppConfigOptions

type GenerateAppConfigOptions struct {
	AppID        string
	PublicOrigin string
	CookieDomain string
}

type GenerateOAuthClientConfigOptions

type GenerateOAuthClientConfigOptions struct {
	Name                  string
	ApplicationType       OAuthClientApplicationType
	RedirectURI           string
	PostLogoutRedirectURI string
}

type GenerateSecretConfigOptions

type GenerateSecretConfigOptions struct {
	DatabaseURL          string
	DatabaseSchema       string
	ElasticsearchURL     string
	RedisURL             string
	AuditDatabaseURL     string
	AuditDatabaseSchema  string
	SearchDatabaseURL    string
	SearchDatabaseSchema string
	AnalyticRedisURL     string
}

type GlobalDatabaseCredentialsEnvironmentConfig

type GlobalDatabaseCredentialsEnvironmentConfig struct {
	DatabaseURL    string `envconfig:"URL"`
	DatabaseSchema string `envconfig:"SCHEMA" default:"public"`
}

type GlobalRedisCredentialsEnvironmentConfig

type GlobalRedisCredentialsEnvironmentConfig struct {
	RedisURL string `envconfig:"URL"`
}

type GlobalUIImplementation

type GlobalUIImplementation UIImplementation

type GlobalUISettingsImplementation

type GlobalUISettingsImplementation SettingsUIImplementation

type GoogleTagManagerConfig

type GoogleTagManagerConfig struct {
	ContainerID string `json:"container_id,omitempty"`
}

type GoogleTagManagerFeatureConfig

type GoogleTagManagerFeatureConfig struct {
	Disabled bool `json:"disabled,omitempty"`
}

func (*GoogleTagManagerFeatureConfig) Merge

type HTTPConfig

type HTTPConfig struct {
	PublicOrigin   string   `json:"public_origin"`
	AllowedOrigins []string `json:"allowed_origins,omitempty"`
	CookiePrefix   string   `json:"cookie_prefix,omitempty"`
	CookieDomain   *string  `json:"cookie_domain,omitempty"`
}

type HookConfig

type HookConfig struct {
	SyncTimeout         DurationSeconds             `json:"sync_hook_timeout_seconds,omitempty"`
	SyncTotalTimeout    DurationSeconds             `json:"sync_hook_total_timeout_seconds,omitempty"`
	BlockingHandlers    []BlockingHandlersConfig    `json:"blocking_handlers,omitempty"`
	NonBlockingHandlers []NonBlockingHandlersConfig `json:"non_blocking_handlers,omitempty"`
}

func (*HookConfig) SetDefaults

func (c *HookConfig) SetDefaults()

type HookFeatureConfig

type HookFeatureConfig struct {
	BlockingHandler    *BlockingHandlerFeatureConfig    `json:"blocking_handler,omitempty"`
	NonBlockingHandler *NonBlockingHandlerFeatureConfig `json:"non_blocking_handler,omitempty"`
}

func (*HookFeatureConfig) Merge

type IdentityConfig

type IdentityConfig struct {
	LDAP       *LDAPConfig             `json:"ldap,omitempty"`
	LoginID    *LoginIDConfig          `json:"login_id,omitempty"`
	OAuth      *OAuthSSOConfig         `json:"oauth,omitempty"`
	Biometric  *BiometricConfig        `json:"biometric,omitempty"`
	OnConflict *IdentityConflictConfig `json:"on_conflict,omitempty"`
}

type IdentityConflictConfig

type IdentityConflictConfig struct {
	Promotion PromotionConflictBehavior `json:"promotion,omitempty"`
}

func (*IdentityConflictConfig) SetDefaults

func (c *IdentityConflictConfig) SetDefaults()

type IdentityFeatureConfig

type IdentityFeatureConfig struct {
	LoginID   *LoginIDFeatureConfig   `json:"login_id,omitempty"`
	OAuth     *OAuthSSOFeatureConfig  `json:"oauth,omitempty"`
	Biometric *BiometricFeatureConfig `json:"biometric,omitempty"`
}

func (*IdentityFeatureConfig) Merge

type ImagesCDNHost

type ImagesCDNHost string

type ImagesKeyMaterials

type ImagesKeyMaterials struct {
	jwk.Set
}

func (*ImagesKeyMaterials) MarshalJSON

func (c *ImagesKeyMaterials) MarshalJSON() ([]byte, error)

func (*ImagesKeyMaterials) SensitiveStrings

func (c *ImagesKeyMaterials) SensitiveStrings() []string

func (*ImagesKeyMaterials) UnmarshalJSON

func (c *ImagesKeyMaterials) UnmarshalJSON(b []byte) error

type JWK

type JWK struct {
	jwk.Key
}

func (*JWK) MarshalJSON

func (c *JWK) MarshalJSON() ([]byte, error)

func (*JWK) SensitiveStrings

func (c *JWK) SensitiveStrings() []string

func (*JWK) UnmarshalJSON

func (c *JWK) UnmarshalJSON(b []byte) error

type LDAPConfig

type LDAPConfig struct {
	Servers []*LDAPServerConfig `json:"servers,omitempty"`
}

func (*LDAPConfig) GetServerConfig

func (c *LDAPConfig) GetServerConfig(serverName string) (*LDAPServerConfig, bool)

type LDAPServerConfig

type LDAPServerConfig struct {
	Name                 string `json:"name,omitempty"`
	URL                  string `json:"url,omitempty"`
	BaseDN               string `json:"base_dn,omitempty"`
	SearchFilterTemplate string `json:"search_filter_template,omitempty"`
	UserIDAttributeName  string `json:"user_id_attribute_name,omitempty"`
}

type LDAPServerUserCredentials

type LDAPServerUserCredentials struct {
	Items []LDAPServerUserCredentialsItem `json:"items,omitempty"`
}

func (*LDAPServerUserCredentials) GetItemByServerName

func (c *LDAPServerUserCredentials) GetItemByServerName(serverName string) (*LDAPServerUserCredentialsItem, bool)

func (*LDAPServerUserCredentials) SensitiveStrings

func (c *LDAPServerUserCredentials) SensitiveStrings() []string

type LDAPServerUserCredentialsItem

type LDAPServerUserCredentialsItem struct {
	Name     string `json:"name,omitempty"`
	DN       string `json:"dn,omitempty"`
	Password string `json:"password,omitempty"`
}

func (*LDAPServerUserCredentialsItem) SensitiveStrings

func (c *LDAPServerUserCredentialsItem) SensitiveStrings() []string

type LocalizationConfig

type LocalizationConfig struct {
	FallbackLanguage   *string  `json:"fallback_language,omitempty"`
	SupportedLanguages []string `json:"supported_languages,omitempty"`
}

func (*LocalizationConfig) SetDefaults

func (c *LocalizationConfig) SetDefaults()

type LoginIDConfig

type LoginIDConfig struct {
	Types *LoginIDTypesConfig `json:"types,omitempty"`
	Keys  []LoginIDKeyConfig  `json:"keys,omitempty"`
}

func (*LoginIDConfig) GetKeyConfig

func (c *LoginIDConfig) GetKeyConfig(key string) (*LoginIDKeyConfig, bool)

func (*LoginIDConfig) SetDefaults

func (c *LoginIDConfig) SetDefaults()

type LoginIDEmailConfig

type LoginIDEmailConfig struct {
	CaseSensitive                 *bool `json:"case_sensitive,omitempty"`
	BlockPlusSign                 *bool `json:"block_plus_sign,omitempty"`
	IgnoreDotSign                 *bool `json:"ignore_dot_sign,omitempty"`
	DomainBlocklistEnabled        *bool `json:"domain_blocklist_enabled,omitempty"`
	DomainAllowlistEnabled        *bool `json:"domain_allowlist_enabled,omitempty"`
	BlockFreeEmailProviderDomains *bool `json:"block_free_email_provider_domains,omitempty"`
}

func (*LoginIDEmailConfig) SetDefaults

func (c *LoginIDEmailConfig) SetDefaults()

type LoginIDFeatureConfig

type LoginIDFeatureConfig struct {
	Types *LoginIDTypesFeatureConfig `json:"types,omitempty"`
}

type LoginIDKeyConfig

type LoginIDKeyConfig struct {
	Key                       string               `json:"key,omitempty"`
	Type                      model.LoginIDKeyType `json:"type,omitempty"`
	MaxLength                 *int                 `json:"max_length,omitempty"`
	Deprecated_ModifyDisabled *bool                `json:"modify_disabled,omitempty"`
	UpdateDisabled            *bool                `json:"update_disabled,omitempty"`
	CreateDisabled            *bool                `json:"create_disabled,omitempty"`
	DeleteDisabled            *bool                `json:"delete_disabled,omitempty"`
}

func (*LoginIDKeyConfig) SetDefaults

func (c *LoginIDKeyConfig) SetDefaults()

type LoginIDPhoneFeatureConfig

type LoginIDPhoneFeatureConfig struct {
	Disabled bool `json:"disabled,omitempty"`
}

type LoginIDTypesConfig

type LoginIDTypesConfig struct {
	Email    *LoginIDEmailConfig    `json:"email,omitempty"`
	Username *LoginIDUsernameConfig `json:"username,omitempty"`
}

type LoginIDTypesFeatureConfig

type LoginIDTypesFeatureConfig struct {
	Phone *LoginIDPhoneFeatureConfig `json:"phone,omitempty"`
}

type LoginIDUsernameConfig

type LoginIDUsernameConfig struct {
	BlockReservedUsernames *bool `json:"block_reserved_usernames,omitempty"`
	ExcludeKeywordsEnabled *bool `json:"exclude_keywords_enabled,omitempty"`
	ASCIIOnly              *bool `json:"ascii_only,omitempty"`
	CaseSensitive          *bool `json:"case_sensitive,omitempty"`
}

func (*LoginIDUsernameConfig) SetDefaults

func (c *LoginIDUsernameConfig) SetDefaults()

type MergeableFeatureConfig

type MergeableFeatureConfig interface {
	Merge(layer *FeatureConfig) MergeableFeatureConfig
}

type MessagingConfig

type MessagingConfig struct {
	SMSProvider      SMSProvider                `json:"sms_provider,omitempty"`
	SMSGateway       *SMSGatewayConfig          `json:"sms_gateway,omitempty" nullable:"true"`
	Deprecated_SMS   *SMSConfig                 `json:"sms,omitempty"`
	Deprecated_Email *EmailConfig               `json:"email,omitempty"`
	Whatsapp         *WhatsappConfig            `json:"whatsapp,omitempty"`
	RateLimits       *MessagingRateLimitsConfig `json:"rate_limits,omitempty"`
}

func (*MessagingConfig) SetDefaults

func (c *MessagingConfig) SetDefaults()

type MessagingFeatureConfig

type MessagingFeatureConfig struct {
	RateLimits *MessagingRateLimitsFeatureConfig `json:"rate_limits,omitempty"`

	SMSUsage      *UsageLimitConfig `json:"sms_usage,omitempty"`
	EmailUsage    *UsageLimitConfig `json:"email_usage,omitempty"`
	WhatsappUsage *UsageLimitConfig `json:"whatsapp_usage,omitempty"`

	SMSUsageCountDisabled      *bool `json:"sms_usage_count_disabled,omitempty"`
	WhatsappUsageCountDisabled *bool `json:"whatsapp_usage_count_disabled,omitempty"`

	TemplateCustomizationDisabled *bool `json:"template_customization_disabled,omitempty"`

	CustomSMTPDisabled *bool `json:"custom_smtp_disabled,omitempty"`
}

func (*MessagingFeatureConfig) Merge

func (*MessagingFeatureConfig) SetDefaults

func (c *MessagingFeatureConfig) SetDefaults()

type MessagingRateLimitsConfig

type MessagingRateLimitsConfig struct {
	SMS            *RateLimitConfig `json:"sms,omitempty"`
	SMSPerIP       *RateLimitConfig `json:"sms_per_ip,omitempty"`
	SMSPerTarget   *RateLimitConfig `json:"sms_per_target,omitempty"`
	Email          *RateLimitConfig `json:"email,omitempty"`
	EmailPerIP     *RateLimitConfig `json:"email_per_ip,omitempty"`
	EmailPerTarget *RateLimitConfig `json:"email_per_target,omitempty"`
}

func (*MessagingRateLimitsConfig) SetDefaults

func (c *MessagingRateLimitsConfig) SetDefaults()

type MessagingRateLimitsFeatureConfig

type MessagingRateLimitsFeatureConfig struct {
	SMS            *RateLimitConfig `json:"sms,omitempty"`
	SMSPerIP       *RateLimitConfig `json:"sms_per_ip,omitempty"`
	SMSPerTarget   *RateLimitConfig `json:"sms_per_target,omitempty"`
	Email          *RateLimitConfig `json:"email,omitempty"`
	EmailPerIP     *RateLimitConfig `json:"email_per_ip,omitempty"`
	EmailPerTarget *RateLimitConfig `json:"email_per_target,omitempty"`
}

func (*MessagingRateLimitsFeatureConfig) SetDefaults

func (c *MessagingRateLimitsFeatureConfig) SetDefaults()

type MinIOObjectStoreConfig

type MinIOObjectStoreConfig struct {
	Endpoint        string `envconfig:"ENDPOINT"`
	BucketName      string `envconfig:"BUCKET_NAME"`
	AccessKeyID     string `envconfig:"ACCESS_KEY_ID"`
	SecretAccessKey string `envconfig:"SECRET_ACCESS_KEY"`
}

func (*MinIOObjectStoreConfig) Initialize

func (c *MinIOObjectStoreConfig) Initialize(ctx *validation.Context)

func (*MinIOObjectStoreConfig) Validate

func (c *MinIOObjectStoreConfig) Validate(ctx *validation.Context)

type NexmoCredentials

type NexmoCredentials struct {
	APIKey    string `json:"api_key,omitempty"`
	APISecret string `json:"api_secret,omitempty"`
}

func (*NexmoCredentials) SensitiveStrings

func (c *NexmoCredentials) SensitiveStrings() []string

type NonBlockingHandlerFeatureConfig

type NonBlockingHandlerFeatureConfig struct {
	Maximum *int `json:"maximum,omitempty"`
}

func (*NonBlockingHandlerFeatureConfig) SetDefaults

func (c *NonBlockingHandlerFeatureConfig) SetDefaults()

type NonBlockingHandlersConfig

type NonBlockingHandlersConfig struct {
	Events []string `json:"events"`
	URL    string   `json:"url"`
}

type OAuthClientApplicationType

type OAuthClientApplicationType string
const (
	OAuthClientApplicationTypeSPA            OAuthClientApplicationType = "spa"
	OAuthClientApplicationTypeTraditionalWeb OAuthClientApplicationType = "traditional_webapp"
	OAuthClientApplicationTypeNative         OAuthClientApplicationType = "native"
	OAuthClientApplicationTypeConfidential   OAuthClientApplicationType = "confidential"
	OAuthClientApplicationTypeThirdPartyApp  OAuthClientApplicationType = "third_party_app"
	OAuthClientApplicationTypeUnspecified    OAuthClientApplicationType = ""
)

func (OAuthClientApplicationType) HasFullAccessScope

func (t OAuthClientApplicationType) HasFullAccessScope() bool

func (OAuthClientApplicationType) IsConfidential

func (t OAuthClientApplicationType) IsConfidential() bool

func (OAuthClientApplicationType) IsFirstParty

func (t OAuthClientApplicationType) IsFirstParty() bool

func (OAuthClientApplicationType) IsPublic

func (t OAuthClientApplicationType) IsPublic() bool

func (OAuthClientApplicationType) IsThirdParty

func (t OAuthClientApplicationType) IsThirdParty() bool

func (OAuthClientApplicationType) PIIAllowedInIDToken

func (t OAuthClientApplicationType) PIIAllowedInIDToken() bool

type OAuthClientConfig

type OAuthClientConfig struct {
	ClientID                               string                       `json:"client_id,omitempty"`
	ClientURI                              string                       `json:"client_uri,omitempty"`
	ClientName                             string                       `json:"client_name,omitempty"`
	Name                                   string                       `json:"name,omitempty"`
	ApplicationType                        OAuthClientApplicationType   `json:"x_application_type,omitempty"`
	MaxConcurrentSession                   int                          `json:"x_max_concurrent_session,omitempty"`
	RedirectURIs                           []string                     `json:"redirect_uris,omitempty"`
	GrantTypes                             []string                     `json:"grant_types,omitempty"`
	ResponseTypes                          []string                     `json:"response_types,omitempty"`
	PostLogoutRedirectURIs                 []string                     `json:"post_logout_redirect_uris,omitempty"`
	AccessTokenLifetime                    DurationSeconds              `json:"access_token_lifetime_seconds,omitempty"`
	RefreshTokenLifetime                   DurationSeconds              `json:"refresh_token_lifetime_seconds,omitempty"`
	RefreshTokenIdleTimeoutEnabled         *bool                        `json:"refresh_token_idle_timeout_enabled,omitempty"`
	RefreshTokenIdleTimeout                DurationSeconds              `json:"refresh_token_idle_timeout_seconds,omitempty"`
	IssueJWTAccessToken                    bool                         `json:"issue_jwt_access_token,omitempty"`
	PolicyURI                              string                       `json:"policy_uri,omitempty"`
	TOSURI                                 string                       `json:"tos_uri,omitempty"`
	CustomUIURI                            string                       `json:"x_custom_ui_uri,omitempty"`
	App2appEnabled                         bool                         `json:"x_app2app_enabled,omitempty"`
	App2appInsecureDeviceKeyBindingEnabled bool                         `json:"x_app2app_insecure_device_key_binding_enabled,omitempty"`
	AuthenticationFlowAllowlist            *AuthenticationFlowAllowlist `json:"x_authentication_flow_allowlist,omitempty"`
	PreAuthenticatedURLEnabled             bool                         `json:"x_pre_authenticated_url_enabled,omitempty"`
	PreAuthenticatedURLAllowedOrigins      []string                     `json:"x_pre_authenticated_url_allowed_origins,omitempty"`
}

func GenerateOAuthConfigFromOptions

func GenerateOAuthConfigFromOptions(opts *GenerateOAuthClientConfigOptions) (*OAuthClientConfig, error)

func (*OAuthClientConfig) DefaultRedirectURI

func (c *OAuthClientConfig) DefaultRedirectURI() string

func (*OAuthClientConfig) HasFullAccessScope

func (c *OAuthClientConfig) HasFullAccessScope() bool

func (*OAuthClientConfig) IsConfidential

func (c *OAuthClientConfig) IsConfidential() bool

func (*OAuthClientConfig) IsFirstParty

func (c *OAuthClientConfig) IsFirstParty() bool

func (*OAuthClientConfig) IsPublic

func (c *OAuthClientConfig) IsPublic() bool

func (*OAuthClientConfig) IsThirdParty

func (c *OAuthClientConfig) IsThirdParty() bool

func (*OAuthClientConfig) PIIAllowedInIDToken

func (c *OAuthClientConfig) PIIAllowedInIDToken() bool

func (*OAuthClientConfig) SetDefaults

func (c *OAuthClientConfig) SetDefaults()

type OAuthClientCredentials

type OAuthClientCredentials struct {
	Items []OAuthClientCredentialsItem `json:"items,omitempty"`
}

func (*OAuthClientCredentials) Lookup

func (*OAuthClientCredentials) SensitiveStrings

func (c *OAuthClientCredentials) SensitiveStrings() []string

type OAuthClientCredentialsItem

type OAuthClientCredentialsItem struct {
	// It is important to update `MarshalJSON` and `UnmarshalJSON` functions
	// when updating fields of OAuthClientCredentialsItem
	ClientID string `json:"client_id,omitempty"`
	OAuthClientCredentialsKeySet
}

func (*OAuthClientCredentialsItem) MarshalJSON

func (c *OAuthClientCredentialsItem) MarshalJSON() ([]byte, error)

func (*OAuthClientCredentialsItem) UnmarshalJSON

func (c *OAuthClientCredentialsItem) UnmarshalJSON(b []byte) error

type OAuthClientCredentialsKeySet

type OAuthClientCredentialsKeySet struct {
	jwk.Set
}

func (*OAuthClientCredentialsKeySet) MarshalJSON

func (c *OAuthClientCredentialsKeySet) MarshalJSON() ([]byte, error)

func (*OAuthClientCredentialsKeySet) SensitiveStrings

func (c *OAuthClientCredentialsKeySet) SensitiveStrings() []string

func (*OAuthClientCredentialsKeySet) UnmarshalJSON

func (c *OAuthClientCredentialsKeySet) UnmarshalJSON(b []byte) error

type OAuthClientFeatureConfig

type OAuthClientFeatureConfig struct {
	Maximum         *int `json:"maximum,omitempty"`
	SoftMaximum     *int `json:"soft_maximum,omitempty"`
	CustomUIEnabled bool `json:"custom_ui_enabled,omitempty"`
	App2AppEnabled  bool `json:"app2app_enabled,omitempty"`
}

func (*OAuthClientFeatureConfig) SetDefaults

func (c *OAuthClientFeatureConfig) SetDefaults()

type OAuthClientSecretsUpdateInstruction

type OAuthClientSecretsUpdateInstruction struct {
	Action SecretUpdateInstructionAction `json:"action,omitempty"`

	GenerateData *OAuthClientSecretsUpdateInstructionGenerateData `json:"generateData,omitempty"`
	CleanupData  *OAuthClientSecretsUpdateInstructionCleanupData  `json:"cleanupData,omitempty"`
}

func (*OAuthClientSecretsUpdateInstruction) ApplyTo

type OAuthClientSecretsUpdateInstructionCleanupData

type OAuthClientSecretsUpdateInstructionCleanupData struct {
	KeepClientIDs []string `json:"keepClientIDs,omitempty"`
}

type OAuthClientSecretsUpdateInstructionGenerateData

type OAuthClientSecretsUpdateInstructionGenerateData struct {
	ClientID string `json:"clientID,omitempty"`
}

type OAuthConfig

type OAuthConfig struct {
	Clients []OAuthClientConfig `json:"clients,omitempty"`
}

func (*OAuthConfig) GetClient

func (c *OAuthConfig) GetClient(clientID string) (*OAuthClientConfig, bool)

type OAuthFeatureConfig

type OAuthFeatureConfig struct {
	Client *OAuthClientFeatureConfig `json:"client,omitempty"`
}

func (*OAuthFeatureConfig) Merge

type OAuthKeyMaterials

type OAuthKeyMaterials struct {
	jwk.Set
}

func (*OAuthKeyMaterials) MarshalJSON

func (c *OAuthKeyMaterials) MarshalJSON() ([]byte, error)

func (*OAuthKeyMaterials) SensitiveStrings

func (c *OAuthKeyMaterials) SensitiveStrings() []string

func (*OAuthKeyMaterials) UnmarshalJSON

func (c *OAuthKeyMaterials) UnmarshalJSON(b []byte) error

type OAuthSSOConfig

type OAuthSSOConfig struct {
	Providers []OAuthSSOProviderConfig `json:"providers,omitempty"`
}

func (*OAuthSSOConfig) GetProviderConfig

func (c *OAuthSSOConfig) GetProviderConfig(alias string) (oauthrelyingparty.ProviderConfig, bool)

type OAuthSSOFeatureConfig

type OAuthSSOFeatureConfig struct {
	MaximumProviders *int                            `json:"maximum_providers,omitempty"`
	Providers        *OAuthSSOProvidersFeatureConfig `json:"providers,omitempty"`
}

func (*OAuthSSOFeatureConfig) SetDefaults

func (c *OAuthSSOFeatureConfig) SetDefaults()

type OAuthSSOProviderConfig

type OAuthSSOProviderConfig oauthrelyingparty.ProviderConfig

func (OAuthSSOProviderConfig) Alias

func (c OAuthSSOProviderConfig) Alias() string

func (OAuthSSOProviderConfig) AsProviderConfig

func (OAuthSSOProviderConfig) CreateDisabled

func (c OAuthSSOProviderConfig) CreateDisabled() bool

func (OAuthSSOProviderConfig) DeleteDisabled

func (c OAuthSSOProviderConfig) DeleteDisabled() bool

func (OAuthSSOProviderConfig) SetDefaults

func (c OAuthSSOProviderConfig) SetDefaults()

type OAuthSSOProviderCredentials

type OAuthSSOProviderCredentials struct {
	Items []OAuthSSOProviderCredentialsItem `json:"items,omitempty"`
}

func (*OAuthSSOProviderCredentials) Lookup

func (*OAuthSSOProviderCredentials) SensitiveStrings

func (c *OAuthSSOProviderCredentials) SensitiveStrings() []string

type OAuthSSOProviderCredentialsItem

type OAuthSSOProviderCredentialsItem struct {
	Alias        string `json:"alias,omitempty"`
	ClientSecret string `json:"client_secret,omitempty"`
}

func (*OAuthSSOProviderCredentialsItem) SensitiveStrings

func (c *OAuthSSOProviderCredentialsItem) SensitiveStrings() []string

type OAuthSSOProviderCredentialsUpdateInstruction

type OAuthSSOProviderCredentialsUpdateInstruction struct {
	Action SecretUpdateInstructionAction                          `json:"action,omitempty"`
	Data   []OAuthSSOProviderCredentialsUpdateInstructionDataItem `json:"data,omitempty"`
}

func (*OAuthSSOProviderCredentialsUpdateInstruction) ApplyTo

type OAuthSSOProviderCredentialsUpdateInstructionDataItem

type OAuthSSOProviderCredentialsUpdateInstructionDataItem struct {
	OriginalAlias   *string `json:"originalAlias,omitempty"`
	NewAlias        string  `json:"newAlias,omitempty"`
	NewClientSecret *string `json:"newClientSecret,omitempty"`
}

type OAuthSSOProviderFeatureConfig

type OAuthSSOProviderFeatureConfig struct {
	Disabled bool `json:"disabled,omitempty"`
}

type OAuthSSOProvidersFeatureConfig

type OAuthSSOProvidersFeatureConfig struct {
	Google     *OAuthSSOProviderFeatureConfig `json:"google,omitempty"`
	Facebook   *OAuthSSOProviderFeatureConfig `json:"facebook,omitempty"`
	Github     *OAuthSSOProviderFeatureConfig `json:"github,omitempty"`
	LinkedIn   *OAuthSSOProviderFeatureConfig `json:"linkedin,omitempty"`
	Azureadv2  *OAuthSSOProviderFeatureConfig `json:"azureadv2,omitempty"`
	Azureadb2c *OAuthSSOProviderFeatureConfig `json:"azureadb2c,omitempty"`
	ADFS       *OAuthSSOProviderFeatureConfig `json:"adfs,omitempty"`
	Apple      *OAuthSSOProviderFeatureConfig `json:"apple,omitempty"`
	Wechat     *OAuthSSOProviderFeatureConfig `json:"wechat,omitempty"`
}

func (*OAuthSSOProvidersFeatureConfig) IsDisabled

type OTPLegacyConfig

type OTPLegacyConfig struct {
	Ratelimit *OTPLegacyRatelimitConfig `json:"ratelimit,omitempty"`
}

type OTPLegacyFailedAttemptConfig

type OTPLegacyFailedAttemptConfig struct {
	Enabled     bool           `json:"enabled,omitempty"`
	Size        int            `json:"size,omitempty"`
	ResetPeriod DurationString `json:"reset_period,omitempty"`
}

func (*OTPLegacyFailedAttemptConfig) SetDefaults

func (c *OTPLegacyFailedAttemptConfig) SetDefaults()

type OTPLegacyRatelimitConfig

type OTPLegacyRatelimitConfig struct {
	FailedAttempt *OTPLegacyFailedAttemptConfig `json:"failed_attempt,omitempty"`
}

type ObjectStoreType

type ObjectStoreType string
const (
	ObjectStoreTypeAWSS3            ObjectStoreType = "AWS_S3"
	ObjectStoreTypeGCPGCS           ObjectStoreType = "GCP_GCS"
	ObjectStoreTypeAzureBlobStorage ObjectStoreType = "AZURE_BLOB_STORAGE"
	ObjectStoreTypeMinIO            ObjectStoreType = "MINIO"
)

type PasswordExpiryConfig

type PasswordExpiryConfig struct {
	ForceChange *PasswordExpiryForceChangeConfig `json:"force_change,omitempty"`
}

func (*PasswordExpiryConfig) SetDefaults

func (c *PasswordExpiryConfig) SetDefaults()

type PasswordExpiryForceChangeConfig

type PasswordExpiryForceChangeConfig struct {
	Enabled                 bool           `json:"enabled,omitempty"`
	DurationSinceLastUpdate DurationString `json:"duration_since_last_update,omitempty"`
}

func (*PasswordExpiryForceChangeConfig) IsEnabled

func (c *PasswordExpiryForceChangeConfig) IsEnabled() bool

type PasswordFailedAttemptConfig

type PasswordFailedAttemptConfig struct {
	Size        int            `json:"size,omitempty"`
	ResetPeriod DurationString `json:"reset_period,omitempty"`
}

func (*PasswordFailedAttemptConfig) SetDefaults

func (c *PasswordFailedAttemptConfig) SetDefaults()

type PasswordPolicyConfig

type PasswordPolicyConfig struct {
	MinLength             *int         `json:"min_length,omitempty"`
	UppercaseRequired     bool         `json:"uppercase_required,omitempty"`
	LowercaseRequired     bool         `json:"lowercase_required,omitempty"`
	AlphabetRequired      bool         `json:"alphabet_required,omitempty"`
	DigitRequired         bool         `json:"digit_required,omitempty"`
	SymbolRequired        bool         `json:"symbol_required,omitempty"`
	MinimumGuessableLevel int          `json:"minimum_guessable_level,omitempty"`
	ExcludedKeywords      []string     `json:"excluded_keywords,omitempty"`
	HistorySize           int          `json:"history_size,omitempty"`
	HistoryDays           DurationDays `json:"history_days,omitempty"`
}

func (*PasswordPolicyConfig) IsEnabled

func (c *PasswordPolicyConfig) IsEnabled() bool

func (*PasswordPolicyConfig) SetDefaults

func (c *PasswordPolicyConfig) SetDefaults()

type PasswordPolicyFeatureConfig

type PasswordPolicyFeatureConfig struct {
	MinimumGuessableLevel *PasswordPolicyItemFeatureConfig `json:"minimum_guessable_level,omitempty"`
	ExcludedKeywords      *PasswordPolicyItemFeatureConfig `json:"excluded_keywords,omitempty"`
	History               *PasswordPolicyItemFeatureConfig `json:"history,omitempty"`
}

type PasswordPolicyItemFeatureConfig

type PasswordPolicyItemFeatureConfig struct {
	Disabled *bool `json:"disabled,omitempty"`
}

func (*PasswordPolicyItemFeatureConfig) SetDefaults

func (c *PasswordPolicyItemFeatureConfig) SetDefaults()

type PasswordRatelimitConfig

type PasswordRatelimitConfig struct {
	FailedAttempt *PasswordFailedAttemptConfig `json:"failed_attempt,omitempty"`
}

PasswordRatelimitConfig is deprecated

type PhoneInputConfig

type PhoneInputConfig struct {
	AllowList             []string `json:"allowlist,omitempty"`
	PinnedList            []string `json:"pinned_list,omitempty"`
	PreselectByIPDisabled bool     `json:"preselect_by_ip_disabled,omitempty"`
}

func (*PhoneInputConfig) SetDefaults

func (c *PhoneInputConfig) SetDefaults()

type PromotionConflictBehavior

type PromotionConflictBehavior string
const (
	PromotionConflictBehaviorError PromotionConflictBehavior = "error"
	PromotionConflictBehaviorLogin PromotionConflictBehavior = "login"
)

type RateLimitConfig

type RateLimitConfig struct {
	Enabled *bool          `json:"enabled,omitempty"`
	Period  DurationString `json:"period,omitempty"`
	Burst   int            `json:"burst,omitempty"`
}

func (*RateLimitConfig) Rate

func (c *RateLimitConfig) Rate() float64

func (*RateLimitConfig) SetDefaults

func (c *RateLimitConfig) SetDefaults()

type RateLimitsEnvironmentConfig

type RateLimitsEnvironmentConfig struct {
	SMS             RateLimitsEnvironmentConfigEntry `envconfig:"SMS"`
	SMSPerIP        RateLimitsEnvironmentConfigEntry `envconfig:"SMS_PER_IP"`
	SMSPerTarget    RateLimitsEnvironmentConfigEntry `envconfig:"SMS_PER_TARGET" default:"50/24h"`
	Email           RateLimitsEnvironmentConfigEntry `envconfig:"EMAIL"`
	EmailPerIP      RateLimitsEnvironmentConfigEntry `envconfig:"EMAIL_PER_IP"`
	EmailPerTarget  RateLimitsEnvironmentConfigEntry `envconfig:"EMAIL_PER_TARGET" default:"50/24h"`
	TaskUserImport  RateLimitsEnvironmentConfigEntry `envconfig:"TASK_USER_IMPORT"`
	TaskUserExport  RateLimitsEnvironmentConfigEntry `envconfig:"TASK_USER_EXPORT"`
	TaskUserReindex RateLimitsEnvironmentConfigEntry `envconfig:"TASK_USER_REINDEX"`
}

type RateLimitsEnvironmentConfigEntry

type RateLimitsEnvironmentConfigEntry struct {
	Enabled bool
	Period  time.Duration
	Burst   int
}

func (*RateLimitsEnvironmentConfigEntry) Set

type RateLimitsFeatureConfig

type RateLimitsFeatureConfig struct {
	Disabled bool `json:"disabled,omitempty"`
}

func (*RateLimitsFeatureConfig) Merge

type RecoveryCodeConfig

type RecoveryCodeConfig struct {
	Disabled    *bool `json:"disabled,omitempty"`
	Count       int   `json:"count,omitempty"`
	ListEnabled bool  `json:"list_enabled,omitempty"`
}

func (*RecoveryCodeConfig) SetDefaults

func (c *RecoveryCodeConfig) SetDefaults()

type RedisCredentials

type RedisCredentials struct {
	RedisURL string `json:"redis_url,omitempty"`
}

func (*RedisCredentials) SensitiveStrings

func (c *RedisCredentials) SensitiveStrings() []string

type RedisEnvironmentConfig

type RedisEnvironmentConfig struct {
	// Now we use redis pubsub, we need to have much greater number of connections.
	// https://redis.io/topics/clients#maximum-number-of-clients
	MaxOpenConnection     int             `envconfig:"MAX_OPEN_CONN" default:"10000"`
	MaxIdleConnection     int             `envconfig:"MAX_IDLE_CONN" default:"2"`
	MaxConnectionLifetime DurationSeconds `envconfig:"MAX_CONN_LIFETIME" default:"900"`
	IdleConnectionTimeout DurationSeconds `envconfig:"IDLE_CONN_TIMEOUT" default:"300"`
}

func NewDefaultRedisEnvironmentConfig

func NewDefaultRedisEnvironmentConfig() *RedisEnvironmentConfig

NewDefaultRedisEnvironmentConfig provides default redis config

type SAMLConfig

type SAMLConfig struct {
	Signing          *SAMLSigningConfig           `json:"signing,omitempty"`
	ServiceProviders []*SAMLServiceProviderConfig `json:"service_providers,omitempty"`
}

func (*SAMLConfig) ResolveProvider

func (c *SAMLConfig) ResolveProvider(id string) (*SAMLServiceProviderConfig, bool)

type SAMLEnvironmentConfig

type SAMLEnvironmentConfig struct {
	IdPEntityIDTemplate string `envconfig:"IDP_ENTITY_ID_TEMPLATE" default:"urn:{{.app_id}}.localhost"`
}

type SAMLIdpSigningCertificate

type SAMLIdpSigningCertificate struct {
	Certificate *X509Certificate `json:"certificate,omitempty"`
	Key         *JWK             `json:"key,omitempty"`
}

func GenerateSAMLIdpSigningCertificate

func GenerateSAMLIdpSigningCertificate(commonName string) (*SAMLIdpSigningCertificate, error)

type SAMLIdpSigningMaterials

type SAMLIdpSigningMaterials struct {
	Certificates []*SAMLIdpSigningCertificate `json:"certificates,omitempty"`
}

func (*SAMLIdpSigningMaterials) FindSigningCert

func (m *SAMLIdpSigningMaterials) FindSigningCert(keyID string) (*SAMLIdpSigningCertificate, bool)

func (*SAMLIdpSigningMaterials) SensitiveStrings

func (s *SAMLIdpSigningMaterials) SensitiveStrings() []string

type SAMLIdpSigningSecretsUpdateInstruction

type SAMLIdpSigningSecretsUpdateInstruction struct {
	Action     SecretUpdateInstructionAction                     `json:"action,omitempty"`
	DeleteData *SAMLIdpSigningSecretsUpdateInstructionDeleteData `json:"deleteData,omitempty"`
}

func (*SAMLIdpSigningSecretsUpdateInstruction) ApplyTo

type SAMLIdpSigningSecretsUpdateInstructionDeleteData

type SAMLIdpSigningSecretsUpdateInstructionDeleteData struct {
	KeyIDs []string `json:"keyIDs,omitempty"`
}

type SAMLNameIDAttributePointer

type SAMLNameIDAttributePointer string

func (SAMLNameIDAttributePointer) MustGetJSONPointer

func (p SAMLNameIDAttributePointer) MustGetJSONPointer() jsonpointer.T

type SAMLServiceProviderConfig

type SAMLServiceProviderConfig struct {
	ClientID                     string                        `json:"client_id,omitempty"`
	NameIDFormat                 samlprotocol.SAMLNameIDFormat `json:"nameid_format,omitempty"`
	NameIDAttributePointer       SAMLNameIDAttributePointer    `json:"nameid_attribute_pointer,omitempty"`
	AcsURLs                      []string                      `json:"acs_urls,omitempty"`
	Destination                  string                        `json:"destination,omitempty"`
	Recipient                    string                        `json:"recipient,omitempty"`
	Audience                     string                        `json:"audience,omitempty"`
	AssertionValidDuration       DurationString                `json:"assertion_valid_duration,omitempty"`
	SLOEnabled                   bool                          `json:"slo_enabled,omitempty"`
	SLOCallbackURL               string                        `json:"slo_callback_url,omitempty"`
	SLOBinding                   samlprotocol.SAMLBinding      `json:"slo_binding,omitempty"`
	SignatureVerificationEnabled bool                          `json:"signature_verification_enabled,omitempty"`
}

func (*SAMLServiceProviderConfig) DefaultAcsURL

func (c *SAMLServiceProviderConfig) DefaultAcsURL() string

func (*SAMLServiceProviderConfig) GetID

func (c *SAMLServiceProviderConfig) GetID() string

func (*SAMLServiceProviderConfig) SetDefaults

func (c *SAMLServiceProviderConfig) SetDefaults()

type SAMLSigningConfig

type SAMLSigningConfig struct {
	KeyID           string                     `json:"key_id,omitempty"`
	SignatureMethod SAMLSigningSignatureMethod `json:"signature_method,omitempty"`
}

func (*SAMLSigningConfig) SetDefaults

func (c *SAMLSigningConfig) SetDefaults()

type SAMLSigningDigestMethod

type SAMLSigningDigestMethod string
const (
	SAMLSigningDigestMethodSHA256 SAMLSigningDigestMethod = "SHA256"
)

type SAMLSigningSignatureMethod

type SAMLSigningSignatureMethod string
const (
	SAMLSigningSignatureMethodRSASHA256 SAMLSigningSignatureMethod = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
)

type SAMLSpSigningCertificate

type SAMLSpSigningCertificate struct {
	ServiceProviderID string            `json:"service_provider_id,omitempty"`
	Certificates      []X509Certificate `json:"certificates,omitempty"`
}

type SAMLSpSigningMaterials

type SAMLSpSigningMaterials []SAMLSpSigningCertificate

func (*SAMLSpSigningMaterials) Resolve

func (*SAMLSpSigningMaterials) SensitiveStrings

func (s *SAMLSpSigningMaterials) SensitiveStrings() []string

type SAMLSpSigningSecretsUpdateInstruction

type SAMLSpSigningSecretsUpdateInstruction struct {
	Action  SecretUpdateInstructionAction                 `json:"action,omitempty"`
	SetData *SAMLSpSigningSecretsUpdateInstructionSetData `json:"setData,omitempty"`
}

func (*SAMLSpSigningSecretsUpdateInstruction) ApplyTo

type SAMLSpSigningSecretsUpdateInstructionSetData

type SAMLSpSigningSecretsUpdateInstructionSetData struct {
	Items []SAMLSpSigningSecretsUpdateInstructionSetDataItem `json:"items,omitempty"`
}

type SAMLSpSigningSecretsUpdateInstructionSetDataItem

type SAMLSpSigningSecretsUpdateInstructionSetDataItem struct {
	ClientID     string   `json:"clientID,omitempty"`
	Certificates []string `json:"certificates,omitempty"`
}

type SMSConfig

type SMSConfig struct {
	Ratelimit *SMSRatelimitConfig `json:"ratelimit,omitempty"`
}

SMSConfig is deprecated.

type SMSGatewayConfig

type SMSGatewayConfig struct {
	UseConfigFrom SMSGatewayConfigUseConfigFrom `json:"use_config_from,omitempty"`
	Provider      SMSProvider                   `json:"provider,omitempty"`
}

type SMSGatewayConfigUseConfigFrom

type SMSGatewayConfigUseConfigFrom string
const (
	SMSGatewayUseConfigFromEnvironmentVariable SMSGatewayConfigUseConfigFrom = "environment_variable"
	SMSGatewayUseConfigFromAuthgearSecretsYAML SMSGatewayConfigUseConfigFrom = "authgear.secrets.yaml"
)

type SMSGatewayEnvironmentConfig

type SMSGatewayEnvironmentConfig struct {
	Twilio  SMSGatewayEnvironmentTwilioCredentials       `envconfig:"TWILIO"`
	Nexmo   SMSGatewayEnvironmentNexmoCredentials        `envconfig:"NEXMO"`
	Custom  SMSGatewayEnvironmentCustomSMSProviderConfig `envconfig:"CUSTOM"`
	Default SMSGatewayEnvironmentDefaultConfig           `envconfig:"DEFAULT"`
}

type SMSGatewayEnvironmentCustomSMSProviderConfig

type SMSGatewayEnvironmentCustomSMSProviderConfig struct {
	URL     string `envconfig:"URL"`
	Timeout string `envconfig:"TIMEOUT"`
}

type SMSGatewayEnvironmentDefaultConfig

type SMSGatewayEnvironmentDefaultConfig struct {
	UseConfigFrom SMSGatewayEnvironmentDefaultUseConfigFrom `envconfig:"USE_CONFIG_FROM"`
	Provider      SMSGatewayEnvironmentDefaultProvider      `envconfig:"PROVIDER"`
}

type SMSGatewayEnvironmentDefaultProvider

type SMSGatewayEnvironmentDefaultProvider string
const (
	SMSGatewayEnvironmentDefaultProviderNexmo  SMSGatewayEnvironmentDefaultProvider = "nexmo"
	SMSGatewayEnvironmentDefaultProviderTwilio SMSGatewayEnvironmentDefaultProvider = "twilio"
	SMSGatewayEnvironmentDefaultProviderCustom SMSGatewayEnvironmentDefaultProvider = "custom"
)

type SMSGatewayEnvironmentDefaultUseConfigFrom

type SMSGatewayEnvironmentDefaultUseConfigFrom string
const (
	SMSGatewayEnvironmentDefaultUseConfigFromEnvironmentVariable SMSGatewayEnvironmentDefaultUseConfigFrom = "environment_variable"
	SMSGatewayEnvironmentDefaultUseConfigFromAuthgearSecretsYAML SMSGatewayEnvironmentDefaultUseConfigFrom = "authgear.secrets.yaml"
)

type SMSGatewayEnvironmentNexmoCredentials

type SMSGatewayEnvironmentNexmoCredentials struct {
	APIKey    string `envconfig:"API_KEY"`
	APISecret string `envconfig:"API_SECRET"`
}

type SMSGatewayEnvironmentTwilioCredentials

type SMSGatewayEnvironmentTwilioCredentials struct {
	AccountSID          string `envconfig:"ACCOUNT_SID"`
	AuthToken           string `envconfig:"AUTH_TOKEN"`
	MessagingServiceSID string `envconfig:"MESSAGING_SERVICE_SID"`
}

type SMSProvider

type SMSProvider string
const (
	SMSProviderNexmo  SMSProvider = "nexmo"
	SMSProviderTwilio SMSProvider = "twilio"
	SMSProviderCustom SMSProvider = "custom"
)

type SMSRateLimitPerIPConfig

type SMSRateLimitPerIPConfig struct {
	Enabled     bool           `json:"enabled,omitempty"`
	Size        int            `json:"size,omitempty"`
	ResetPeriod DurationString `json:"reset_period,omitempty"`
}

func (*SMSRateLimitPerIPConfig) SetDefaults

func (c *SMSRateLimitPerIPConfig) SetDefaults()

type SMSRateLimitPerPhoneConfig

type SMSRateLimitPerPhoneConfig struct {
	Enabled     bool           `json:"enabled,omitempty"`
	Size        int            `json:"size,omitempty"`
	ResetPeriod DurationString `json:"reset_period,omitempty"`
}

func (*SMSRateLimitPerPhoneConfig) SetDefaults

func (c *SMSRateLimitPerPhoneConfig) SetDefaults()

type SMSRatelimitConfig

type SMSRatelimitConfig struct {
	PerPhone              *SMSRateLimitPerPhoneConfig `json:"per_phone,omitempty"`
	PerIP                 *SMSRateLimitPerIPConfig    `json:"per_ip,omitempty"`
	ResendCooldownSeconds DurationSeconds             `json:"resend_cooldown_seconds,omitempty"`
}

func (*SMSRatelimitConfig) SetDefaults

func (c *SMSRatelimitConfig) SetDefaults()

type SMTPMode

type SMTPMode string
const (
	SMTPModeNormal SMTPMode = "normal"
	SMTPModeSSL    SMTPMode = "ssl"
)

type SMTPServerCredentials

type SMTPServerCredentials struct {
	Host     string   `json:"host,omitempty"`
	Port     int      `json:"port,omitempty"`
	Mode     SMTPMode `json:"mode,omitempty"`
	Username string   `json:"username,omitempty"`
	Password string   `json:"password,omitempty"`
}

func (*SMTPServerCredentials) SensitiveStrings

func (c *SMTPServerCredentials) SensitiveStrings() []string

func (*SMTPServerCredentials) SetDefaults

func (c *SMTPServerCredentials) SetDefaults()

type SMTPServerCredentialsUpdateInstruction

type SMTPServerCredentialsUpdateInstruction struct {
	Action SecretUpdateInstructionAction               `json:"action,omitempty"`
	Data   *SMTPServerCredentialsUpdateInstructionData `json:"data,omitempty"`
}

func (*SMTPServerCredentialsUpdateInstruction) ApplyTo

type SMTPServerCredentialsUpdateInstructionData

type SMTPServerCredentialsUpdateInstructionData struct {
	Host     string `json:"host,omitempty"`
	Port     int    `json:"port,omitempty"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

type SearchConfig

type SearchConfig struct {
	Implementation SearchImplementation `json:"implementation,omitempty"`
}

func (*SearchConfig) GetImplementation

func (c *SearchConfig) GetImplementation() SearchImplementation

type SearchDatabaseCredentials

type SearchDatabaseCredentials struct {
	DatabaseURL    string `json:"database_url,omitempty"`
	DatabaseSchema string `json:"database_schema,omitempty"`
}

func (*SearchDatabaseCredentials) SensitiveStrings

func (c *SearchDatabaseCredentials) SensitiveStrings() []string

type SearchImplementation

type SearchImplementation string
const (
	SearchImplementationDefault       SearchImplementation = ""
	SearchImplementationElasticsearch SearchImplementation = "elasticsearch"
	SearchImplementationPostgresql    SearchImplementation = "postgresql"
	SearchImplementationNone          SearchImplementation = "none"
)

type SecondaryAuthenticationGracePeriodConfig

type SecondaryAuthenticationGracePeriodConfig struct {
	Enabled bool       `json:"enabled,omitempty"`
	EndAt   *time.Time `json:"end_at,omitempty"`
}

func (*SecondaryAuthenticationGracePeriodConfig) SetDefaults

type SecondaryAuthenticationMode

type SecondaryAuthenticationMode string
const (
	SecondaryAuthenticationModeDefault  SecondaryAuthenticationMode = ""
	SecondaryAuthenticationModeDisabled SecondaryAuthenticationMode = "disabled"
	SecondaryAuthenticationModeIfExists SecondaryAuthenticationMode = "if_exists"
	SecondaryAuthenticationModeRequired SecondaryAuthenticationMode = "required"
)

func (SecondaryAuthenticationMode) IsDisabled

func (m SecondaryAuthenticationMode) IsDisabled() bool

type SecretConfig

type SecretConfig struct {
	Secrets []SecretItem `json:"secrets,omitempty"`
}

func GenerateSecretConfigFromOptions

func GenerateSecretConfigFromOptions(opts *GenerateSecretConfigOptions, createdAt time.Time, rng *mathrand.Rand) *SecretConfig

func ParsePartialSecret

func ParsePartialSecret(inputYAML []byte) (*SecretConfig, error)

ParsePartialSecret unmarshals inputYAML into a full SecretConfig, without performing validation.

func ParseSecret

func ParseSecret(inputYAML []byte) (*SecretConfig, error)

func (*SecretConfig) GetCustomSMSProviderConfig

func (c *SecretConfig) GetCustomSMSProviderConfig() *CustomSMSProviderConfig

func (*SecretConfig) Lookup

func (c *SecretConfig) Lookup(key SecretKey) (int, *SecretItem, bool)

func (*SecretConfig) LookupData

func (c *SecretConfig) LookupData(key SecretKey) SecretItemData

func (*SecretConfig) LookupDataWithIndex

func (c *SecretConfig) LookupDataWithIndex(key SecretKey) (int, SecretItemData, bool)

func (*SecretConfig) Overlay

func (c *SecretConfig) Overlay(layers ...*SecretConfig) *SecretConfig

func (*SecretConfig) Validate

func (c *SecretConfig) Validate(appConfig *AppConfig) error

type SecretConfigUpdateInstruction

type SecretConfigUpdateInstruction struct {
	OAuthSSOProviderCredentialsUpdateInstruction      *OAuthSSOProviderCredentialsUpdateInstruction      `json:"oauthSSOProviderClientSecrets,omitempty"`
	SMTPServerCredentialsUpdateInstruction            *SMTPServerCredentialsUpdateInstruction            `json:"smtpSecret,omitempty"`
	OAuthClientSecretsUpdateInstruction               *OAuthClientSecretsUpdateInstruction               `json:"oauthClientSecrets,omitempty"`
	AdminAPIAuthKeyUpdateInstruction                  *AdminAPIAuthKeyUpdateInstruction                  `json:"adminAPIAuthKey,omitempty"`
	BotProtectionProviderCredentialsUpdateInstruction *BotProtectionProviderCredentialsUpdateInstruction `json:"botProtectionProviderSecret,omitempty"`
	SAMLIdpSigningSecretsUpdateInstruction            *SAMLIdpSigningSecretsUpdateInstruction            `json:"samlIdpSigningSecrets,omitempty"`
	SAMLSpSigningSecretsUpdateInstruction             *SAMLSpSigningSecretsUpdateInstruction             `json:"samlSpSigningSecrets,omitempty"`
}

func (*SecretConfigUpdateInstruction) ApplyTo

type SecretConfigUpdateInstructionContext

type SecretConfigUpdateInstructionContext struct {
	Clock                             clock.Clock
	GenerateClientSecretOctetKeyFunc  func(createdAt time.Time, rng *mathrand.Rand) jwk.Key
	GenerateAdminAPIAuthKeyFunc       func(createdAt time.Time, rng *mathrand.Rand) jwk.Key
	GenerateSAMLIdpSigningCertificate func() (*SAMLIdpSigningCertificate, error)
}

type SecretConfigUpdateInstructionInterface

type SecretConfigUpdateInstructionInterface interface {
	ApplyTo(ctx *SecretConfigUpdateInstructionContext, currentConfig *SecretConfig) (*SecretConfig, error)
}

type SecretItem

type SecretItem struct {
	Key     SecretKey       `json:"key,omitempty"`
	RawData json.RawMessage `json:"data,omitempty"`
	Data    SecretItemData  `json:"-"`
}

type SecretItemData

type SecretItemData interface {
	SensitiveStrings() []string
}

type SecretKey

type SecretKey string
const (
	DatabaseCredentialsKey       SecretKey = "db"
	AuditDatabaseCredentialsKey  SecretKey = "audit.db"
	ElasticsearchCredentialsKey  SecretKey = "elasticsearch"
	SearchDatabaseCredentialsKey SecretKey = "search.db"
	RedisCredentialsKey          SecretKey = "redis"
	// nolint: gosec
	AnalyticRedisCredentialsKey SecretKey = "analytic.redis"
	AdminAPIAuthKeyKey          SecretKey = "admin-api.auth"
	// nolint: gosec
	OAuthSSOProviderCredentialsKey SecretKey = "sso.oauth.client"
	SMTPServerCredentialsKey       SecretKey = "mail.smtp"
	// nolint: gosec
	TwilioCredentialsKey SecretKey = "sms.twilio"
	// nolint: gosec
	NexmoCredentialsKey        SecretKey = "sms.nexmo"
	CustomSMSProviderConfigKey SecretKey = "sms.custom"
	OAuthKeyMaterialsKey       SecretKey = "oauth"
	CSRFKeyMaterialsKey        SecretKey = "csrf"
	WebhookKeyMaterialsKey     SecretKey = "webhook"
	ImagesKeyMaterialsKey      SecretKey = "images"
	WATICredentialsKey         SecretKey = "whatsapp.wati"
	// nolint: gosec
	OAuthClientCredentialsKey SecretKey = "oauth.client_secrets"
	// nolint: gosec
	Deprecated_CaptchaCloudflareCredentialsKey SecretKey = "captcha.cloudflare"
	BotProtectionProviderCredentialsKey        SecretKey = "bot_protection.provider"
	WhatsappOnPremisesCredentialsKey           SecretKey = "whatsapp.on-premises"
	LDAPServerUserCredentialsKey               SecretKey = "ldap"

	SAMLIdpSigningMaterialsKey SecretKey = "saml.idp.signing"
	SAMLSpSigningMaterialsKey  SecretKey = "saml.service_providers.signing"
)

func (SecretKey) IsUpdatable

func (key SecretKey) IsUpdatable() bool

type SecretUpdateInstructionAction

type SecretUpdateInstructionAction string
const (
	SecretUpdateInstructionActionSet      SecretUpdateInstructionAction = "set"
	SecretUpdateInstructionActionUnset    SecretUpdateInstructionAction = "unset"
	SecretUpdateInstructionActionGenerate SecretUpdateInstructionAction = "generate"
	SecretUpdateInstructionActionCleanup  SecretUpdateInstructionAction = "cleanup"
	SecretUpdateInstructionActionDelete   SecretUpdateInstructionAction = "delete"
)

type SentryDSN

type SentryDSN string

type SessionConfig

type SessionConfig struct {
	Lifetime                       DurationSeconds `json:"lifetime_seconds,omitempty"`
	IdleTimeoutEnabled             *bool           `json:"idle_timeout_enabled,omitempty"`
	IdleTimeout                    DurationSeconds `json:"idle_timeout_seconds,omitempty"`
	Deprecated_CookieNonPersistent bool            `json:"cookie_non_persistent,omitempty"`
}

func (*SessionConfig) SetDefaults

func (c *SessionConfig) SetDefaults()

type SettingsUIImplementation

type SettingsUIImplementation string
const (
	SettingsUIImplementationV1 SettingsUIImplementation = "v1"
	SettingsUIImplementationV2 SettingsUIImplementation = "v2"
)

type StandardAttributesAccessControlConfig

type StandardAttributesAccessControlConfig struct {
	Pointer       string                              `json:"pointer,omitempty"`
	AccessControl *UserProfileAttributesAccessControl `json:"access_control,omitempty"`
}

type StandardAttributesConfig

type StandardAttributesConfig struct {
	Population    *StandardAttributesPopulationConfig      `json:"population,omitempty"`
	AccessControl []*StandardAttributesAccessControlConfig `json:"access_control,omitempty"`
}

func (*StandardAttributesConfig) GetAccessControl

func (c *StandardAttributesConfig) GetAccessControl() accesscontrol.T

func (*StandardAttributesConfig) IsEndUserAllHidden

func (c *StandardAttributesConfig) IsEndUserAllHidden() bool

func (*StandardAttributesConfig) SetDefaults

func (c *StandardAttributesConfig) SetDefaults()

type StandardAttributesPopulationConfig

type StandardAttributesPopulationConfig struct {
	Strategy StandardAttributesPopulationStrategy `json:"strategy,omitempty"`
}

func (*StandardAttributesPopulationConfig) SetDefaults

func (c *StandardAttributesPopulationConfig) SetDefaults()

type StandardAttributesPopulationStrategy

type StandardAttributesPopulationStrategy string
const (
	StandardAttributesPopulationStrategyDefault  StandardAttributesPopulationStrategy = ""
	StandardAttributesPopulationStrategyNone     StandardAttributesPopulationStrategy = "none"
	StandardAttributesPopulationStrategyOnSignup StandardAttributesPopulationStrategy = "on_signup"
)

type TestModeConfig

type TestModeConfig struct {
	FixedOOBOTP *TestModeOOBOTPConfig   `json:"oob_otp,omitempty"`
	SMS         *TestModeSMSConfig      `json:"sms,omitempty"`
	Whatsapp    *TestModeWhatsappConfig `json:"whatsapp,omitempty"`
	Email       *TestModeEmailConfig    `json:"email,omitempty"`
}

type TestModeDeterministicLinkOTPFeatureConfig

type TestModeDeterministicLinkOTPFeatureConfig struct {
	Enabled bool `json:"enabled"`
}

type TestModeEmailConfig

type TestModeEmailConfig struct {
	Enabled bool                 `json:"enabled,omitempty"`
	Rules   []*TestModeEmailRule `json:"rules,omitempty"`
}

func (*TestModeEmailConfig) GetRules

func (c *TestModeEmailConfig) GetRules() []*TestModeEmailRule

func (*TestModeEmailConfig) MatchTarget

func (c *TestModeEmailConfig) MatchTarget(target string) (*TestModeEmailRule, bool)

type TestModeEmailFeatureConfig

type TestModeEmailFeatureConfig struct {
	Suppressed bool `json:"suppressed"`
}

type TestModeEmailRule

type TestModeEmailRule struct {
	Regex      string `json:"regex,omitempty"`
	Suppressed bool   `json:"suppressed,omitempty"`
}

func (*TestModeEmailRule) GetRegex

func (r *TestModeEmailRule) GetRegex() *regexp.Regexp

type TestModeFeatureConfig

type TestModeFeatureConfig struct {
	FixedOOBOTP          *TestModeFixedOOBOTPFeatureConfig          `json:"fixed_oob_otp,omitempty"`
	DeterministicLinkOTP *TestModeDeterministicLinkOTPFeatureConfig `json:"deterministic_link_otp,omitempty"`
	SMS                  *TestModeSMSFeatureConfig                  `json:"sms,omitempty"`
	Whatsapp             *TestModeWhatsappFeatureConfig             `json:"whatsapp,omitempty"`
	Email                *TestModeEmailFeatureConfig                `json:"email,omitempty"`
}

func (*TestModeFeatureConfig) Merge

type TestModeFixedOOBOTPFeatureConfig

type TestModeFixedOOBOTPFeatureConfig struct {
	Enabled bool   `json:"enabled"`
	Code    string `json:"code"`
}

type TestModeOOBOTPConfig

type TestModeOOBOTPConfig struct {
	Enabled bool                  `json:"enabled,omitempty"`
	Rules   []*TestModeOOBOTPRule `json:"rules,omitempty"`
}

func (*TestModeOOBOTPConfig) GetRules

func (c *TestModeOOBOTPConfig) GetRules() []*TestModeOOBOTPRule

func (*TestModeOOBOTPConfig) MatchTarget

func (c *TestModeOOBOTPConfig) MatchTarget(target string) (*TestModeOOBOTPRule, bool)

type TestModeOOBOTPRule

type TestModeOOBOTPRule struct {
	Regex     string `json:"regex,omitempty"`
	FixedCode string `json:"fixed_code,omitempty"`
}

func (*TestModeOOBOTPRule) GetRegex

func (r *TestModeOOBOTPRule) GetRegex() *regexp.Regexp

type TestModeSMSConfig

type TestModeSMSConfig struct {
	Enabled bool               `json:"enabled,omitempty"`
	Rules   []*TestModeSMSRule `json:"rules,omitempty"`
}

func (*TestModeSMSConfig) GetRules

func (c *TestModeSMSConfig) GetRules() []*TestModeSMSRule

func (*TestModeSMSConfig) MatchTarget

func (c *TestModeSMSConfig) MatchTarget(target string) (*TestModeSMSRule, bool)

type TestModeSMSFeatureConfig

type TestModeSMSFeatureConfig struct {
	Suppressed bool `json:"suppressed"`
}

type TestModeSMSRule

type TestModeSMSRule struct {
	Regex      string `json:"regex,omitempty"`
	Suppressed bool   `json:"suppressed,omitempty"`
}

func (*TestModeSMSRule) GetRegex

func (r *TestModeSMSRule) GetRegex() *regexp.Regexp

type TestModeWhatsappConfig

type TestModeWhatsappConfig struct {
	Enabled bool                    `json:"enabled,omitempty"`
	Rules   []*TestModeWhatsappRule `json:"rules,omitempty"`
}

func (*TestModeWhatsappConfig) GetRules

func (*TestModeWhatsappConfig) MatchTarget

func (c *TestModeWhatsappConfig) MatchTarget(target string) (*TestModeWhatsappRule, bool)

type TestModeWhatsappFeatureConfig

type TestModeWhatsappFeatureConfig struct {
	Suppressed bool `json:"suppressed"`
}

type TestModeWhatsappRule

type TestModeWhatsappRule struct {
	Regex      string `json:"regex,omitempty"`
	Suppressed bool   `json:"suppressed,omitempty"`
}

func (*TestModeWhatsappRule) GetRegex

func (r *TestModeWhatsappRule) GetRegex() *regexp.Regexp

type TrustProxy

type TrustProxy bool

type TwilioCredentials

type TwilioCredentials struct {
	AccountSID          string `json:"account_sid,omitempty"`
	AuthToken           string `json:"auth_token,omitempty"`
	MessagingServiceSID string `json:"message_service_sid,omitempty"`
}

func (*TwilioCredentials) SensitiveStrings

func (c *TwilioCredentials) SensitiveStrings() []string

type UIAuthenticationFlowConfig

type UIAuthenticationFlowConfig struct {
	Groups []*UIAuthenticationFlowGroup `json:"groups,omitempty"`
}

type UIAuthenticationFlowGroup

type UIAuthenticationFlowGroup struct {
	Name  string                           `json:"name"`
	Flows []*UIAuthenticationFlowGroupFlow `json:"flows,omitempty"`
}

type UIAuthenticationFlowGroupFlow

type UIAuthenticationFlowGroupFlow struct {
	Type AuthenticationFlowType `json:"type"`
	Name string                 `json:"name"`
}

type UIConfig

type UIConfig struct {
	SignupLoginFlowEnabled bool              `json:"signup_login_flow_enabled,omitempty"`
	PhoneInput             *PhoneInputConfig `json:"phone_input,omitempty"`
	DarkThemeDisabled      bool              `json:"dark_theme_disabled,omitempty"`
	LightThemeDisabled     bool              `json:"light_theme_disabled,omitempty"`
	WatermarkDisabled      bool              `json:"watermark_disabled,omitempty"`
	DirectAccessDisabled   bool              `json:"direct_access_disabled,omitempty"`
	// client_uri to use when client_id is absent.
	DefaultClientURI string `json:"default_client_uri,omitempty"`
	// brand_page_uri is shown when the UI has direct_access_disabled.
	BrandPageURI string `json:"brand_page_uri,omitempty"`
	// redirect_uri to use when client_id is absent.
	DefaultRedirectURI string `json:"default_redirect_uri,omitempty"`
	// post_logout_redirect_uri to use when client_id is absent.
	DefaultPostLogoutRedirectURI string `json:"default_post_logout_redirect_uri,omitempty"`
	// NOTE: Internal use only, use authentication_disabled to disable auth-ui when custom ui is used
	AuthenticationDisabled bool `json:"authentication_disabled,omitempty"`
	SettingsDisabled       bool `json:"settings_disabled,omitempty"`
	// Implementation is a temporary flag to switch between authflow and interaction.
	Implementation UIImplementation `json:"implementation,omitempty"`
	// SettingImplementation is a temporary flag to switch between setting ui v1 and v2.
	SettingsImplementation SettingsUIImplementation `json:"settings_implementation,omitempty"`
	// ForgotPassword is the config for the default auth ui
	ForgotPassword *UIForgotPasswordConfig `json:"forgot_password,omitempty"`
	// AuthenticationFlow configures ui behaviour of authentication flow under default auth ui
	AuthenticationFlow *UIAuthenticationFlowConfig `json:"authentication_flow,omitempty"`
}

type UIFeatureConfig

type UIFeatureConfig struct {
	WhiteLabeling *WhiteLabelingFeatureConfig `json:"white_labeling,omitempty"`
}

func (*UIFeatureConfig) Merge

type UIForgotPasswordConfig

type UIForgotPasswordConfig struct {
	Phone []*AccountRecoveryChannel `json:"phone,omitempty"`
	Email []*AccountRecoveryChannel `json:"email,omitempty"`
}

func (*UIForgotPasswordConfig) SetDefaults

func (c *UIForgotPasswordConfig) SetDefaults()

type UIImplementation

type UIImplementation string
const (
	UIImplementationInteraction         UIImplementation = "interaction"
	Deprecated_UIImplementationAuthflow UIImplementation = "authflow"
	UIImplementationAuthflowV2          UIImplementation = "authflowv2"
)

type UsageLimitConfig

type UsageLimitConfig struct {
	Enabled *bool            `json:"enabled,omitempty"`
	Period  UsageLimitPeriod `json:"period,omitempty"`
	Quota   *int             `json:"quota,omitempty"`
}

func (*UsageLimitConfig) GetQuota

func (c *UsageLimitConfig) GetQuota() int

func (*UsageLimitConfig) IsEnabled

func (c *UsageLimitConfig) IsEnabled() bool

type UsageLimitPeriod

type UsageLimitPeriod string
const (
	UsageLimitPeriodDay   UsageLimitPeriod = "day"
	UsageLimitPeriodMonth UsageLimitPeriod = "month"
)

type UserExportObjectStoreConfig

type UserExportObjectStoreConfig AbstractObjectStoreConfig

type UserProfileAttributesAccessControl

type UserProfileAttributesAccessControl struct {
	EndUser  AccessControlLevelString `json:"end_user,omitempty"`
	Bearer   AccessControlLevelString `json:"bearer,omitempty"`
	PortalUI AccessControlLevelString `json:"portal_ui,omitempty"`
}

type UserProfileConfig

type UserProfileConfig struct {
	StandardAttributes *StandardAttributesConfig `json:"standard_attributes,omitempty"`
	CustomAttributes   *CustomAttributesConfig   `json:"custom_attributes,omitempty"`
}

type VerificationClaimConfig

type VerificationClaimConfig struct {
	Enabled  *bool `json:"enabled,omitempty"`
	Required *bool `json:"required,omitempty"`
}

func (*VerificationClaimConfig) SetDefaults

func (c *VerificationClaimConfig) SetDefaults()

type VerificationClaimsConfig

type VerificationClaimsConfig struct {
	Email       *VerificationClaimConfig `json:"email,omitempty"`
	PhoneNumber *VerificationClaimConfig `json:"phone_number,omitempty"`
}

type VerificationConfig

type VerificationConfig struct {
	Claims     *VerificationClaimsConfig     `json:"claims,omitempty"`
	Criteria   VerificationCriteria          `json:"criteria,omitempty"`
	RateLimits *VerificationRateLimitsConfig `json:"rate_limits,omitempty"`

	Deprecated_CodeExpirySeconds DurationSeconds `json:"code_expiry_seconds,omitempty"`
	CodeValidPeriod              DurationString  `json:"code_valid_period,omitempty"`
}

func (*VerificationConfig) SetDefaults

func (c *VerificationConfig) SetDefaults()

type VerificationCriteria

type VerificationCriteria string
const (
	VerificationCriteriaAny VerificationCriteria = "any"
	VerificationCriteriaAll VerificationCriteria = "all"
)

type VerificationRateLimitsConfig

type VerificationRateLimitsConfig struct {
	Email *VerificationRateLimitsEmailConfig `json:"email,omitempty"`
	SMS   *VerificationRateLimitsSMSConfig   `json:"sms,omitempty"`
}

type VerificationRateLimitsEmailConfig

type VerificationRateLimitsEmailConfig struct {
	TriggerPerIP               *RateLimitConfig `json:"trigger_per_ip,omitempty"`
	TriggerPerUser             *RateLimitConfig `json:"trigger_per_user,omitempty"`
	TriggerCooldown            DurationString   `json:"trigger_cooldown,omitempty"`
	MaxFailedAttemptsRevokeOTP int              `json:"max_failed_attempts_revoke_otp,omitempty"`
	ValidatePerIP              *RateLimitConfig `json:"validate_per_ip,omitempty"`
}

func (*VerificationRateLimitsEmailConfig) SetDefaults

func (c *VerificationRateLimitsEmailConfig) SetDefaults()

type VerificationRateLimitsSMSConfig

type VerificationRateLimitsSMSConfig struct {
	TriggerPerIP               *RateLimitConfig `json:"trigger_per_ip,omitempty"`
	TriggerPerUser             *RateLimitConfig `json:"trigger_per_user,omitempty"`
	TriggerCooldown            DurationString   `json:"trigger_cooldown,omitempty"`
	MaxFailedAttemptsRevokeOTP int              `json:"max_failed_attempts_revoke_otp,omitempty"`
	ValidatePerIP              *RateLimitConfig `json:"validate_per_ip,omitempty"`
}

func (*VerificationRateLimitsSMSConfig) SetDefaults

func (c *VerificationRateLimitsSMSConfig) SetDefaults()

type WATICredentials

type WATICredentials struct {
	WhatsappPhoneNumber string `json:"whatsapp_phone_number,omitempty"`
	WebhookAuth         string `json:"webhook_auth,omitempty"`
}

WATICredentials is deprecated, don't use it

func (*WATICredentials) SensitiveStrings

func (c *WATICredentials) SensitiveStrings() []string

type WebAppCDNHost

type WebAppCDNHost string

type WebhookKeyMaterials

type WebhookKeyMaterials struct {
	jwk.Set
}

func (*WebhookKeyMaterials) MarshalJSON

func (c *WebhookKeyMaterials) MarshalJSON() ([]byte, error)

func (*WebhookKeyMaterials) SensitiveStrings

func (c *WebhookKeyMaterials) SensitiveStrings() []string

func (*WebhookKeyMaterials) UnmarshalJSON

func (c *WebhookKeyMaterials) UnmarshalJSON(b []byte) error

type WelcomeMessageConfig

type WelcomeMessageConfig struct {
	Enabled     bool                      `json:"enabled,omitempty"`
	Destination WelcomeMessageDestination `json:"destination,omitempty"`
}

func (*WelcomeMessageConfig) SetDefaults

func (c *WelcomeMessageConfig) SetDefaults()

type WelcomeMessageDestination

type WelcomeMessageDestination string
const (
	WelcomeMessageDestinationFirst WelcomeMessageDestination = "first"
	WelcomeMessageDestinationAll   WelcomeMessageDestination = "all"
)

type WhatsappAPIType

type WhatsappAPIType string
const (
	WhatsappAPITypeOnPremises WhatsappAPIType = "on-premises"
)

type WhatsappConfig

type WhatsappConfig struct {
	APIType WhatsappAPIType `json:"api_type,omitempty"`
}

func (*WhatsappConfig) SetDefaults

func (c *WhatsappConfig) SetDefaults()

type WhatsappOnPremisesCredentials

type WhatsappOnPremisesCredentials struct {
	APIEndpoint string                   `json:"api_endpoint"`
	Username    string                   `json:"username"`
	Password    string                   `json:"password"`
	Templates   *WhatsappTemplatesConfig `json:"templates"`
}

func (*WhatsappOnPremisesCredentials) SensitiveStrings

func (c *WhatsappOnPremisesCredentials) SensitiveStrings() []string

type WhatsappTemplateComponentParameter

type WhatsappTemplateComponentParameter struct {
	Parameters []string `json:"parameters,omitempty"`
}

type WhatsappTemplateConfig

type WhatsappTemplateConfig struct {
	Name      string               `json:"name"`
	Type      WhatsappTemplateType `json:"type"`
	Namespace string               `json:"namespace,omitempty"`
	Languages []string             `json:"languages"`
}

type WhatsappTemplateType

type WhatsappTemplateType string
const (
	WhatsappTemplateTypeAuthentication WhatsappTemplateType = "authentication"
)

type WhatsappTemplatesConfig

type WhatsappTemplatesConfig struct {
	OTP WhatsappTemplateConfig `json:"otp"`
}

type WhiteLabelingFeatureConfig

type WhiteLabelingFeatureConfig struct {
	Disabled bool `json:"disabled,omitempty"`
}

type X509Certificate

type X509Certificate struct {
	Pem X509CertificatePem `json:"pem,omitempty"`
}

func (*X509Certificate) Base64Data

func (c *X509Certificate) Base64Data() string

func (*X509Certificate) Data

func (c *X509Certificate) Data() []byte

func (*X509Certificate) Fingerprint

func (c *X509Certificate) Fingerprint() string

func (*X509Certificate) X509Certificate

func (c *X509Certificate) X509Certificate() *x509.Certificate

type X509CertificatePem

type X509CertificatePem string

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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