This repository has been archived by the owner on Apr 20, 2024. It is now read-only.
GeneratePasswordResetTokenCommand
siemensikkema edited this page Feb 25, 2020
·
1 revision
Generates password reset tokens for a user which can be used to reset their password.
public struct GeneratePasswordResetTokenCommand<U: PasswordResettable>: Command
Command
GeneratePasswordResetTokenCommand.GeneratePasswordResetTokenCommand.Keys
Creates a new password reset token command with a custom lookup strategy.
public init(databaseIdentifier: DatabaseIdentifier<U.Database>, makeFilter: @escaping (String) -> FilterOperator<U.Database, U>, context: U.Context = U.Context.requestResetPassword())
Example to enable search by email:
GeneratePasswordResetTokenCommand(databaseIdentifier: .mysql) { query in
try \User.email == $0
}
- databaseIdentifier: identifier of database from where to load the user.
- makeFilter: used to create the filter from the query.
- context: The Reset context to use when generating the token.
See Command
let arguments: [CommandArgument] = [.argument(name: Keys.query)]
See CommandRunnable
let help = ["Generates a password reset token for a user with a given id."]
See CommandRunnable
let options: [CommandOption] = []
See CommandRunnable
public func run(using context: CommandContext) throws -> Future<Void>
Generated at 2020-02-25T14:56:20+0000 using swift-doc.
Types
- GeneratePasswordResetTokenCommand
- GeneratePasswordResetTokenCommand.GeneratePasswordResetTokenCommand.Keys
- HasPasswordChangeCount.HasRequestResetPasswordContext.ResetPasswordContext
- HasPasswordChangeCount.HasRequestResetPasswordContext.ResetPasswordContext.PasswordResettable.PasswordResettable.PasswordResettable.PasswordResettable.ModelPayloadType.ModelPayload
- PasswordChangeCountClaim
- ResetConfig
- ResetConfigTag
- ResetConfigTag.ResetConfigTagData
- ResetControllerType.ResetController
- ResetEndpoints
- ResetError
- ResetProvider
- ResetResponses