mirror of
https://github.com/Noratrieb/cluelessh.git
synced 2026-01-14 16:35:06 +01:00
more moves
This commit is contained in:
parent
8a627949a3
commit
362d8c57ce
16 changed files with 164 additions and 175 deletions
|
|
@ -26,7 +26,10 @@ pub enum AuthError {
|
|||
|
||||
impl UserPublicKey {
|
||||
/// Blocking!
|
||||
pub async fn for_user_and_key(user: String, provided_key: &PublicKey) -> Result<Self, AuthError> {
|
||||
pub async fn for_user_and_key(
|
||||
user: String,
|
||||
provided_key: &PublicKey,
|
||||
) -> Result<Self, AuthError> {
|
||||
let user = tokio::task::spawn_blocking(move || {
|
||||
users::get_user_by_name(&user).ok_or(AuthError::UnknownUser)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue