use crate::{
api::{claims::Claims, APIError, Oper, Perform},
apub::ApubObjectType,
blocking,
websocket::{
server::{JoinUserRoom, SendAllMessage, SendUserRoomMessage},
UserOperation,
WebsocketInfo,
},
DbPool,
LemmyError,
};
use bcrypt::verify;
use lemmy_db::{
comment::*,
comment_view::*,
community::*,
community_view::*,
moderator::*,
naive_now,
password_reset_request::*,
post::*,
post_view::*,
private_message::*,
private_message_view::*,
site::*,
site_view::*,
user::*,
user_mention::*,
user_mention_view::*,
user_view::*,
Crud,
Followable,
Joinable,
ListingType,
SortType,
};
use lemmy_utils::{
generate_actor_keypair,
generate_random_string,
is_valid_username,
make_apub_endpoint,
naive_from_unix,
remove_slurs,
send_email,
settings::Settings,
slur_check,
slurs_vec_to_str,
EndpointType,
};
use log::error;
use serde::{Deserialize, Serialize};
use std::str::FromStr;
#[derive(Serialize, Deserialize, Debug)]
pub struct Login {
username_or_email: String,
<