config

package
v0.9.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: Apache-2.0 Imports: 38 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultIdentityTraitsSchemaID                            = "default"
	DefaultBrowserReturnURL                                  = "default_browser_return_url"
	DefaultSQLiteMemoryDSN                                   = dbal.SQLiteInMemory
	DefaultPasswordHashingAlgorithm                          = "argon2"
	DefaultCipherAlgorithm                                   = "noop"
	UnknownVersion                                           = "unknown version"
	ViperKeyDSN                                              = "dsn"
	ViperKeyCourierSMTPURL                                   = "courier.smtp.connection_uri"
	ViperKeyCourierTemplatesPath                             = "courier.template_override_path"
	ViperKeyCourierTemplatesRecoveryInvalidEmail             = "courier.templates.recovery.invalid.email"
	ViperKeyCourierTemplatesRecoveryValidEmail               = "courier.templates.recovery.valid.email"
	ViperKeyCourierTemplatesVerificationInvalidEmail         = "courier.templates.verification.invalid.email"
	ViperKeyCourierTemplatesVerificationValidEmail           = "courier.templates.verification.valid.email"
	ViperKeyCourierSMTPFrom                                  = "courier.smtp.from_address"
	ViperKeyCourierSMTPFromName                              = "courier.smtp.from_name"
	ViperKeyCourierSMTPHeaders                               = "courier.smtp.headers"
	ViperKeyCourierSMSRequestConfig                          = "courier.sms.request_config"
	ViperKeyCourierSMSEnabled                                = "courier.sms.enabled"
	ViperKeyCourierSMSFrom                                   = "courier.sms.from"
	ViperKeyCourierMessageTTL                                = "courier.message_ttl"
	ViperKeySecretsDefault                                   = "secrets.default"
	ViperKeySecretsCookie                                    = "secrets.cookie"
	ViperKeySecretsCipher                                    = "secrets.cipher"
	ViperKeyDisablePublicHealthRequestLog                    = "serve.public.request_log.disable_for_health"
	ViperKeyPublicBaseURL                                    = "serve.public.base_url"
	ViperKeyPublicPort                                       = "serve.public.port"
	ViperKeyPublicHost                                       = "serve.public.host"
	ViperKeyPublicSocketOwner                                = "serve.public.socket.owner"
	ViperKeyPublicSocketGroup                                = "serve.public.socket.group"
	ViperKeyPublicSocketMode                                 = "serve.public.socket.mode"
	ViperKeyPublicTLSCertBase64                              = "serve.public.tls.cert.base64"
	ViperKeyPublicTLSKeyBase64                               = "serve.public.tls.key.base64"
	ViperKeyPublicTLSCertPath                                = "serve.public.tls.cert.path"
	ViperKeyPublicTLSKeyPath                                 = "serve.public.tls.key.path"
	ViperKeyDisableAdminHealthRequestLog                     = "serve.admin.request_log.disable_for_health"
	ViperKeyAdminBaseURL                                     = "serve.admin.base_url"
	ViperKeyAdminPort                                        = "serve.admin.port"
	ViperKeyAdminHost                                        = "serve.admin.host"
	ViperKeyAdminSocketOwner                                 = "serve.admin.socket.owner"
	ViperKeyAdminSocketGroup                                 = "serve.admin.socket.group"
	ViperKeyAdminSocketMode                                  = "serve.admin.socket.mode"
	ViperKeyAdminTLSCertBase64                               = "serve.admin.tls.cert.base64"
	ViperKeyAdminTLSKeyBase64                                = "serve.admin.tls.key.base64"
	ViperKeyAdminTLSCertPath                                 = "serve.admin.tls.cert.path"
	ViperKeyAdminTLSKeyPath                                  = "serve.admin.tls.key.path"
	ViperKeySessionLifespan                                  = "session.lifespan"
	ViperKeySessionSameSite                                  = "session.cookie.same_site"
	ViperKeySessionDomain                                    = "session.cookie.domain"
	ViperKeySessionName                                      = "session.cookie.name"
	ViperKeySessionPath                                      = "session.cookie.path"
	ViperKeySessionPersistentCookie                          = "session.cookie.persistent"
	ViperKeySessionWhoAmIAAL                                 = "session.whoami.required_aal"
	ViperKeyCookieSameSite                                   = "cookies.same_site"
	ViperKeyCookieDomain                                     = "cookies.domain"
	ViperKeyCookiePath                                       = "cookies.path"
	ViperKeySelfServiceStrategyConfig                        = "selfservice.methods"
	ViperKeySelfServiceBrowserDefaultReturnTo                = "selfservice." + DefaultBrowserReturnURL
	ViperKeyURLsAllowedReturnToDomains                       = "selfservice.allowed_return_urls"
	ViperKeySelfServiceRegistrationEnabled                   = "selfservice.flows.registration.enabled"
	ViperKeySelfServiceRegistrationUI                        = "selfservice.flows.registration.ui_url"
	ViperKeySelfServiceRegistrationRequestLifespan           = "selfservice.flows.registration.lifespan"
	ViperKeySelfServiceRegistrationAfter                     = "selfservice.flows.registration.after"
	ViperKeySelfServiceRegistrationBeforeHooks               = "selfservice.flows.registration.before.hooks"
	ViperKeySelfServiceLoginUI                               = "selfservice.flows.login.ui_url"
	ViperKeySelfServiceLoginRequestLifespan                  = "selfservice.flows.login.lifespan"
	ViperKeySelfServiceLoginAfter                            = "selfservice.flows.login.after"
	ViperKeySelfServiceLoginBeforeHooks                      = "selfservice.flows.login.before.hooks"
	ViperKeySelfServiceErrorUI                               = "selfservice.flows.error.ui_url"
	ViperKeySelfServiceLogoutBrowserDefaultReturnTo          = "selfservice.flows.logout.after." + DefaultBrowserReturnURL
	ViperKeySelfServiceSettingsURL                           = "selfservice.flows.settings.ui_url"
	ViperKeySelfServiceSettingsAfter                         = "selfservice.flows.settings.after"
	ViperKeySelfServiceSettingsRequestLifespan               = "selfservice.flows.settings.lifespan"
	ViperKeySelfServiceSettingsPrivilegedAuthenticationAfter = "selfservice.flows.settings.privileged_session_max_age"
	ViperKeySelfServiceSettingsRequiredAAL                   = "selfservice.flows.settings.required_aal"
	ViperKeySelfServiceRecoveryAfter                         = "selfservice.flows.recovery.after"
	ViperKeySelfServiceRecoveryEnabled                       = "selfservice.flows.recovery.enabled"
	ViperKeySelfServiceRecoveryUI                            = "selfservice.flows.recovery.ui_url"
	ViperKeySelfServiceRecoveryRequestLifespan               = "selfservice.flows.recovery.lifespan"
	ViperKeySelfServiceRecoveryBrowserDefaultReturnTo        = "selfservice.flows.recovery.after." + DefaultBrowserReturnURL
	ViperKeySelfServiceVerificationEnabled                   = "selfservice.flows.verification.enabled"
	ViperKeySelfServiceVerificationUI                        = "selfservice.flows.verification.ui_url"
	ViperKeySelfServiceVerificationRequestLifespan           = "selfservice.flows.verification.lifespan"
	ViperKeySelfServiceVerificationBrowserDefaultReturnTo    = "selfservice.flows.verification.after." + DefaultBrowserReturnURL
	ViperKeySelfServiceVerificationAfter                     = "selfservice.flows.verification.after"
	ViperKeyDefaultIdentitySchemaID                          = "identity.default_schema_id"
	ViperKeyIdentitySchemas                                  = "identity.schemas"
	ViperKeyHasherAlgorithm                                  = "hashers.algorithm"
	ViperKeyHasherArgon2ConfigMemory                         = "hashers.argon2.memory"
	ViperKeyHasherArgon2ConfigIterations                     = "hashers.argon2.iterations"
	ViperKeyHasherArgon2ConfigParallelism                    = "hashers.argon2.parallelism"
	ViperKeyHasherArgon2ConfigSaltLength                     = "hashers.argon2.salt_length"
	ViperKeyHasherArgon2ConfigKeyLength                      = "hashers.argon2.key_length"
	ViperKeyHasherArgon2ConfigExpectedDuration               = "hashers.argon2.expected_duration"
	ViperKeyHasherArgon2ConfigExpectedDeviation              = "hashers.argon2.expected_deviation"
	ViperKeyHasherArgon2ConfigDedicatedMemory                = "hashers.argon2.dedicated_memory"
	ViperKeyHasherBcryptCost                                 = "hashers.bcrypt.cost"
	ViperKeyCipherAlgorithm                                  = "ciphers.algorithm"
	ViperKeyLinkLifespan                                     = "selfservice.methods.link.config.lifespan"
	ViperKeyLinkBaseURL                                      = "selfservice.methods.link.config.base_url"
	ViperKeyPasswordHaveIBeenPwnedHost                       = "selfservice.methods.password.config.haveibeenpwned_host"
	ViperKeyPasswordHaveIBeenPwnedEnabled                    = "selfservice.methods.password.config.haveibeenpwned_enabled"
	ViperKeyPasswordMaxBreaches                              = "selfservice.methods.password.config.max_breaches"
	ViperKeyPasswordMinLength                                = "selfservice.methods.password.config.min_password_length"
	ViperKeyPasswordIdentifierSimilarityCheckEnabled         = "selfservice.methods.password.config.identifier_similarity_check_enabled"
	ViperKeyIgnoreNetworkErrors                              = "selfservice.methods.password.config.ignore_network_errors"
	ViperKeyTOTPIssuer                                       = "selfservice.methods.totp.config.issuer"
	ViperKeyOIDCBaseRedirectURL                              = "selfservice.methods.oidc.config.base_redirect_uri"
	ViperKeyWebAuthnRPDisplayName                            = "selfservice.methods.webauthn.config.rp.display_name"
	ViperKeyWebAuthnRPID                                     = "selfservice.methods.webauthn.config.rp.id"
	ViperKeyWebAuthnRPOrigin                                 = "selfservice.methods.webauthn.config.rp.origin"
	ViperKeyWebAuthnRPIcon                                   = "selfservice.methods.webauthn.config.rp.issuer"
	ViperKeyWebAuthnPasswordless                             = "selfservice.methods.webauthn.config.passwordless"
	ViperKeyClientHTTPNoPrivateIPRanges                      = "clients.http.disallow_private_ip_ranges"
	ViperKeyVersion                                          = "version"
)
View Source
const (
	HighestAvailableAAL                 = "highest_available"
	Argon2DefaultMemory                 = 128 * bytesize.MB
	Argon2DefaultIterations      uint32 = 1
	Argon2DefaultSaltLength      uint32 = 16
	Argon2DefaultKeyLength       uint32 = 32
	Argon2DefaultDuration               = 500 * time.Millisecond
	Argon2DefaultDeviation              = 500 * time.Millisecond
	Argon2DefaultDedicatedMemory        = 1 * bytesize.GB
	BcryptDefaultCost            uint32 = 12
)
View Source
const DefaultSessionCookieName = "ory_kratos_session"

DefaultSessionCookieName returns the default cookie name for the kratos session.

View Source
const HookGlobal = "global"

Variables

View Source
var (
	Version = "master"
	Date    = "undefined"
	Commit  = "undefined"
)
View Source
var Argon2DefaultParallelism = uint8(runtime.NumCPU() * 2)

Functions

func HookStrategyKey

func HookStrategyKey(key, strategy string) string

func NewConfigHashHandler

func NewConfigHashHandler(c Provider, router router)

Types

type Argon2

type Argon2 struct {
	Memory            bytesize.ByteSize `json:"memory"`
	Iterations        uint32            `json:"iterations"`
	Parallelism       uint8             `json:"parallelism"`
	SaltLength        uint32            `json:"salt_length"`
	KeyLength         uint32            `json:"key_length"`
	ExpectedDuration  time.Duration     `json:"expected_duration"`
	ExpectedDeviation time.Duration     `json:"expected_deviation"`
	DedicatedMemory   bytesize.ByteSize `json:"dedicated_memory"`
}

func (*Argon2) MarshalJSON

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

type Bcrypt

type Bcrypt struct {
	Cost uint32 `json:"cost"`
}

type Config

type Config struct {
	// contains filtered or unexported fields
}

func MustNew

func MustNew(t *testing.T, l *logrusx.Logger, stdOutOrErr io.Writer, opts ...configx.OptionModifier) *Config

func New

func New(ctx context.Context, l *logrusx.Logger, stdOutOrErr io.Writer, opts ...configx.OptionModifier) (*Config, error)

func (*Config) AdminListenOn

func (p *Config) AdminListenOn() string

func (*Config) AdminSocketPermission

func (p *Config) AdminSocketPermission() *configx.UnixPermission

func (*Config) CORS

func (p *Config) CORS(iface string) (cors.Options, bool)

func (*Config) CipherAlgorithm

func (p *Config) CipherAlgorithm() string

func (*Config) ClientHTTPNoPrivateIPRanges

func (p *Config) ClientHTTPNoPrivateIPRanges() bool

func (*Config) ConfigVersion

func (p *Config) ConfigVersion() string

func (*Config) CookieDomain

func (p *Config) CookieDomain() string

func (*Config) CookiePath

func (p *Config) CookiePath() string

func (*Config) CookieSameSiteMode

func (p *Config) CookieSameSiteMode() http.SameSite

func (*Config) CourierExposeMetricsPort

func (p *Config) CourierExposeMetricsPort() int

func (*Config) CourierMessageTTL

func (p *Config) CourierMessageTTL() time.Duration

func (*Config) CourierSMSEnabled

func (p *Config) CourierSMSEnabled() bool

func (*Config) CourierSMSFrom

func (p *Config) CourierSMSFrom() string

func (*Config) CourierSMSRequestConfig

func (p *Config) CourierSMSRequestConfig() json.RawMessage

func (*Config) CourierSMTPFrom

func (p *Config) CourierSMTPFrom() string

func (*Config) CourierSMTPFromName

func (p *Config) CourierSMTPFromName() string

func (*Config) CourierSMTPHeaders

func (p *Config) CourierSMTPHeaders() map[string]string

func (*Config) CourierSMTPURL

func (p *Config) CourierSMTPURL() *url.URL

func (*Config) CourierTemplatesHelper

func (p *Config) CourierTemplatesHelper(key string) *CourierEmailTemplate

func (*Config) CourierTemplatesRecoveryInvalid

func (p *Config) CourierTemplatesRecoveryInvalid() *CourierEmailTemplate

func (*Config) CourierTemplatesRecoveryValid

func (p *Config) CourierTemplatesRecoveryValid() *CourierEmailTemplate

func (*Config) CourierTemplatesRoot

func (p *Config) CourierTemplatesRoot() string

func (*Config) CourierTemplatesVerificationInvalid

func (p *Config) CourierTemplatesVerificationInvalid() *CourierEmailTemplate

func (*Config) CourierTemplatesVerificationValid

func (p *Config) CourierTemplatesVerificationValid() *CourierEmailTemplate

func (*Config) DSN

func (p *Config) DSN() string

func (*Config) DefaultIdentityTraitsSchemaID

func (p *Config) DefaultIdentityTraitsSchemaID() string

func (*Config) DefaultIdentityTraitsSchemaURL

func (p *Config) DefaultIdentityTraitsSchemaURL() (*url.URL, error)

func (*Config) DisableAPIFlowEnforcement

func (p *Config) DisableAPIFlowEnforcement() bool

func (*Config) DisableAdminHealthRequestLog

func (p *Config) DisableAdminHealthRequestLog() bool

func (*Config) DisablePublicHealthRequestLog

func (p *Config) DisablePublicHealthRequestLog() bool

func (*Config) GetTSLCertificatesForAdmin

func (p *Config) GetTSLCertificatesForAdmin() []tls.Certificate

func (*Config) GetTSLCertificatesForPublic

func (p *Config) GetTSLCertificatesForPublic() []tls.Certificate

func (*Config) HasherArgon2

func (p *Config) HasherArgon2() *Argon2

func (*Config) HasherBcrypt

func (p *Config) HasherBcrypt() *Bcrypt

func (*Config) HasherPasswordHashingAlgorithm

func (p *Config) HasherPasswordHashingAlgorithm() string

func (*Config) IdentityTraitsSchemas

func (p *Config) IdentityTraitsSchemas() (Schemas, error)

func (*Config) IsBackgroundCourierEnabled

func (p *Config) IsBackgroundCourierEnabled() bool

func (*Config) IsInsecureDevMode

func (p *Config) IsInsecureDevMode() bool

func (*Config) MetricsListenOn

func (p *Config) MetricsListenOn() string

func (*Config) MustSet

func (p *Config) MustSet(key string, value interface{})

func (*Config) OIDCRedirectURIBase

func (p *Config) OIDCRedirectURIBase() *url.URL

func (*Config) ParseAbsoluteOrRelativeURI

func (p *Config) ParseAbsoluteOrRelativeURI(rawUrl string) (*url.URL, error)

func (*Config) ParseAbsoluteOrRelativeURIOrFail

func (p *Config) ParseAbsoluteOrRelativeURIOrFail(key string) *url.URL

func (*Config) ParseURI

func (p *Config) ParseURI(rawUrl string) (*url.URL, error)

func (*Config) ParseURIOrFail

func (p *Config) ParseURIOrFail(key string) *url.URL

func (*Config) PasswordPolicyConfig

func (p *Config) PasswordPolicyConfig() *PasswordPolicy

func (*Config) PublicListenOn

func (p *Config) PublicListenOn() string

func (*Config) PublicSocketPermission

func (p *Config) PublicSocketPermission() *configx.UnixPermission

func (*Config) SecretsCipher

func (p *Config) SecretsCipher() [][32]byte

func (*Config) SecretsDefault

func (p *Config) SecretsDefault() [][]byte

func (*Config) SecretsSession

func (p *Config) SecretsSession() [][]byte

func (*Config) SelfAdminURL

func (p *Config) SelfAdminURL() *url.URL

func (*Config) SelfPublicURL

func (p *Config) SelfPublicURL() *url.URL

func (*Config) SelfServiceBrowserAllowedReturnToDomains

func (p *Config) SelfServiceBrowserAllowedReturnToDomains() (us []url.URL)

func (*Config) SelfServiceBrowserDefaultReturnTo

func (p *Config) SelfServiceBrowserDefaultReturnTo() *url.URL

func (*Config) SelfServiceFlowErrorURL

func (p *Config) SelfServiceFlowErrorURL() *url.URL

func (*Config) SelfServiceFlowLoginAfterHooks

func (p *Config) SelfServiceFlowLoginAfterHooks(strategy string) []SelfServiceHook

func (*Config) SelfServiceFlowLoginBeforeHooks

func (p *Config) SelfServiceFlowLoginBeforeHooks() []SelfServiceHook

func (*Config) SelfServiceFlowLoginRequestLifespan

func (p *Config) SelfServiceFlowLoginRequestLifespan() time.Duration

func (*Config) SelfServiceFlowLoginReturnTo

func (p *Config) SelfServiceFlowLoginReturnTo(strategy string) *url.URL

func (*Config) SelfServiceFlowLoginUI

func (p *Config) SelfServiceFlowLoginUI() *url.URL

func (*Config) SelfServiceFlowLogoutRedirectURL

func (p *Config) SelfServiceFlowLogoutRedirectURL() *url.URL

func (*Config) SelfServiceFlowRecoveryAfterHooks

func (p *Config) SelfServiceFlowRecoveryAfterHooks(strategy string) []SelfServiceHook

func (*Config) SelfServiceFlowRecoveryEnabled

func (p *Config) SelfServiceFlowRecoveryEnabled() bool

func (*Config) SelfServiceFlowRecoveryRequestLifespan

func (p *Config) SelfServiceFlowRecoveryRequestLifespan() time.Duration

func (*Config) SelfServiceFlowRecoveryReturnTo

func (p *Config) SelfServiceFlowRecoveryReturnTo() *url.URL

func (*Config) SelfServiceFlowRecoveryUI

func (p *Config) SelfServiceFlowRecoveryUI() *url.URL

func (*Config) SelfServiceFlowRegistrationAfterHooks

func (p *Config) SelfServiceFlowRegistrationAfterHooks(strategy string) []SelfServiceHook

func (*Config) SelfServiceFlowRegistrationBeforeHooks

func (p *Config) SelfServiceFlowRegistrationBeforeHooks() []SelfServiceHook

func (*Config) SelfServiceFlowRegistrationEnabled

func (p *Config) SelfServiceFlowRegistrationEnabled() bool

func (*Config) SelfServiceFlowRegistrationRequestLifespan

func (p *Config) SelfServiceFlowRegistrationRequestLifespan() time.Duration

func (*Config) SelfServiceFlowRegistrationReturnTo

func (p *Config) SelfServiceFlowRegistrationReturnTo(strategy string) *url.URL

func (*Config) SelfServiceFlowRegistrationUI

func (p *Config) SelfServiceFlowRegistrationUI() *url.URL

func (*Config) SelfServiceFlowSettingsAfterHooks

func (p *Config) SelfServiceFlowSettingsAfterHooks(strategy string) []SelfServiceHook

func (*Config) SelfServiceFlowSettingsFlowLifespan

func (p *Config) SelfServiceFlowSettingsFlowLifespan() time.Duration

func (*Config) SelfServiceFlowSettingsPrivilegedSessionMaxAge

func (p *Config) SelfServiceFlowSettingsPrivilegedSessionMaxAge() time.Duration

func (*Config) SelfServiceFlowSettingsReturnTo

func (p *Config) SelfServiceFlowSettingsReturnTo(strategy string, defaultReturnTo *url.URL) *url.URL

func (*Config) SelfServiceFlowSettingsUI

func (p *Config) SelfServiceFlowSettingsUI() *url.URL

func (*Config) SelfServiceFlowVerificationAfterHooks

func (p *Config) SelfServiceFlowVerificationAfterHooks(strategy string) []SelfServiceHook

func (*Config) SelfServiceFlowVerificationEnabled

func (p *Config) SelfServiceFlowVerificationEnabled() bool

func (*Config) SelfServiceFlowVerificationRequestLifespan

func (p *Config) SelfServiceFlowVerificationRequestLifespan() time.Duration

func (*Config) SelfServiceFlowVerificationReturnTo

func (p *Config) SelfServiceFlowVerificationReturnTo(defaultReturnTo *url.URL) *url.URL

func (*Config) SelfServiceFlowVerificationUI

func (p *Config) SelfServiceFlowVerificationUI() *url.URL

func (*Config) SelfServiceLinkMethodBaseURL

func (p *Config) SelfServiceLinkMethodBaseURL() *url.URL

func (*Config) SelfServiceLinkMethodLifespan

func (p *Config) SelfServiceLinkMethodLifespan() time.Duration

func (*Config) SelfServiceSettingsRequiredAAL

func (p *Config) SelfServiceSettingsRequiredAAL() string

func (*Config) SelfServiceStrategy

func (p *Config) SelfServiceStrategy(strategy string) *SelfServiceStrategy

func (*Config) SessionDomain

func (p *Config) SessionDomain() string

func (*Config) SessionLifespan

func (p *Config) SessionLifespan() time.Duration

SessionLifespan returns nil when the value is not set.

func (*Config) SessionName

func (p *Config) SessionName() string

func (*Config) SessionPath

func (p *Config) SessionPath() string

func (*Config) SessionPersistentCookie

func (p *Config) SessionPersistentCookie() bool

func (*Config) SessionSameSiteMode

func (p *Config) SessionSameSiteMode() http.SameSite

func (*Config) SessionWhoAmIAAL

func (p *Config) SessionWhoAmIAAL() string

func (*Config) Set

func (p *Config) Set(key string, value interface{}) error

func (*Config) Source

func (p *Config) Source() *configx.Provider

func (*Config) TOTPIssuer

func (p *Config) TOTPIssuer() string

func (*Config) Tracing

func (p *Config) Tracing() *tracing.Config

func (*Config) WebAuthnConfig

func (p *Config) WebAuthnConfig() *webauthn.Config

func (*Config) WebAuthnForPasswordless

func (p *Config) WebAuthnForPasswordless() bool

type CourierConfigs

type CourierConfigs interface {
	CourierSMTPURL() *url.URL
	CourierSMTPFrom() string
	CourierSMTPFromName() string
	CourierSMTPHeaders() map[string]string
	CourierSMSEnabled() bool
	CourierSMSFrom() string
	CourierSMSRequestConfig() json.RawMessage
	CourierTemplatesRoot() string
	CourierTemplatesVerificationInvalid() *CourierEmailTemplate
	CourierTemplatesVerificationValid() *CourierEmailTemplate
	CourierTemplatesRecoveryInvalid() *CourierEmailTemplate
	CourierTemplatesRecoveryValid() *CourierEmailTemplate
	CourierMessageTTL() time.Duration
}

type CourierEmailBodyTemplate

type CourierEmailBodyTemplate struct {
	PlainText string `json:"plaintext"`
	HTML      string `json:"html"`
}

type CourierEmailTemplate

type CourierEmailTemplate struct {
	Body    *CourierEmailBodyTemplate `json:"body"`
	Subject string                    `json:"subject"`
}

type PasswordPolicy

type PasswordPolicy struct {
	HaveIBeenPwnedHost               string `json:"haveibeenpwned_host"`
	HaveIBeenPwnedEnabled            bool   `json:"haveibeenpwned_enabled"`
	MaxBreaches                      uint   `json:"max_breaches"`
	IgnoreNetworkErrors              bool   `json:"ignore_network_errors"`
	MinPasswordLength                uint   `json:"min_password_length"`
	IdentifierSimilarityCheckEnabled bool   `json:"identifier_similarity_check_enabled"`
}

type Provider

type Provider interface {
	Config(ctx context.Context) *Config
}

type Schema

type Schema struct {
	ID  string `json:"id"`
	URL string `json:"url"`
}

type Schemas

type Schemas []Schema

func (Schemas) FindSchemaByID

func (s Schemas) FindSchemaByID(id string) (*Schema, error)

type SelfServiceHook

type SelfServiceHook struct {
	Name   string          `json:"hook"`
	Config json.RawMessage `json:"config"`
}

type SelfServiceStrategy

type SelfServiceStrategy struct {
	Enabled bool            `json:"enabled"`
	Config  json.RawMessage `json:"config"`
}

Jump to

Keyboard shortcuts

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