feat/axum-0.7.x - uses breaking changes from axum 0.7.x #4
520
Cargo.lock
generated
520
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -13,8 +13,8 @@ tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
|
||||
clap = {version = "4.4.7", features = ["derive", "env"]}
|
||||
async-trait = {version = "0.1.74", features = []}
|
||||
|
||||
axum = {version = "0.6.20", features = []}
|
||||
axum-extra = {version = "0.8.0", features = ["cookie", "cookie-private"]}
|
||||
axum = { git = "https://github.com/tokio-rs/axum", branch = "main", features = ["macros"] }
|
||||
axum-extra = {git = "https://github.com/tokio-rs/axum", branch = "main" , features = ["cookie", "cookie-private", "typed-header"]}
|
||||
axum-sessions = {version = "0.6.1", features = []}
|
||||
async-sqlx-session = {version = "0.4.0", features = ["pg"]}
|
||||
|
||||
|
@ -1,16 +1,15 @@
|
||||
use std::fmt::Display;
|
||||
|
||||
use axum::extract::{FromRef, FromRequestParts, Query, State};
|
||||
|
||||
use axum::headers::authorization::Basic;
|
||||
use axum::headers::{Authorization, Cookie};
|
||||
use axum::http::request::Parts;
|
||||
use axum::http::StatusCode;
|
||||
|
||||
use axum::response::{ErrorResponse, IntoResponse, Redirect};
|
||||
use axum::routing::get;
|
||||
use axum::{async_trait, Json, RequestPartsExt, Router, TypedHeader};
|
||||
use axum::{async_trait, Json, RequestPartsExt, Router};
|
||||
|
||||
use axum_extra::headers::authorization::Basic;
|
||||
use axum_extra::headers::{Authorization, Cookie};
|
||||
use axum_extra::TypedHeader;
|
||||
use serde::Deserialize;
|
||||
use serde_json::json;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
use std::net::SocketAddr;
|
||||
use std::{net::SocketAddr, str::FromStr};
|
||||
|
||||
use axum::{
|
||||
extract::{FromRef, State},
|
||||
@ -60,13 +60,10 @@ async fn main() -> anyhow::Result<()> {
|
||||
.with_state(state)
|
||||
.nest("/auth", AuthController::new_router(auth_service).await?);
|
||||
|
||||
let addr = SocketAddr::from(([127, 0, 0, 1], 3001));
|
||||
println!("listening on: {addr}");
|
||||
println!("open browser at: http://localhost:3001/auth/zitadel");
|
||||
axum::Server::bind(&addr)
|
||||
.serve(app.into_make_service())
|
||||
.await
|
||||
.unwrap();
|
||||
let addr = SocketAddr::from_str(&format!("{}:{}", "127.0.0.1", "3000"))?;
|
||||
let listener = tokio::net::TcpListener::bind(&addr).await?;
|
||||
|
||||
axum::serve(listener, app).await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
use std::net::SocketAddr;
|
||||
use std::{net::SocketAddr, str::FromStr};
|
||||
|
||||
use axum::{
|
||||
extract::{FromRef, State},
|
||||
@ -58,10 +58,11 @@ async fn main() -> anyhow::Result<()> {
|
||||
let addr = SocketAddr::from(([127, 0, 0, 1], 3001));
|
||||
println!("listening on: {addr}");
|
||||
println!("open browser at: http://localhost:3001/auth/zitadel");
|
||||
axum::Server::bind(&addr)
|
||||
.serve(app.into_make_service())
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
let addr = SocketAddr::from_str(&format!("{}:{}", "127.0.0.1", "3000"))?;
|
||||
let listener = tokio::net::TcpListener::bind(&addr).await?;
|
||||
|
||||
axum::serve(listener, app).await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user