summaryrefslogtreecommitdiffstats
path: root/src/models/auth.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/auth.rs')
-rw-r--r--src/models/auth.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/models/auth.rs b/src/models/auth.rs
index 8a70244..651bf26 100644
--- a/src/models/auth.rs
+++ b/src/models/auth.rs
@@ -32,13 +32,22 @@ pub struct AuthBody {
token_type: String,
}
-/// Payload used for user creation
+/// Payload used for login
#[derive(Deserialize)]
pub struct LoginCredentials {
pub username: String,
pub password: String,
}
+/// Paylod used for user creation
+#[derive(Deserialize)]
+pub struct SignUpForm {
+ pub email: String,
+ pub username: String,
+ pub password1: String,
+ pub password2: String,
+}
+
static KEYS: Lazy<Keys> = Lazy::new(|| {
let secret = &crate::config::CONFIG.jwt_secret;
Keys::new(secret.as_bytes())