Implemented user authentication.
This commit is contained in:
@@ -13,6 +13,7 @@ async fn main() -> std::io::Result<()> {
|
||||
use actix_web::web::Data;
|
||||
use sqlx::migrate;
|
||||
use sqlx::postgres::PgPoolOptions;
|
||||
use rezervator::backend::auth_middleware::Authentication;
|
||||
|
||||
let conf = get_configuration(None).await.unwrap();
|
||||
let addr = conf.leptos_options.site_addr;
|
||||
@@ -32,6 +33,7 @@ async fn main() -> std::io::Result<()> {
|
||||
|
||||
App::new()
|
||||
.app_data(Data::new(AppData::new(pool.clone())))
|
||||
.wrap(Authentication)
|
||||
.wrap(SessionMiddleware::new(
|
||||
CookieSessionStore::default(),
|
||||
key.clone()
|
||||
|
||||
Reference in New Issue
Block a user