EmailIdpConfigFromPasswords class
Creates a new EmailIdpConfig instance from keys on the passwords.yaml file.
This constructor requires that a Serverpod instance has already been initialized.
- Inheritance
-
- Object
- IdentityProviderBuilder<
EmailIdp> - EmailIdpConfig
- EmailIdpConfigFromPasswords
- Implementers
Constructors
-
EmailIdpConfigFromPasswords({List<
String> fallbackSecretHashPeppers = const [], Duration registrationVerificationCodeLifetime = const Duration(minutes: 15), int registrationVerificationCodeAllowedAttempts = 3, String registrationVerificationCodeGenerator() = defaultVerificationCodeGenerator, Duration passwordResetVerificationCodeLifetime = const Duration(minutes: 15), int passwordResetVerificationCodeAllowedAttempts = 3, String passwordResetVerificationCodeGenerator() = defaultVerificationCodeGenerator, SendRegistrationVerificationCodeFunction? sendRegistrationVerificationCode, SendPasswordResetVerificationCodeFunction? sendPasswordResetVerificationCode, OnPasswordResetCompletedFunction? onPasswordResetCompleted, RateLimit failedLoginRateLimit = const RateLimit(maxAttempts: 5, timeframe: Duration(minutes: 5)), PasswordValidationFunction passwordValidationFunction = defaultRegistrationPasswordValidationFunction, RateLimit maxPasswordResetAttempts = const RateLimit(timeframe: Duration(hours: 1), maxAttempts: 3), int secretHashSaltLength = 16, AfterAccountCreatedFunction? onAfterAccountCreated, String otpLoginVerificationCodeGenerator() = defaultOtpVerificationCodeGenerator, Duration otpLoginVerificationCodeLifetime = const Duration(minutes: 15), int otpLoginVerificationCodeAllowedAttempts = 3, RateLimit maxOtpLoginAttempts = const RateLimit(timeframe: Duration(minutes: 15), maxAttempts: 5), SendOtpLoginVerificationCodeFunction? sendOtpLoginVerificationCode, bool allowPasswordOnOtpRegistration = false}) - Creates a new EmailIdpConfigFromPasswords instance.
Properties
- allowPasswordOnOtpRegistration → bool
-
Whether users creating an account through a passwordless login may set a
password for it.
finalinherited
- failedLoginRateLimit → RateLimit
-
The maximum number of failed logins for the same email.
finalinherited
-
fallbackSecretHashPeppers
→ List<
String> -
Optional fallback peppers for validating passwords and verification codes created with previous peppers.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxOtpLoginAttempts → RateLimit
-
How many one-time passwords can be requested for the same email.
finalinherited
- maxPasswordResetAttempts → RateLimit
-
How many password reset attempts are allowed for the same email.
finalinherited
- onAfterAccountCreated → AfterAccountCreatedFunction?
-
Callback to be invoked after a new email account has been created.
finalinherited
- onPasswordResetCompleted → OnPasswordResetCompletedFunction?
-
Callback to be invoked after a password reset is successfully completed.
finalinherited
- otpLoginVerificationCodeAllowedAttempts → int
-
How many attempts are permitted for a single one-time password (during
the otpLoginVerificationCodeLifetime window).
finalinherited
- otpLoginVerificationCodeGenerator → String Function()
-
Function returning the one-time password for passwordless logins.
finalinherited
- otpLoginVerificationCodeLifetime → Duration
-
The time for the one-time password to be valid.
finalinherited
- passwordResetVerificationCodeAllowedAttempts → int
-
How many attempts are permitted for a single password reset verification code (during the passwordResetVerificationCodeLifetime window).
finalinherited
- passwordResetVerificationCodeGenerator → String Function()
-
Function returning the password rest verification code.
finalinherited
- passwordResetVerificationCodeLifetime → Duration
-
The time for password reset verification codes to be valid.
finalinherited
- passwordValidationFunction → PasswordValidationFunction
-
Function to check passwords against a policy during registration and password change.
finalinherited
- registrationVerificationCodeAllowedAttempts → int
-
How many attempts are permitted for an email verification code (during the registrationVerificationCodeLifetime window).
finalinherited
- registrationVerificationCodeGenerator → String Function()
-
Function returning the registration verification code.
finalinherited
- registrationVerificationCodeLifetime → Duration
-
The time for the registration email verification code to be valid.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secretHashPepper → String
-
The pepper used for hashing passwords and verification codes.
finalinherited
- secretHashSaltLength → int
-
The length in bytes of the random salt generated for each hashed secret.
finalinherited
- sendOtpLoginVerificationCode → SendOtpLoginVerificationCodeFunction?
-
Callback to be invoked for sending outgoing one-time password emails, for
passwordless logins exposed by extending
EmailOtpIdpBaseEndpoint.ServerpodCloudEmailIdpConfigsets it.finalinherited - sendPasswordResetVerificationCode → SendPasswordResetVerificationCodeFunction?
-
Callback to be invoked for sending outgoing password reset emails.
finalinherited
- sendRegistrationVerificationCode → SendRegistrationVerificationCodeFunction?
-
Callback to be invoked for sending outgoing registration emails for the email address verification.
finalinherited
- type → Type
-
The type of the provider that this builder creates.
Used to store the provider in the AuthConfig.
no setterinherited
Methods
-
build(
{required TokenManager tokenManager, required AuthUsers authUsers, required UserProfiles userProfiles}) → EmailIdp -
Builds a new instance of the identity provider.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited