From 8ad1c15057d7302b7d2c1fbe1a1192a829fae1d5 Mon Sep 17 00:00:00 2001 From: edge Date: Sun, 16 Feb 2025 21:18:46 +0900 Subject: [PATCH] update axum to 0.8 --- README.md | 4 +++- examples/axum-basic/Cargo.toml | 2 +- examples/axum-custom-claims/Cargo.toml | 2 +- examples/axum-custom-claims/src/main.rs | 2 -- examples/axum-sqlite/Cargo.toml | 2 +- firebase-auth/Cargo.toml | 4 ++-- firebase-auth/src/axum_feature.rs | 2 -- firebase-auth/src/structs.rs | 2 ++ 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 60cacb3..25581dc 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ ## Notice +Version 0.5.x supports Axum 0.8. + Version 0.4.x supports Axum 0.7. Version 0.3.x will continue to provide support and fix bugs for Axum 0.6. @@ -32,7 +34,7 @@ _Axum_ ```toml [dependencies] firebase-auth = { version = "", features = ["axum"] } -axum = "0.7" +axum = "0.8" ``` # Examples diff --git a/examples/axum-basic/Cargo.toml b/examples/axum-basic/Cargo.toml index 620edd6..9931f39 100644 --- a/examples/axum-basic/Cargo.toml +++ b/examples/axum-basic/Cargo.toml @@ -6,7 +6,7 @@ publish = false [dependencies] firebase-auth = { path = "../../firebase-auth" } -axum = "0.7" +axum = "0.8" tokio = { version = "1.0", features = ["full"] } tower-http = { version = "0.5.0", features = ["trace"] } tracing = "0.1" diff --git a/examples/axum-custom-claims/Cargo.toml b/examples/axum-custom-claims/Cargo.toml index c5bc38a..50d609b 100644 --- a/examples/axum-custom-claims/Cargo.toml +++ b/examples/axum-custom-claims/Cargo.toml @@ -6,7 +6,7 @@ publish = false [dependencies] firebase-auth = { path = "../../firebase-auth" } -axum = "0.7" +axum = "0.8" tokio = { version = "1.0", features = ["full"] } tower-http = { version = "0.5.0", features = ["trace"] } tracing = "0.1" diff --git a/examples/axum-custom-claims/src/main.rs b/examples/axum-custom-claims/src/main.rs index 16936e4..e7048a7 100644 --- a/examples/axum-custom-claims/src/main.rs +++ b/examples/axum-custom-claims/src/main.rs @@ -1,5 +1,4 @@ use axum::{ - async_trait, extract::{FromRef, FromRequestParts}, http::{self, request::Parts, StatusCode}, response::{IntoResponse, Response}, @@ -46,7 +45,6 @@ fn get_bearer_token(header: &str) -> Option { } } -#[async_trait] impl FromRequestParts for FirebaseUser where FirebaseAuthState: FromRef, diff --git a/examples/axum-sqlite/Cargo.toml b/examples/axum-sqlite/Cargo.toml index c1918ad..5d15ae1 100644 --- a/examples/axum-sqlite/Cargo.toml +++ b/examples/axum-sqlite/Cargo.toml @@ -6,7 +6,7 @@ publish = false [dependencies] firebase-auth = { path = "../../firebase-auth" } -axum = "0.7" +axum = "0.8" axum-macros = "0.4" tokio = { version = "1.0", features = ["full"] } tower-http = { version = "0.5.0", features = ["trace"] } diff --git a/firebase-auth/Cargo.toml b/firebase-auth/Cargo.toml index ca35ca5..75376c3 100644 --- a/firebase-auth/Cargo.toml +++ b/firebase-auth/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "firebase-auth" -version = "0.4.3" +version = "0.5.0" authors = ["Chop Tr "] homepage = "https://github.com/trchopan/firebase-auth" repository = "https://github.com/trchopan/firebase-auth.git" @@ -24,7 +24,7 @@ axum = ["dep:axum"] [dependencies] actix-web = { version = "4", optional = true } actix-web-httpauth = { version = "0.8.0", optional = true } -axum = { version = "0.7", optional = true } +axum = { version = "0.8", optional = true } tokio = { version = "1.33.0", features = ["macros", "rt", "rt-multi-thread"] } futures = "0.3" tracing = "0.1" diff --git a/firebase-auth/src/axum_feature.rs b/firebase-auth/src/axum_feature.rs index 41527bf..eb43d2e 100644 --- a/firebase-auth/src/axum_feature.rs +++ b/firebase-auth/src/axum_feature.rs @@ -1,7 +1,6 @@ use std::sync::Arc; use axum::{ - async_trait, extract::{FromRef, FromRequestParts}, http::{self, request::Parts, StatusCode}, response::{IntoResponse, Response}, @@ -32,7 +31,6 @@ fn get_bearer_token(header: &str) -> Option { } } -#[async_trait] impl FromRequestParts for FirebaseUser where FirebaseAuthState: FromRef, diff --git a/firebase-auth/src/structs.rs b/firebase-auth/src/structs.rs index ac7d14c..991ebd2 100644 --- a/firebase-auth/src/structs.rs +++ b/firebase-auth/src/structs.rs @@ -3,6 +3,7 @@ use std::time::Duration; use serde::{Deserialize, Serialize}; use serde_json::{Map, Value}; +#[allow(dead_code)] #[derive(Debug)] pub struct JwkConfiguration { pub jwk_url: String, @@ -15,6 +16,7 @@ pub struct KeyResponse { pub keys: Vec, } +#[allow(dead_code)] #[derive(Clone, Debug, Deserialize)] pub struct JwkKey { pub e: String,