change pw_cost to integer to match official impl
This commit is contained in:
parent
783873b74d
commit
6729959580
|
@ -2,7 +2,7 @@ CREATE TABLE users (
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||||
email VARCHAR NOT NULL,
|
email VARCHAR NOT NULL,
|
||||||
password VARCHAR NOT NULL,
|
password VARCHAR NOT NULL,
|
||||||
pw_cost VARCHAR NOT NULL,
|
pw_cost INTEGER NOT NULL,
|
||||||
pw_nonce VARCHAR NOT NULL,
|
pw_nonce VARCHAR NOT NULL,
|
||||||
version VARCHAR NOT NULL
|
version VARCHAR NOT NULL
|
||||||
)
|
)
|
|
@ -81,7 +81,7 @@ fn _sign_in(db: DbConn, mail: &str, passwd: &str) -> Custom<JsonResp<AuthResult>
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize)]
|
||||||
struct AuthParams {
|
struct AuthParams {
|
||||||
pw_cost: String,
|
pw_cost: i32,
|
||||||
pw_nonce: String,
|
pw_nonce: String,
|
||||||
version: String
|
version: String
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ table! {
|
||||||
id -> Integer,
|
id -> Integer,
|
||||||
email -> Text,
|
email -> Text,
|
||||||
password -> Text,
|
password -> Text,
|
||||||
pw_cost -> Text,
|
pw_cost -> Integer,
|
||||||
pw_nonce -> Text,
|
pw_nonce -> Text,
|
||||||
version -> Text,
|
version -> Text,
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ struct UserQuery {
|
||||||
pub id: i32,
|
pub id: i32,
|
||||||
pub email: String,
|
pub email: String,
|
||||||
pub password: String,
|
pub password: String,
|
||||||
pub pw_cost: String,
|
pub pw_cost: i32,
|
||||||
pub pw_nonce: String,
|
pub pw_nonce: String,
|
||||||
pub version: String
|
pub version: String
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ pub struct User {
|
||||||
pub id: i32,
|
pub id: i32,
|
||||||
pub email: String,
|
pub email: String,
|
||||||
pub password: Password,
|
pub password: Password,
|
||||||
pub pw_cost: String,
|
pub pw_cost: i32,
|
||||||
pub pw_nonce: String,
|
pub pw_nonce: String,
|
||||||
pub version: String
|
pub version: String
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ pub struct User {
|
||||||
pub struct NewUser {
|
pub struct NewUser {
|
||||||
pub email: String,
|
pub email: String,
|
||||||
pub password: String,
|
pub password: String,
|
||||||
pub pw_cost: String,
|
pub pw_cost: i32,
|
||||||
pub pw_nonce: String,
|
pub pw_nonce: String,
|
||||||
pub version: String
|
pub version: String
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue