mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-27 17:22:57 +01:00
Implement From<Basic>
for BasicAuth
(#327)
* implement `From<Basic>` for `BasicAuth` * update changelog --------- Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
parent
c029287801
commit
55ace79d64
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
- Implement `From<Basic>` for `BasicAuth`.
|
||||||
- Minimum supported Rust version (MSRV) is now 1.68.
|
- Minimum supported Rust version (MSRV) is now 1.68.
|
||||||
|
|
||||||
## 0.8.0
|
## 0.8.0
|
||||||
|
@ -89,6 +89,12 @@ impl BasicAuth {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<Basic> for BasicAuth {
|
||||||
|
fn from(basic: Basic) -> Self {
|
||||||
|
Self(basic)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl FromRequest for BasicAuth {
|
impl FromRequest for BasicAuth {
|
||||||
type Future = Ready<Result<Self, Self::Error>>;
|
type Future = Ready<Result<Self, Self::Error>>;
|
||||||
type Error = AuthenticationError<Challenge>;
|
type Error = AuthenticationError<Challenge>;
|
||||||
|
Loading…
Reference in New Issue
Block a user