mirror of
https://git.asonix.dog/asonix/http-signature-normalization.git
synced 2024-12-22 03:06:32 +00:00
Reexport DeprecatedAlgorithm
This commit is contained in:
parent
8697413adb
commit
c5065542c8
2 changed files with 6 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
use actix_web::{http::StatusCode, web, App, HttpRequest, HttpResponse, HttpServer, ResponseError};
|
||||
use http_signature_normalization_actix_extractor::{
|
||||
Algorithm, Config, ConfigGenerator, Signed, VerifyKey,
|
||||
Algorithm, Config, ConfigGenerator, DeprecatedAlgorithm, Signed, VerifyKey,
|
||||
};
|
||||
use sha2::Sha256;
|
||||
|
||||
|
@ -54,7 +54,7 @@ impl VerifyKey for Key {
|
|||
algorithm: Option<&Algorithm>,
|
||||
) -> Result<Self, Self::Error> {
|
||||
match algorithm {
|
||||
Some(Algorithm::Hs2019) => (),
|
||||
Some(Algorithm::Hs2019 | Algorithm::Deprecated(DeprecatedAlgorithm::RsaSha256)) => (),
|
||||
_ => return Err(MyError::Algorithm),
|
||||
};
|
||||
|
||||
|
|
|
@ -3,7 +3,10 @@
|
|||
//! Experimental Extractor for request signatures
|
||||
|
||||
pub use actix_web_lab::extract::RequestSignature;
|
||||
pub use http_signature_normalization::{verify::Algorithm, Config};
|
||||
pub use http_signature_normalization::{
|
||||
verify::{Algorithm, DeprecatedAlgorithm},
|
||||
Config,
|
||||
};
|
||||
|
||||
pub type Signed<Extractor, Config, Digest, VerifyKey> =
|
||||
RequestSignature<Extractor, SignatureScheme<Config, Digest, VerifyKey>>;
|
||||
|
|
Loading…
Reference in a new issue