We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f8802b7 + 4e0e83b commit 187c1fdCopy full SHA for 187c1fd
src/client/auth.rs
@@ -4,7 +4,7 @@ use http::{HeaderValue, header::AUTHORIZATION};
4
use std::{
5
iter::once,
6
task::{Context, Poll},
7
- time::{Duration, SystemTime, UNIX_EPOCH},
+ time::{SystemTime, UNIX_EPOCH},
8
};
9
use tower::{Layer, Service};
10
use tower_http::sensitive_headers::{SetSensitiveRequestHeaders, SetSensitiveRequestHeadersLayer};
@@ -75,9 +75,10 @@ pub fn secret_to_bearer_header(secret: &JwtSecret) -> HeaderValue {
75
"Bearer {}",
76
secret
77
.encode(&Claims {
78
- iat: (SystemTime::now().duration_since(UNIX_EPOCH).unwrap()
79
- + Duration::from_secs(60))
80
- .as_secs(),
+ iat: SystemTime::now()
+ .duration_since(UNIX_EPOCH)
+ .unwrap()
81
+ .as_secs(),
82
exp: None,
83
})
84
.unwrap()
0 commit comments