1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-02-13 15:12:20 +01:00

18 lines
379 B
Rust
Raw Normal View History

2018-05-30 16:43:39 +03:00
use super::AuthenticationError;
use crate::headers::www_authenticate::Challenge;
2018-05-30 16:43:39 +03:00
pub trait ExtractorConfig {
type Inner: Challenge;
fn into_inner(self) -> Self::Inner;
}
impl<T> From<T> for AuthenticationError<<T as ExtractorConfig>::Inner>
where
T: ExtractorConfig,
{
2018-05-30 16:43:39 +03:00
fn from(config: T) -> Self {
AuthenticationError::new(config.into_inner())
}
}