mirror of
https://codeberg.org/pfzetto/axum-oidc
synced 2025-12-09 22:55:17 +01:00
fix: clippy warnings
This commit is contained in:
parent
f0d9126652
commit
05063a74f8
2 changed files with 9 additions and 13 deletions
|
|
@ -102,17 +102,13 @@ impl IntoResponse for ExtractorError {
|
||||||
impl IntoResponse for Error {
|
impl IntoResponse for Error {
|
||||||
fn into_response(self) -> axum_core::response::Response {
|
fn into_response(self) -> axum_core::response::Response {
|
||||||
dbg!(&self);
|
dbg!(&self);
|
||||||
match self {
|
(StatusCode::INTERNAL_SERVER_ERROR, "internal server error").into_response()
|
||||||
_ => (StatusCode::INTERNAL_SERVER_ERROR, "internal server error").into_response(),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl IntoResponse for MiddlewareError {
|
impl IntoResponse for MiddlewareError {
|
||||||
fn into_response(self) -> axum_core::response::Response {
|
fn into_response(self) -> axum_core::response::Response {
|
||||||
dbg!(&self);
|
dbg!(&self);
|
||||||
match self {
|
(StatusCode::INTERNAL_SERVER_ERROR, "internal server error").into_response()
|
||||||
_ => (StatusCode::INTERNAL_SERVER_ERROR, "internal server error").into_response(),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -495,18 +495,18 @@ async fn try_refresh_token<AC: AdditionalClaims>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// `openidconnect::reqwest::async_http_client` that uses a custom `reqwest::client`
|
type AsyncHttpClient<'a> = Pin<
|
||||||
fn async_http_client<'a>(
|
|
||||||
client: &'a reqwest::Client,
|
|
||||||
) -> impl FnOnce(
|
|
||||||
HttpRequest,
|
|
||||||
) -> Pin<
|
|
||||||
Box<
|
Box<
|
||||||
dyn Future<Output = Result<HttpResponse, openidconnect::reqwest::Error<reqwest::Error>>>
|
dyn Future<Output = Result<HttpResponse, openidconnect::reqwest::Error<reqwest::Error>>>
|
||||||
+ Send
|
+ Send
|
||||||
+ 'a,
|
+ 'a,
|
||||||
>,
|
>,
|
||||||
> {
|
>;
|
||||||
|
|
||||||
|
/// `openidconnect::reqwest::async_http_client` that uses a custom `reqwest::client`
|
||||||
|
fn async_http_client<'a>(
|
||||||
|
client: &'a reqwest::Client,
|
||||||
|
) -> impl FnOnce(HttpRequest) -> AsyncHttpClient<'a> {
|
||||||
move |request: HttpRequest| {
|
move |request: HttpRequest| {
|
||||||
Box::pin(async move {
|
Box::pin(async move {
|
||||||
let mut request_builder = client
|
let mut request_builder = client
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue