diff options
| author | mrw1593 <botahamec@outlook.com> | 2023-05-13 12:22:11 -0400 |
|---|---|---|
| committer | mrw1593 <botahamec@outlook.com> | 2023-05-29 10:45:54 -0400 |
| commit | 0b55587443103b20491139d54670474a35286be8 (patch) | |
| tree | 7aed93ba53a71ce245208afb6593e7726e8b0026 /src/models/user.rs | |
| parent | efe24b616f91121512cb6b2c61cd9b850f943e2d (diff) | |
Add a login endpoint that does nothing
Diffstat (limited to 'src/models/user.rs')
| -rw-r--r-- | src/models/user.rs | 5 |
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) + } } |
