Reexport DeprecatedAlgorithm

This commit is contained in:
asonix 2022-11-28 18:16:35 -06:00
parent 8697413adb
commit c5065542c8
2 changed files with 6 additions and 3 deletions

View file

@ -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),
};

View file

@ -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>>;