Box::pin authenticate function

This commit is contained in:
Maurus Decimus
2026-04-24 19:58:03 +02:00
parent 96795b0cf2
commit e73b65c5a3
9 changed files with 58 additions and 73 deletions

View File

@@ -47,7 +47,7 @@ impl<T: SessionStream> Session<T> {
.id(args.tag.clone())
})?;
Box::pin(self.authenticate(credentials, args.tag)).await
self.authenticate(credentials, args.tag).await
} else {
self.receiver.request = receiver::Request {
tag: args.tag,

View File

@@ -13,14 +13,14 @@ impl<T: SessionStream> Session<T> {
pub async fn handle_login(&mut self, request: Request<Command>) -> trc::Result<()> {
let arguments = request.parse_login()?;
Box::pin(self.authenticate(
self.authenticate(
Credentials::Basic {
username: arguments.username.to_string(),
secret: arguments.password.to_string(),
mfa_token: None,
},
arguments.tag,
))
)
.await
}
}