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
13 changes: 7 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mauth-client"
version = "0.7.0"
version = "0.7.1"
authors = ["Mason Gup <mgup@mdsol.com>"]
edition = "2024"
rust-version = "1.88"
Expand All @@ -14,24 +14,24 @@ keywords = ["security", "authentication", "web"]
categories = ["authentication", "web-programming"]

[dependencies]
reqwest = { version = "0.12", features = ["json"] }
reqwest-middleware = "0.4"
reqwest-tracing = { version = "0.5.8", optional = true }
reqwest = { version = "0.13", features = ["json"] }
reqwest-middleware = "0.5"
reqwest-tracing = { version = "0.7.0", optional = true }
async-trait = ">= 0.1.83"
url = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yml = ">= 0.0.10"
uuid = { version = "1", features = ["v4"] }
dirs = "5"
dirs = "6"
chrono = "0.4"
tokio = { version = "1", features = ["fs"] }
tower = { version = ">= 0.4", optional = true }
axum = { version = ">= 0.8", optional = true }
futures-core = { version = "0.3", optional = true }
http = "1"
bytes = { version = "1", optional = true }
thiserror = "1"
thiserror = "2"
mauth-core = "0.6"
tracing = { version = "0.1", optional = true }

Expand All @@ -45,3 +45,4 @@ tracing-otel-27 = ["reqwest-tracing/opentelemetry_0_27"]
tracing-otel-28 = ["reqwest-tracing/opentelemetry_0_28"]
tracing-otel-29 = ["reqwest-tracing/opentelemetry_0_29"]
tracing-otel-30 = ["reqwest-tracing/opentelemetry_0_30"]
tracing-otel-31 = ["reqwest-tracing/opentelemetry_0_31"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ implements Axum's `OptionalFromRequestParts`, so you can more easily retrieve it

### OpenTelemetry Integration

There are also optional features `tracing-otel-26` through `tracing-otel-30`
There are also optional features `tracing-otel-26` through `tracing-otel-31`
that pair with the `axum-service` feature to ensure that any outgoing requests for credentials
that take place in the context of an incoming web request also include the proper OpenTelemetry
span information in any requests to MAudit services. Note that it is critical to use the same
Expand Down
9 changes: 5 additions & 4 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ impl MAuthInfo {
.parse()?;

let mut pk_data = section.private_key_data.clone();
if pk_data.is_none() && section.private_key_file.is_some() {
pk_data = Some(std::fs::read_to_string(
section.private_key_file.as_ref().unwrap(),
)?);
if pk_data.is_none()
&& let Some(pk_file_path) = section.private_key_file.as_ref()
{
pk_data = Some(std::fs::read_to_string(pk_file_path)?);
}
if pk_data.is_none() {
return Err(ConfigReadError::NoPrivateKey);
Expand All @@ -68,6 +68,7 @@ impl MAuthInfo {
feature = "tracing-otel-28",
feature = "tracing-otel-29",
feature = "tracing-otel-30",
feature = "tracing-otel-31",
))]
let builder = builder.with(reqwest_tracing::TracingMiddleware::default());
builder.build()
Expand Down