mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-26 18:37:41 +02:00
fmt with new width
This commit is contained in:
@ -108,10 +108,7 @@ impl FromRequest for BasicAuth {
|
||||
type Config = Config;
|
||||
type Error = AuthenticationError<Challenge>;
|
||||
|
||||
fn from_request(
|
||||
req: &HttpRequest,
|
||||
_: &mut Payload,
|
||||
) -> <Self as FromRequest>::Future {
|
||||
fn from_request(req: &HttpRequest, _: &mut Payload) -> <Self as FromRequest>::Future {
|
||||
ready(
|
||||
Authorization::<Basic>::parse(req)
|
||||
.map(|auth| BasicAuth(auth.into_scheme()))
|
||||
|
@ -107,10 +107,7 @@ impl FromRequest for BearerAuth {
|
||||
type Future = Ready<Result<Self, Self::Error>>;
|
||||
type Error = AuthenticationError<bearer::Bearer>;
|
||||
|
||||
fn from_request(
|
||||
req: &HttpRequest,
|
||||
_payload: &mut Payload,
|
||||
) -> <Self as FromRequest>::Future {
|
||||
fn from_request(req: &HttpRequest, _payload: &mut Payload) -> <Self as FromRequest>::Future {
|
||||
ready(
|
||||
authorization::Authorization::<authorization::Bearer>::parse(req)
|
||||
.map(|auth| BearerAuth(auth.into_scheme()))
|
||||
|
@ -1,9 +1,7 @@
|
||||
use std::fmt;
|
||||
|
||||
use actix_web::error::ParseError;
|
||||
use actix_web::http::header::{
|
||||
Header, HeaderName, HeaderValue, IntoHeaderValue, AUTHORIZATION,
|
||||
};
|
||||
use actix_web::http::header::{Header, HeaderName, HeaderValue, IntoHeaderValue, AUTHORIZATION};
|
||||
use actix_web::HttpMessage;
|
||||
|
||||
use crate::headers::authorization::scheme::Scheme;
|
||||
|
@ -1,7 +1,5 @@
|
||||
use actix_web::error::ParseError;
|
||||
use actix_web::http::header::{
|
||||
Header, HeaderName, HeaderValue, IntoHeaderValue, WWW_AUTHENTICATE,
|
||||
};
|
||||
use actix_web::http::header::{Header, HeaderName, HeaderValue, IntoHeaderValue, WWW_AUTHENTICATE};
|
||||
use actix_web::HttpMessage;
|
||||
|
||||
use super::Challenge;
|
||||
|
@ -1,8 +1,7 @@
|
||||
//! HTTP Authentication middleware.
|
||||
|
||||
use std::{
|
||||
error::Error as StdError, future::Future, marker::PhantomData, pin::Pin, rc::Rc,
|
||||
sync::Arc,
|
||||
error::Error as StdError, future::Future, marker::PhantomData, pin::Pin, rc::Rc, sync::Arc,
|
||||
};
|
||||
|
||||
use actix_web::{
|
||||
|
Reference in New Issue
Block a user