mirror of
https://github.com/TECHNOFAB11/jwt-authorizer.git
synced 2025-12-11 23:50:07 +01:00
fix: better jwks refresh errors
reporting error response status (ref #59, #55)
This commit is contained in:
parent
29ec07bd87
commit
10a926c25b
1 changed files with 5 additions and 0 deletions
|
|
@ -161,6 +161,11 @@ impl KeyStore {
|
||||||
self.fail_time = Some(Instant::now());
|
self.fail_time = Some(Instant::now());
|
||||||
AuthError::JwksRefreshError(e.to_string())
|
AuthError::JwksRefreshError(e.to_string())
|
||||||
})?
|
})?
|
||||||
|
.error_for_status()
|
||||||
|
.map_err(|e| {
|
||||||
|
self.fail_time = Some(Instant::now());
|
||||||
|
AuthError::JwksRefreshError(e.to_string())
|
||||||
|
})?
|
||||||
.json::<JwkSet>()
|
.json::<JwkSet>()
|
||||||
.await
|
.await
|
||||||
.map(|jwks| {
|
.map(|jwks| {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue