mirror of
https://github.com/warp-tech/warpgate.git
synced 2025-02-24 23:45:18 +08:00
lint
This commit is contained in:
parent
1271dee26d
commit
087b943372
2 changed files with 4 additions and 6 deletions
|
@ -43,12 +43,10 @@ impl CredentialPolicy for UserRequireCredentialsPolicy {
|
|||
} else {
|
||||
CredentialPolicyResponse::Ok
|
||||
}
|
||||
} else if valid_credentials.is_empty() {
|
||||
CredentialPolicyResponse::NeedMoreCredentials
|
||||
} else {
|
||||
if valid_credentials.is_empty() {
|
||||
CredentialPolicyResponse::NeedMoreCredentials
|
||||
} else {
|
||||
CredentialPolicyResponse::Ok
|
||||
}
|
||||
CredentialPolicyResponse::Ok
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -981,7 +981,7 @@ impl ServerSession {
|
|||
let selector: AuthSelector = ssh_username.expose_secret().into();
|
||||
info!("Keyboard-interactive auth as {:?}", selector);
|
||||
|
||||
let cred = response.map(|otp| AuthCredential::Otp(otp));
|
||||
let cred = response.map(AuthCredential::Otp);
|
||||
|
||||
match self.try_auth(&selector, cred).await {
|
||||
Ok(AuthResult::Accepted { .. }) => russh::server::Auth::Accept,
|
||||
|
|
Loading…
Reference in a new issue