Updated dependencies
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
mod web;
|
||||
|
||||
use std::net::SocketAddr;
|
||||
use std::path::Path;
|
||||
use std::process;
|
||||
|
||||
@@ -18,6 +19,7 @@ use dotenvy::dotenv;
|
||||
use google_home::{GoogleHome, Request, Response};
|
||||
use mlua::LuaSerdeExt;
|
||||
use rumqttc::AsyncClient;
|
||||
use tokio::net::TcpListener;
|
||||
use tracing::{debug, error, info, warn};
|
||||
use web::{ApiError, User};
|
||||
|
||||
@@ -154,11 +156,10 @@ async fn app() -> anyhow::Result<()> {
|
||||
});
|
||||
|
||||
// Start the web server
|
||||
let addr = fulfillment_config.into();
|
||||
let addr: SocketAddr = fulfillment_config.into();
|
||||
info!("Server started on http://{addr}");
|
||||
axum::Server::try_bind(&addr)?
|
||||
.serve(app.into_make_service())
|
||||
.await?;
|
||||
let listener = TcpListener::bind(addr).await?;
|
||||
axum::serve(listener, app).await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -93,6 +93,8 @@ where
|
||||
|
||||
// Create a request to the auth server
|
||||
// TODO: Do some discovery to find the correct url for this instead of assuming
|
||||
// TODO: I think we can also just run Authlia in front of the endpoint instead
|
||||
// This would then give us a header containing the logged in user info?
|
||||
let mut req = reqwest::Client::new().get(format!("{}/userinfo", openid_url));
|
||||
|
||||
// Add auth header to the request if it exists
|
||||
|
||||
Reference in New Issue
Block a user