ShouldResetPasswordMiddleware
public struct ShouldResetPasswordMiddleware<U> : Middleware where U : AdminPanelUserType
Basic middleware to redirect users that needs to reset their password to the supplied path
-
Initialise the
ShouldResetPasswordMiddlewareDeclaration
Swift
public init(U authenticatableType: U.Type = U.self, path: String)Parameters
authenticatableTypeThe type to check if reset password is required
pathThe path to redirect to if the user needs to reset their password
-
See
Middleware.respond.Declaration
Swift
public func respond(to req: Request, chainingTo next: Responder) throws -> Future<Response> -
Use this middleware to redirect users away from protected content to a edit page when they need to reset their password
Declaration
Swift
public static func shouldResetPassword( path: String = "/admin/users/me/edit" ) -> ShouldResetPasswordMiddleware
ShouldResetPasswordMiddleware Structure Reference