Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

## Notice

Version 0.5.x supports Axum 0.8.

Version 0.4.x supports Axum 0.7.
Comment on lines +16 to 18
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure the versioning policy but seems increment minor versoin is the current way for this change


Version 0.3.x will continue to provide support and fix bugs for Axum 0.6.
Expand All @@ -32,7 +34,7 @@ _Axum_
```toml
[dependencies]
firebase-auth = { version = "<version>", features = ["axum"] }
axum = "0.7"
axum = "0.8"
```

# Examples
Expand Down
2 changes: 1 addition & 1 deletion examples/axum-basic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion examples/axum-custom-claims/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 0 additions & 2 deletions examples/axum-custom-claims/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use axum::{
async_trait,
extract::{FromRef, FromRequestParts},
http::{self, request::Parts, StatusCode},
response::{IntoResponse, Response},
Expand Down Expand Up @@ -46,7 +45,6 @@ fn get_bearer_token(header: &str) -> Option<String> {
}
}

#[async_trait]
impl<S> FromRequestParts<S> for FirebaseUser
where
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the release note, we don't need this any more
https://tokio.rs/blog/2025-01-01-announcing-axum-0-8-0#async_trait-removal

FirebaseAuthState: FromRef<S>,
Expand Down
2 changes: 1 addition & 1 deletion examples/axum-sqlite/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
4 changes: 2 additions & 2 deletions firebase-auth/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "firebase-auth"
version = "0.4.3"
version = "0.5.0"
authors = ["Chop Tr <m@chop.dev>"]
homepage = "https://github.com/trchopan/firebase-auth"
repository = "https://github.com/trchopan/firebase-auth.git"
Expand All @@ -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"
Expand Down
2 changes: 0 additions & 2 deletions firebase-auth/src/axum_feature.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::sync::Arc;

use axum::{
async_trait,
extract::{FromRef, FromRequestParts},
http::{self, request::Parts, StatusCode},
response::{IntoResponse, Response},
Expand Down Expand Up @@ -32,7 +31,6 @@ fn get_bearer_token(header: &str) -> Option<String> {
}
}

#[async_trait]
impl<S> FromRequestParts<S> for FirebaseUser
where
FirebaseAuthState: FromRef<S>,
Expand Down
2 changes: 2 additions & 0 deletions firebase-auth/src/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -15,6 +16,7 @@ pub struct KeyResponse {
pub keys: Vec<JwkKey>,
}

#[allow(dead_code)]
#[derive(Clone, Debug, Deserialize)]
pub struct JwkKey {
pub e: String,
Expand Down