summaryrefslogtreecommitdiff
path: root/src/models
diff options
context:
space:
mode:
authormrw1593 <botahamec@outlook.com>2023-05-13 12:22:11 -0400
committermrw1593 <botahamec@outlook.com>2023-05-29 10:45:54 -0400
commit0b55587443103b20491139d54670474a35286be8 (patch)
tree7aed93ba53a71ce245208afb6593e7726e8b0026 /src/models
parentefe24b616f91121512cb6b2c61cd9b850f943e2d (diff)
Add a login endpoint that does nothing
Diffstat (limited to 'src/models')
-rw-r--r--src/models/user.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/models/user.rs b/src/models/user.rs
index f5fd20e..4649890 100644
--- a/src/models/user.rs
+++ b/src/models/user.rs
@@ -1,5 +1,6 @@
use std::hash::Hash;
+use exun::RawUnexpected;
use uuid::Uuid;
use crate::services::crypto::PasswordHash;
@@ -41,4 +42,8 @@ impl User {
pub fn password_version(&self) -> u8 {
self.password.version()
}
+
+ pub fn check_password(&self, password: &str) -> Result<bool, RawUnexpected> {
+ self.password.check_password(password)
+ }
}