@@ -27,6 +27,8 @@ pin-project-lite = "0.2"
2727pastey = { version = " 0.2.0" , optional = true }
2828# oauth2 support
2929oauth2 = { version = " 5.0" , optional = true , default-features = false }
30+ # JWT signing for client credentials (private_key_jwt)
31+ jsonwebtoken = { version = " 9" , optional = true }
3032
3133# for auto generate schema
3234schemars = { version = " 1.0" , optional = true , features = [" chrono04" ] }
@@ -130,12 +132,14 @@ transport-streamable-http-server-session = [
130132# transport-ws = ["transport-io", "dep:tokio-tungstenite"]
131133tower = [" dep:tower-service" ]
132134auth = [" dep:oauth2" , " __reqwest" , " dep:url" ]
135+ auth-client-credentials-jwt = [" auth" , " dep:jsonwebtoken" , " uuid" ]
133136schemars = [" dep:schemars" ]
134137
135138[dev-dependencies ]
136139tokio = { version = " 1" , features = [" full" ] }
137140schemars = { version = " 1.1.0" , features = [" chrono04" ] }
138141axum = { version = " 0.8" , default-features = false , features = [" http1" , " tokio" ] }
142+ url = " 2.4"
139143anyhow = " 1.0"
140144tracing-subscriber = { version = " 0.3" , features = [
141145 " env-filter" ,
@@ -251,3 +255,8 @@ path = "tests/test_custom_headers.rs"
251255name = " test_sse_concurrent_streams"
252256required-features = [" server" , " client" , " transport-streamable-http-server" , " transport-streamable-http-client" , " reqwest" ]
253257path = " tests/test_sse_concurrent_streams.rs"
258+
259+ [[test ]]
260+ name = " test_client_credentials"
261+ required-features = [" auth" ]
262+ path = " tests/test_client_credentials.rs"
0 commit comments