Skip to content
Clone

refactor(auth): remove password_hash types (inlined into impls)

zhenyi committed
parent b5d4fcd commit 418f30e Browse files

1 file changed

+0 −23

Deleted lib/auth/features/password_hash/types.rs
@@ -1,23 +0,0 @@
1use serde::{Deserialize, Serialize};
2
3/// Input payload for hashing / verifying a password.
4#[derive(Debug, Clone)]
5pub struct PasswordInput<'a> {
6 pub password: &'a str,
7}
8
9/// Result of [`hash_password`]: a PHC-formatted Argon2id string.
10#[derive(Debug, Clone, Serialize, Deserialize)]
11pub struct PasswordHashString(pub String);
12
13impl AsRef<str> for PasswordHashString {
14 fn as_ref(&self) -> &str {
15 &self.0
16 }
17}
18
19/// Strength validation request for the password policy.
20#[derive(Debug, Clone)]
21pub struct ValidatePasswordRequest<'a> {
22 pub password: &'a str,
23}