mirror of
https://github.com/actix/actix-extras.git
synced 2025-02-13 15:12:20 +01:00
16 lines
368 B
Rust
16 lines
368 B
Rust
|
use headers::www_authenticate::Challenge;
|
||
|
|
||
|
use super::AuthenticationError;
|
||
|
|
||
|
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 {
|
||
|
fn from(config: T) -> Self {
|
||
|
AuthenticationError::new(config.into_inner())
|
||
|
}
|
||
|
}
|