Started some auth stuff
This commit is contained in:
parent
eefaf7acaa
commit
5e86133651
8 changed files with 153 additions and 9 deletions
17
src/rbs/auth.rs
Normal file
17
src/rbs/auth.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
use crate::RbDbConn;
|
||||
use serde::Deserialize;
|
||||
use rocket::serde::json::Json;
|
||||
|
||||
#[derive(Deserialize)]
|
||||
struct Credentials {
|
||||
username: String,
|
||||
password: String
|
||||
}
|
||||
|
||||
#[post("/login", data="<credentials>")]
|
||||
async fn login(conn: RbDbConn, credentials: Json<Credentials>) {
|
||||
|
||||
}
|
||||
|
||||
// /refresh
|
||||
// /logout
|
||||
|
|
@ -8,6 +8,8 @@ extern crate openssl;
|
|||
use rocket::{fairing::AdHoc, Build, Rocket};
|
||||
use rocket_sync_db_pools::{database, diesel};
|
||||
|
||||
mod auth;
|
||||
|
||||
embed_migrations!();
|
||||
|
||||
#[database("postgres_rb")]
|
||||
|
|
|
|||
Reference in a new issue