Fix cargo clippy issues
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -108,15 +108,11 @@ impl WebAuthManager {
|
||||
) -> Res<WebauthnPubKey> {
|
||||
let state: RegisterKeyOpaqueData = self.crypto_wrapper.decrypt(opaque_state)?;
|
||||
if state.user_id != user.uid {
|
||||
return Err(Box::new(std::io::Error::other(
|
||||
"Invalid user for pubkey!",
|
||||
)));
|
||||
return Err(Box::new(std::io::Error::other("Invalid user for pubkey!")));
|
||||
}
|
||||
|
||||
if state.expire < time() {
|
||||
return Err(Box::new(std::io::Error::other(
|
||||
"Challenge has expired!",
|
||||
)));
|
||||
return Err(Box::new(std::io::Error::other("Challenge has expired!")));
|
||||
}
|
||||
|
||||
let res = self.core.finish_passkey_registration(
|
||||
@@ -154,15 +150,11 @@ impl WebAuthManager {
|
||||
) -> Res {
|
||||
let state: AuthStateOpaqueData = self.crypto_wrapper.decrypt(opaque_state)?;
|
||||
if &state.user_id != user_id {
|
||||
return Err(Box::new(std::io::Error::other(
|
||||
"Invalid user for pubkey!",
|
||||
)));
|
||||
return Err(Box::new(std::io::Error::other("Invalid user for pubkey!")));
|
||||
}
|
||||
|
||||
if state.expire < time() {
|
||||
return Err(Box::new(std::io::Error::other(
|
||||
"Challenge has expired!",
|
||||
)));
|
||||
return Err(Box::new(std::io::Error::other("Challenge has expired!")));
|
||||
}
|
||||
|
||||
self.core.finish_passkey_authentication(
|
||||
|
||||
Reference in New Issue
Block a user