Documentation
¶
Index ¶
- Constants
- Variables
- func DumpSchema() (string, error)
- func DumpSecretConfigSchema() (string, error)
- func NewSecretMaskLogHook(cfg *SecretConfig) logrus.Hook
- func PopulateDefaultValues(config *AppConfig)
- func PopulateFeatureConfigDefaultValues(config *FeatureConfig)
- type AccessControlLevelString
- type AccountAnonymizationConfig
- type AccountDeletionConfig
- type AdminAPIAuth
- type AdminAPIAuthKey
- type AdminAPIFeatureConfig
- type AnalyticConfig
- type AnalyticRedisCredentials
- type AppConfig
- type AppContext
- type AppID
- type AuditDatabaseCredentials
- type AuditDatabaseCredentialsEnvironmentConfig
- type AuditLogFeatureConfig
- type AuthenticationConfig
- type AuthenticationFeatureConfig
- type AuthenticatorConfig
- type AuthenticatorFeatureConfig
- type AuthenticatorOOBConfig
- type AuthenticatorOOBEmailConfig
- type AuthenticatorOOBOTBSMSFeatureConfig
- type AuthenticatorOOBSMSConfig
- type AuthenticatorPasswordConfig
- type AuthenticatorPasswordFeatureConfig
- type AuthenticatorPhoneOTPMode
- type AuthenticatorTOTPConfig
- type AuthenticatorsFeatureConfig
- type BiometricConfig
- type BiometricFeatureConfig
- type BlockingHandlerFeatureConfig
- type BlockingHandlersConfig
- type CORSAllowedOrigins
- type CSRFKeyMaterials
- type ClientParty
- type CollaboratorFeatureConfig
- type Config
- type CustomAttributeType
- type CustomAttributesAttributeConfig
- type CustomAttributesConfig
- type CustomDomainFeatureConfig
- type DatabaseCredentials
- type DatabaseEnvironmentConfig
- type DenoEndpoint
- type DevMode
- type DeviceTokenConfig
- type DurationDays
- type DurationSeconds
- type ElasticsearchCredentials
- type EnvironmentConfig
- type FeatureConfig
- type ForgotPasswordConfig
- type GenerateAppConfigOptions
- type GenerateOAuthClientConfigOptions
- type GenerateSecretConfigOptions
- type GlobalDatabaseCredentialsEnvironmentConfig
- type GlobalRedisCredentialsEnvironmentConfig
- type GoogleTagManagerConfig
- type GoogleTagManagerFeatureConfig
- type HTTPConfig
- type HookConfig
- type HookFeatureConfig
- type IdentityConfig
- type IdentityConflictConfig
- type IdentityFeatureConfig
- type ImagesCDNHost
- type ImagesKeyMaterials
- type LocalizationConfig
- type LoginIDConfig
- type LoginIDEmailConfig
- type LoginIDFeatureConfig
- type LoginIDKeyConfig
- type LoginIDPhoneFeatureConfig
- type LoginIDTypesConfig
- type LoginIDTypesFeatureConfig
- type LoginIDUsernameConfig
- type MessagingConfig
- type NFTConfig
- type NFTIndexerAPIEndpoint
- type NexmoCredentials
- type NonBlockingHandlerFeatureConfig
- type NonBlockingHandlersConfig
- type OAuthClaimConfig
- type OAuthClaimsConfig
- type OAuthClientApplicationType
- type OAuthClientConfig
- type OAuthClientCredentials
- type OAuthClientCredentialsItem
- type OAuthClientCredentialsKeySet
- type OAuthClientFeatureConfig
- type OAuthClientSecretsUpdateInstruction
- type OAuthClientSecretsUpdateInstructionCleanupData
- type OAuthClientSecretsUpdateInstructionGenerateData
- type OAuthConfig
- type OAuthFeatureConfig
- type OAuthKeyMaterials
- type OAuthSSOConfig
- type OAuthSSOFeatureConfig
- type OAuthSSOProviderConfig
- type OAuthSSOProviderCredentials
- type OAuthSSOProviderCredentialsItem
- type OAuthSSOProviderCredentialsUpdateInstruction
- type OAuthSSOProviderCredentialsUpdateInstructionDataItem
- type OAuthSSOProviderFeatureConfig
- type OAuthSSOProviderType
- type OAuthSSOProvidersFeatureConfig
- type OAuthSSOWeChatAppType
- type PasswordPolicyConfig
- type PasswordPolicyFeatureConfig
- type PasswordPolicyItemFeatureConfig
- type PhoneInputConfig
- type PromotionConflictBehavior
- type ProviderID
- type RateLimitFeatureConfig
- type RecoveryCodeConfig
- type RedisCredentials
- type RedisEnvironmentConfig
- type SIWEConfig
- type SMSProvider
- type SMSRateLimitBucketConfig
- type SMTPMode
- type SMTPServerCredentials
- type SMTPServerCredentialsUpdateInstruction
- type SMTPServerCredentialsUpdateInstructionData
- type SecondaryAuthenticationMode
- type SecretConfig
- func (c *SecretConfig) Lookup(key SecretKey) (int, *SecretItem, bool)
- func (c *SecretConfig) LookupData(key SecretKey) SecretItemData
- func (c *SecretConfig) LookupDataWithIndex(key SecretKey) (int, SecretItemData, bool)
- func (c *SecretConfig) Overlay(layers ...*SecretConfig) *SecretConfig
- func (c *SecretConfig) Validate(appConfig *AppConfig) error
- type SecretConfigUpdateInstruction
- type SecretConfigUpdateInstructionContext
- type SecretConfigUpdateInstructionInterface
- type SecretItem
- type SecretItemData
- type SecretKey
- type SecretUpdateInstructionAction
- type SentryDSN
- type SessionConfig
- type StandardAttributesAccessControlConfig
- type StandardAttributesConfig
- type StandardAttributesPopulationConfig
- type StandardAttributesPopulationStrategy
- type TrustProxy
- type TwilioCredentials
- type UIConfig
- type UIFeatureConfig
- type UserProfileAttributesAccessControl
- type UserProfileConfig
- type VerificationClaimConfig
- type VerificationClaimsConfig
- type VerificationConfig
- type VerificationCriteria
- type WATICredentials
- type Web3Config
- type Web3FeatureConfig
- type Web3NFTFeatureConfig
- type WebAppCDNHost
- type WebhookKeyMaterials
- type WelcomeMessageConfig
- type WelcomeMessageDestination
- type WhiteLabelingFeatureConfig
Constants ¶
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" )
Variables ¶
View Source
var FeatureConfigSchema = validation.NewMultipartSchema("FeatureConfig")
View Source
var OAuthSSOProviderTypes = []OAuthSSOProviderType{ OAuthSSOProviderTypeGoogle, OAuthSSOProviderTypeFacebook, OAuthSSOProviderTypeGithub, OAuthSSOProviderTypeLinkedIn, OAuthSSOProviderTypeAzureADv2, OAuthSSOProviderTypeAzureADB2C, OAuthSSOProviderTypeADFS, OAuthSSOProviderTypeApple, OAuthSSOProviderTypeWechat, }
View Source
var Schema = validation.NewMultipartSchema("AppConfig")
View Source
var SecretConfigSchema = validation.NewMultipartSchema("SecretConfig")
Functions ¶
func DumpSchema ¶
func DumpSecretConfigSchema ¶
func NewSecretMaskLogHook ¶
func NewSecretMaskLogHook(cfg *SecretConfig) logrus.Hook
func PopulateDefaultValues ¶
func PopulateDefaultValues(config *AppConfig)
func PopulateFeatureConfigDefaultValues ¶
func PopulateFeatureConfigDefaultValues(config *FeatureConfig)
Types ¶
type AccessControlLevelString ¶
type AccessControlLevelString string
const ( AccessControlLevelStringDefault AccessControlLevelString = "" AccessControlLevelStringHidden AccessControlLevelString = "hidden" AccessControlLevelStringReadonly AccessControlLevelString = "readonly" AccessControlLevelStringReadwrite AccessControlLevelString = "readwrite" )
func (AccessControlLevelString) Level ¶
func (l AccessControlLevelString) Level() accesscontrol.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 AdminAPIAuth ¶
type AdminAPIAuth string
const ( AdminAPIAuthNone AdminAPIAuth = "none" AdminAPIAuthJWT AdminAPIAuth = "jwt" )
type AdminAPIAuthKey ¶
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 AdminAPIFeatureConfig ¶
type AdminAPIFeatureConfig struct {
CreateSessionEnabled *bool `json:"create_session_enabled,omitempty"`
}
func (*AdminAPIFeatureConfig) SetDefaults ¶
func (c *AdminAPIFeatureConfig) SetDefaults()
type AnalyticConfig ¶
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"` WelcomeMessage *WelcomeMessageConfig `json:"welcome_message,omitempty"` Verification *VerificationConfig `json:"verification,omitempty"` Web3 *Web3Config `json:"web3,omitempty"` GoogleTagManager *GoogleTagManagerConfig `json:"google_tag_manager,omitempty"` }
func GenerateAppConfigFromOptions ¶
func GenerateAppConfigFromOptions(opts *GenerateAppConfigOptions) *AppConfig
func (*AppConfig) Validate ¶
func (c *AppConfig) Validate(ctx *validation.Context)
type AppContext ¶
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 AuditLogFeatureConfig ¶
type AuditLogFeatureConfig struct {
RetrievalDays *int `json:"retrieval_days,omitempty"`
}
func (*AuditLogFeatureConfig) SetDefaults ¶
func (c *AuditLogFeatureConfig) SetDefaults()
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"` }
func (*AuthenticationConfig) SetDefaults ¶
func (c *AuthenticationConfig) SetDefaults()
type AuthenticationFeatureConfig ¶
type AuthenticationFeatureConfig struct {
SecondaryAuthenticators *AuthenticatorsFeatureConfig `json:"secondary_authenticators,omitempty"`
}
type AuthenticatorConfig ¶
type AuthenticatorConfig struct { Password *AuthenticatorPasswordConfig `json:"password,omitempty"` TOTP *AuthenticatorTOTPConfig `json:"totp,omitempty"` OOB *AuthenticatorOOBConfig `json:"oob_otp,omitempty"` }
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"`
}
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"` }
func (*AuthenticatorOOBSMSConfig) SetDefaults ¶
func (c *AuthenticatorOOBSMSConfig) SetDefaults()
type AuthenticatorPasswordConfig ¶
type AuthenticatorPasswordConfig struct { Policy *PasswordPolicyConfig `json:"policy,omitempty"` ForceChange *bool `json:"force_change,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 CORSAllowedOrigins ¶
type CORSAllowedOrigins string
func (*CORSAllowedOrigins) List ¶
func (c *CORSAllowedOrigins) List() []string
type CSRFKeyMaterials ¶
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 ClientParty ¶
type ClientParty string
const ( ClientPartyFirst ClientParty = "first_party" ClientPartyThird ClientParty = "third_party" )
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) ToJSONSchema ¶
func (c *CustomAttributesAttributeConfig) ToJSONSchema() (schema map[string]interface{}, 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 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 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 ElasticsearchCredentials ¶
type ElasticsearchCredentials struct {
ElasticsearchURL string `json:"elasticsearch_url,omitempty"`
}
func (*ElasticsearchCredentials) SensitiveStrings ¶
func (c *ElasticsearchCredentials) SensitiveStrings() []string
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"` // 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"` }
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"` RateLimit *RateLimitFeatureConfig `json:"rate_limit,omitempty"` Collaborator *CollaboratorFeatureConfig `json:"collaborator,omitempty"` Web3 *Web3FeatureConfig `json:"web3,omitempty"` AdminAPI *AdminAPIFeatureConfig `json:"admin_api,omitempty"` }
func NewEffectiveDefaultFeatureConfig ¶
func NewEffectiveDefaultFeatureConfig() *FeatureConfig
func ParseFeatureConfig ¶
func ParseFeatureConfig(inputYAML []byte) (*FeatureConfig, error)
type ForgotPasswordConfig ¶
type ForgotPasswordConfig struct { Enabled *bool `json:"enabled,omitempty"` ResetCodeExpiry DurationSeconds `json:"reset_code_expiry_seconds,omitempty"` }
func (*ForgotPasswordConfig) SetDefaults ¶
func (c *ForgotPasswordConfig) SetDefaults()
type GenerateOAuthClientConfigOptions ¶
type GenerateOAuthClientConfigOptions struct { Name string ApplicationType OAuthClientApplicationType RedirectURI string PostLogoutRedirectURI string }
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 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 ¶
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"`
}
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 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" OAuthClientApplicationTypeThirdPartyApp OAuthClientApplicationType = "third_party_app" OAuthClientApplicationTypeUnspecified OAuthClientApplicationType = "" )
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"` }
func GenerateOAuthConfigFromOptions ¶
func GenerateOAuthConfigFromOptions(opts *GenerateOAuthClientConfigOptions) (*OAuthClientConfig, error)
func (*OAuthClientConfig) ClientParty ¶
func (c *OAuthClientConfig) ClientParty() ClientParty
func (*OAuthClientConfig) DefaultRedirectURI ¶
func (c *OAuthClientConfig) DefaultRedirectURI() string
func (*OAuthClientConfig) SetDefaults ¶
func (c *OAuthClientConfig) SetDefaults()
type OAuthClientCredentials ¶
type OAuthClientCredentials struct {
Items []OAuthClientCredentialsItem `json:"items,omitempty"`
}
func (*OAuthClientCredentials) Lookup ¶
func (c *OAuthClientCredentials) Lookup(clientID string) (*OAuthClientCredentialsItem, bool)
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 ¶
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"` }
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 ¶
func (i *OAuthClientSecretsUpdateInstruction) ApplyTo(ctx *SecretConfigUpdateInstructionContext, currentConfig *SecretConfig) (*SecretConfig, error)
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 ¶
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,omitempty"` 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 (c *OAuthSSOProviderCredentials) Lookup(alias string) (*OAuthSSOProviderCredentialsItem, bool)
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 ¶
func (i *OAuthSSOProviderCredentialsUpdateInstruction) ApplyTo(ctx *SecretConfigUpdateInstructionContext, currentConfig *SecretConfig) (*SecretConfig, error)
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 PasswordPolicyConfig ¶
type PasswordPolicyConfig struct { MinLength *int `json:"min_length,omitempty"` UppercaseRequired bool `json:"uppercase_required,omitempty"` LowercaseRequired bool `json:"lowercase_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 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 ¶
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 RateLimitFeatureConfig ¶
type RateLimitFeatureConfig struct { Disabled *bool `json:"disabled,omitempty"` SMS *SMSRateLimitBucketConfig `json:"sms,omitempty"` }
func (*RateLimitFeatureConfig) SetDefaults ¶
func (c *RateLimitFeatureConfig) SetDefaults()
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 SMSProvider ¶
type SMSProvider string
const ( SMSProviderNexmo SMSProvider = "nexmo" SMSProviderTwilio SMSProvider = "twilio" )
type SMSRateLimitBucketConfig ¶
type SMSRateLimitBucketConfig struct { Size *int `json:"size,omitempty"` ResetPeriod *DurationSeconds `json:"reset_period,omitempty"` }
func (*SMSRateLimitBucketConfig) SetDefaults ¶
func (c *SMSRateLimitBucketConfig) SetDefaults()
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 ¶
func (i *SMTPServerCredentialsUpdateInstruction) ApplyTo(ctx *SecretConfigUpdateInstructionContext, currentConfig *SecretConfig) (*SecretConfig, error)
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) 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"` }
func (*SecretConfigUpdateInstruction) ApplyTo ¶
func (i *SecretConfigUpdateInstruction) ApplyTo(ctx *SecretConfigUpdateInstructionContext, currentConfig *SecretConfig) (*SecretConfig, error)
type SecretConfigUpdateInstructionInterface ¶
type SecretConfigUpdateInstructionInterface interface {
ApplyTo(ctx *SecretConfigUpdateInstructionContext, currentConfig *SecretConfig) (*SecretConfig, error)
}
type SecretItem ¶
type SecretItem struct { Key SecretKey `json:"key,omitempty"` RawData json.RawMessage `json:"data,omitempty"` Data SecretItemData `json:"-"` }
type SecretItemData ¶
type SecretItemData interface {
SensitiveStrings() []string
}
type SecretKey ¶
type SecretKey string
const ( DatabaseCredentialsKey SecretKey = "db" AuditDatabaseCredentialsKey SecretKey = "audit.db" ElasticsearchCredentialsKey SecretKey = "elasticsearch" 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" OAuthKeyMaterialsKey SecretKey = "oauth" CSRFKeyMaterialsKey SecretKey = "csrf" WebhookKeyMaterialsKey SecretKey = "webhook" ImagesKeyMaterialsKey SecretKey = "images" WATICredentialsKey SecretKey = "whatsapp.wati" // nolint: gosec OAuthClientCredentialsKey SecretKey = "oauth.client_secrets" )
func (SecretKey) IsUpdatable ¶
type SecretUpdateInstructionAction ¶
type SecretUpdateInstructionAction string
const ( SecretUpdateInstructionActionSet SecretUpdateInstructionAction = "set" SecretUpdateInstructionActionUnset SecretUpdateInstructionAction = "unset" SecretUpdateInstructionActionGenerate SecretUpdateInstructionAction = "generate" SecretUpdateInstructionActionCleanup SecretUpdateInstructionAction = "cleanup" )
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 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 UIConfig ¶
type UIConfig struct { 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"` }
type UIFeatureConfig ¶
type UIFeatureConfig struct {
WhiteLabeling *WhiteLabelingFeatureConfig `json:"white_labeling,omitempty"`
}
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"` CodeExpiry DurationSeconds `json:"code_expiry_seconds,omitempty"` }
func (*VerificationConfig) SetDefaults ¶
func (c *VerificationConfig) SetDefaults()
type VerificationCriteria ¶
type VerificationCriteria string
const ( VerificationCriteriaAny VerificationCriteria = "any" VerificationCriteriaAll VerificationCriteria = "all" )
type WATICredentials ¶
type WATICredentials struct { WhatsappPhoneNumber string `json:"whatsapp_phone_number,omitempty"` WebhookAuth string `json:"webhook_auth,omitempty"` }
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 ¶
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 WhiteLabelingFeatureConfig ¶
type WhiteLabelingFeatureConfig struct {
Disabled bool `json:"disabled,omitempty"`
}
Source Files
¶
- account_anonymization.go
- account_deletion.go
- admin.go
- analytic.go
- authentication.go
- authenticator.go
- config.go
- context.go
- database_env.go
- default.go
- environment.go
- feature.go
- feature_admin_api.go
- feature_audit_log.go
- feature_authentication.go
- feature_authenticator.go
- feature_collaborator.go
- feature_custom_domain.go
- feature_google_tag_manager.go
- feature_hook.go
- feature_identity.go
- feature_oauth.go
- feature_rate_limit.go
- feature_ui.go
- feature_web3.go
- forgot_password.go
- generate.go
- google_tag_manager.go
- hook.go
- http.go
- identity.go
- localization.go
- messaging.go
- oauth.go
- redis_env.go
- schema.go
- secret.go
- secret_data.go
- secret_update_instruction.go
- secret_update_instruction_context.go
- session.go
- time.go
- ui.go
- user_profile.go
- utils.go
- verification.go
- web3.go
- welcome_message.go
Click to show internal directories.
Click to hide internal directories.