From 0b55587443103b20491139d54670474a35286be8 Mon Sep 17 00:00:00 2001 From: mrw1593 Date: Sat, 13 May 2023 12:22:11 -0400 Subject: Add a login endpoint that does nothing --- src/models/user.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/models') 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 { + self.password.check_password(password) + } } -- cgit v1.2.3