Skip to content

Commit f24380e

Browse files
committed
Switch to tonic 0.13, use Infallible for errors in tests
1 parent e956774 commit f24380e

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

jwt-authorizer/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ tower-http = { version = "0.6", features = ["trace", "auth"] }
2727
tower-layer = "0.3"
2828
tower-service = "0.3"
2929
tracing = "0.1"
30-
tonic = { git = "https://github.com/hyperium/tonic", optional = true }
30+
tonic = { version = "0.13", optional = true }
3131
time = { version = "0.3", optional = true }
3232
http-body-util = "0.1"
3333

jwt-authorizer/src/jwks/key_store_manager.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ pub struct Refresh {
3030
/// After the refresh interval the store will/can be refreshed.
3131
///
3232
/// - RefreshStrategy::KeyNotFound - refresh will be performed only if a kid is not found in the store
33-
/// (if no kid is in the token header the alg is looked up)
33+
/// (if no kid is in the token header the alg is looked up)
3434
/// - RefreshStrategy::Interval - refresh will be performed each time the refresh interval has elapsed
35-
/// (before checking a new token -> lazy behaviour)
35+
/// (before checking a new token -> lazy behaviour)
3636
pub refresh_interval: Duration,
3737
/// don't refresh before (after an error or jwks is unawailable)
3838
/// (we let a little bit of time to the jwks endpoint to recover)

jwt-authorizer/tests/tonic.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,11 @@ async fn make_protected_request<S>(
102102
message: &str,
103103
) -> Result<tonic::Response<HelloMessage>, Status>
104104
where
105-
S: Service<http::Request<tonic::body::Body>, Response = http::Response<tonic::body::Body>, Error = tower::BoxError>
106-
+ Send
105+
S: Service<
106+
http::Request<tonic::body::Body>,
107+
Response = http::Response<tonic::body::Body>,
108+
Error = std::convert::Infallible,
109+
> + Send
107110
+ Clone
108111
+ 'static,
109112
S::Future: Send,

0 commit comments

Comments
 (0)