config

package
v0.0.0-...-122f59b Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 34 Imported by: 4

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 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 PopulateDefaultValues

func PopulateDefaultValues(config *AppConfig)

func PopulateFeatureConfigDefaultValues

func PopulateFeatureConfigDefaultValues(config *FeatureConfig)

func SetFieldDefaults

func SetFieldDefaults(value interface{})

Types

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 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"`
}

func (*AdminAPIFeatureConfig) SetDefaults

func (c *AdminAPIFeatureConfig) SetDefaults()

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"`

	Authentication       *AuthenticationConfig       `json:"authentication,omitempty"`
	Session              *SessionConfig              `json:"session,omitempty"`
	OAuth                *OAuthConfig                `json:"oauth,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"`

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

	Web3 *Web3Config `json:"web3,omitempty"`

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

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

	Captcha *CaptchaConfig `json:"captcha,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
	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) SetDefaults

func (c *AuditLogFeatureConfig) SetDefaults()

type AuthUISentryDSN

type AuthUISentryDSN 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"`
	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"`
}

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"`
	OnFailure      AuthenticationFlowAccountRecoveryIdentificationOnFailure `json:"on_failure,omitempty"`
	Steps          []*AuthenticationFlowAccountRecoveryFlowStep             `json:"steps,omitempty"`
}

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 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"
)

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"`

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

func (*AuthenticationFlowLoginFlowOneOf) GetBranchInfo

func (*AuthenticationFlowLoginFlowOneOf) GetSteps

func (*AuthenticationFlowLoginFlowOneOf) IsFlowObject

func (f *AuthenticationFlowLoginFlowOneOf) IsFlowObject()

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) 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 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 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"`

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

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

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"`

	// 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"`

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

func (*AuthenticationFlowSignupFlowOneOf) GetBranchInfo

func (*AuthenticationFlowSignupFlowOneOf) GetSteps

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) 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"`
	SignupFlow     string                           `json:"signup_flow,omitempty"`
	LoginFlow      string                           `json:"login_flow,omitempty"`
}

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"`
}

type AuthenticatorOOBConfig

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

type AuthenticatorOOBEmailConfig

type AuthenticatorOOBEmailConfig struct {
	Maximum         *int                      `json:"maximum,omitempty"`
	EmailOTPMode    AuthenticatorEmailOTPMode `json:"email_otp_mode,omitempty"`
	CodeValidPeriod DurationString            `json:"code_valid_period,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"`
	CodeValidPeriod DurationString            `json:"code_valid_period,omitempty"`
}

func (*AuthenticatorOOBSMSConfig) SetDefaults

func (c *AuthenticatorOOBSMSConfig) SetDefaults()

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) IsSMSEnabled

func (m *AuthenticatorPhoneOTPMode) IsSMSEnabled() bool

func (*AuthenticatorPhoneOTPMode) IsWhatsappEnabled

func (m *AuthenticatorPhoneOTPMode) IsWhatsappEnabled() bool

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 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 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 CaptchaCloudflareCredentials

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

func (*CaptchaCloudflareCredentials) SensitiveStrings

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

type CaptchaConfig

type CaptchaConfig struct {
	Provider *CaptchaProvider `json:"provider,omitempty"`
}

type CaptchaProvider

type CaptchaProvider string
const (
	CaptchaProviderCloudflare CaptchaProvider = "cloudflare"
)

type CollaboratorFeatureConfig

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

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"`
}

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 {
	MaxOpenConn            int             `envconfig:"MAX_OPEN_CONN" default:"3"`
	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

type DenoEndpoint

type DenoEndpoint string

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 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"`
	// 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"`

	NFTIndexerAPIEndpoint NFTIndexerAPIEndpoint `envconfig:"NFT_INDEXER_API_ENDPOINT"`

	DenoEndpoint DenoEndpoint `envconfig:"DENO_ENDPOINT"`

	RateLimits RateLimitsEnvironmentConfig `envconfig:"RATE_LIMITS"`

	// 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"`
}

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"`
	Web3             *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)

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 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
	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 GoogleTagManagerConfig

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

type GoogleTagManagerFeatureConfig

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

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"`
}

type IdentityConfig

type IdentityConfig struct {
	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"`
}

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 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"`
	ModifyDisabled *bool                `json:"modify_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 MessagingConfig

type MessagingConfig struct {
	SMSProvider      SMSProvider                `json:"sms_provider,omitempty"`
	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"`
}

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 NFTConfig

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

type NFTIndexerAPIEndpoint

type NFTIndexerAPIEndpoint string

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 OAuthClaimConfig

type OAuthClaimConfig struct {
	AssumeVerified *bool `json:"assume_verified,omitempty"`
	Required       *bool `json:"required,omitempty"`
}

func (*OAuthClaimConfig) SetDefaults

func (c *OAuthClaimConfig) SetDefaults()

type OAuthClaimsConfig

type OAuthClaimsConfig struct {
	Email *OAuthClaimConfig `json:"email,omitempty"`
}

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"`
}

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"`
	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"`
}

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) (*OAuthSSOProviderConfig, 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 struct {
	Alias          string               `json:"alias,omitempty"`
	Type           OAuthSSOProviderType `json:"type,omitempty"`
	ModifyDisabled *bool                `json:"modify_disabled,omitempty"`
	ClientID       string               `json:"client_id"`
	Claims         *OAuthClaimsConfig   `json:"claims,omitempty"`

	// Tenant is specific to `azureadv2` and `azureadb2c`
	Tenant string `json:"tenant,omitempty"`

	// Policy is specific to `azureadb2c`
	Policy string `json:"policy,omitempty"`

	// KeyID and TeamID are specific to `apple`
	KeyID  string `json:"key_id,omitempty"`
	TeamID string `json:"team_id,omitempty"`

	// AppType is specific to `wechat`, support web or mobile
	AppType            OAuthSSOWeChatAppType `json:"app_type,omitempty"`
	AccountID          string                `json:"account_id,omitempty"`
	IsSandboxAccount   bool                  `json:"is_sandbox_account,omitempty"`
	WeChatRedirectURIs []string              `json:"wechat_redirect_uris,omitempty"`

	// DiscoveryDocumentEndpoint is specific to `adfs`.
	DiscoveryDocumentEndpoint string `json:"discovery_document_endpoint,omitempty"`
}

func (*OAuthSSOProviderConfig) ProviderID

func (c *OAuthSSOProviderConfig) ProviderID() ProviderID

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 OAuthSSOProviderType

type OAuthSSOProviderType string
const (
	OAuthSSOProviderTypeGoogle     OAuthSSOProviderType = "google"
	OAuthSSOProviderTypeFacebook   OAuthSSOProviderType = "facebook"
	OAuthSSOProviderTypeGithub     OAuthSSOProviderType = "github"
	OAuthSSOProviderTypeLinkedIn   OAuthSSOProviderType = "linkedin"
	OAuthSSOProviderTypeAzureADv2  OAuthSSOProviderType = "azureadv2"
	OAuthSSOProviderTypeAzureADB2C OAuthSSOProviderType = "azureadb2c"
	OAuthSSOProviderTypeADFS       OAuthSSOProviderType = "adfs"
	OAuthSSOProviderTypeApple      OAuthSSOProviderType = "apple"
	OAuthSSOProviderTypeWechat     OAuthSSOProviderType = "wechat"
)

func (OAuthSSOProviderType) EmailRequired

func (t OAuthSSOProviderType) EmailRequired() bool

func (OAuthSSOProviderType) Scope

func (t OAuthSSOProviderType) Scope() []string

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"`
}

type OAuthSSOWeChatAppType

type OAuthSSOWeChatAppType string
const (
	OAuthSSOWeChatAppTypeWeb    OAuthSSOWeChatAppType = "web"
	OAuthSSOWeChatAppTypeMobile OAuthSSOWeChatAppType = "mobile"
)

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 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 ProviderID

type ProviderID struct {
	Type string
	Keys map[string]interface{}
}

ProviderID combining with a subject ID identifies an user from an external system.

func (ProviderID) Claims

func (p ProviderID) Claims() map[string]interface{}

func (ProviderID) Equal

func (p ProviderID) Equal(that *ProviderID) bool

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"`
}

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"`
}

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 SIWEConfig

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

type SMSConfig

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

SMSConfig is deprecated.

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 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"`
}

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
}

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"
	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
	CaptchaCloudflareCredentialsKey  SecretKey = "captcha.cloudflare"
	WhatsappOnPremisesCredentialsKey SecretKey = "whatsapp.on-premises"
)

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"`
	CookieNonPersistent bool            `json:"cookie_non_persistent,omitempty"`
}

func (*SessionConfig) SetDefaults

func (c *SessionConfig) SetDefaults()

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"`
}

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"`
	WatermarkDisabled      bool              `json:"watermark_disabled,omitempty"`
	// client_uri to use when client_id is absent.
	DefaultClientURI string `json:"default_client_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"`
	// 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"`
}

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 (
	UIImplementationDefault     UIImplementation = ""
	UIImplementationInteraction UIImplementation = "interaction"
	UIImplementationAuthflow    UIImplementation = "authflow"
	UIImplementationAuthflowV2  UIImplementation = "authflowv2"
)

func (UIImplementation) WithDefault

func (i UIImplementation) WithDefault() UIImplementation

type UsageLimitConfig

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

type UsageLimitPeriod

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

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 Web3Config

type Web3Config struct {
	SIWE *SIWEConfig `json:"siwe,omitempty"`
	NFT  *NFTConfig  `json:"nft,omitempty"`
}

type Web3FeatureConfig

type Web3FeatureConfig struct {
	NFT *Web3NFTFeatureConfig `json:"nft,omitempty"`
}

type Web3NFTFeatureConfig

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

func (*Web3NFTFeatureConfig) SetDefaults

func (c *Web3NFTFeatureConfig) SetDefaults()

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"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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