Ready to implement login page

This commit is contained in:
2022-03-30 10:29:10 +02:00
parent 70df96f286
commit 5bc4af399d
7 changed files with 118 additions and 4 deletions

View File

@ -1,8 +1,10 @@
use actix_web::{App, HttpServer, web, get};
use actix_web::{App, get, HttpServer, web};
use actix_web::middleware::Logger;
use clap::Parser;
use basic_oidc::constants::{DEFAULT_ADMIN_PASSWORD, DEFAULT_ADMIN_USERNAME};
use basic_oidc::controllers::assets_controller::assets_route;
use basic_oidc::controllers::login_controller::login_route;
use basic_oidc::data::app_config::AppConfig;
use basic_oidc::data::entity_manager::EntityManager;
use basic_oidc::data::user::{hash_password, User};
@ -50,8 +52,10 @@ async fn main() -> std::io::Result<()> {
HttpServer::new(|| {
App::new()
.wrap(Logger::default())
.service(health)
.route("/assets/{path:.*}", web::get().to(assets_route))
.route("/login", web::get().to(login_route))
})
.bind(config.listen_address)?
.run()