Skip to content

Commit

Permalink
rename User.pw_hash to password
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbchron committed Feb 10, 2024
1 parent 04d8b25 commit a010a71
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/auth/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ use surrealdb::{engine::remote::ws::Client, sql::Thing};

#[derive(Clone, Debug, Deserialize)]
pub struct User {
pub id: Thing,
pub name: String,
pub email: String,
pub pw_hash: Secret<String>,
pub id: Thing,
pub name: String,
pub email: String,
pub password: Secret<String>,
}

impl AuthUser for User {
type Id = Thing;

fn id(&self) -> Self::Id { self.id.clone() }
fn session_auth_hash(&self) -> &[u8] {
self.pw_hash.expose_secret().as_bytes()
self.password.expose_secret().as_bytes()
}
}

Expand Down

0 comments on commit a010a71

Please sign in to comment.