config/initializers/warden/strategies/password.rb in mtwarden-4.1.2 vs config/initializers/warden/strategies/password.rb in mtwarden-5.0.0b

- old
+ new

@@ -1,18 +1,18 @@ Warden::Strategies.add(:password) do def subdomain ActionDispatch::Http::URL.extract_subdomains(request.host, 1) end - + def valid? subdomain.present? && params["user"] end - + def authenticate! return fail! unless account = Mtwarden::Account.find_by(subdomain: subdomain) return fail! unless user = account.users.find_by(email: params["user"]["email"]) return fail! unless user.authenticate(params["user"]["password"]) success! user end -end \ No newline at end of file +end