pub struct RestSignatureProvider { /* private fields */ }Expand description
Adaptateur REST générique — les trois prestataires y délèguent (cf. docs
de module). kind distingue la traçabilité / config, pas le protocole.
Implementations§
Source§impl RestSignatureProvider
impl RestSignatureProvider
pub fn new( kind: SignatureProviderKind, base_url: String, hmac_secret: Vec<u8>, ) -> Self
Sourcepub fn with_retry_policy(self, retry_policy: RetryPolicy) -> Self
pub fn with_retry_policy(self, retry_policy: RetryPolicy) -> Self
Permet aux tests d’utiliser un délai de réessai quasi nul plutôt que d’attendre des centaines de millisecondes réelles.
Sourcepub fn with_http_timeout(self, timeout: Duration) -> Self
pub fn with_http_timeout(self, timeout: Duration) -> Self
Permet aux tests de déclencher un vrai Timeout (via un stub HTTP
qui répond après ce délai) sans attendre les 30s par défaut.
Trait Implementations§
Source§impl ElectronicSignatureProvider for RestSignatureProvider
impl ElectronicSignatureProvider for RestSignatureProvider
fn kind(&self) -> SignatureProviderKind
Source§fn request_signature<'life0, 'async_trait>(
&'life0 self,
request: SignatureRequest,
) -> Pin<Box<dyn Future<Output = Result<SignatureRequestAck, SignatureProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn request_signature<'life0, 'async_trait>(
&'life0 self,
request: SignatureRequest,
) -> Pin<Box<dyn Future<Output = Result<SignatureRequestAck, SignatureProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Envoie le document au prestataire. Le condensat est calculé et
renvoyé AVANT l’appel réseau (AC @security).
Source§fn fetch_signature<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
provider_reference: &'life1 str,
expected_document_hash: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<QualifiedSignature, SignatureProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fetch_signature<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
provider_reference: &'life1 str,
expected_document_hash: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<QualifiedSignature, SignatureProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Interroge le prestataire pour une référence donnée.
expected_document_hash est celui rendu par request_signature : le
résultat est rejeté (HashMismatch) si le prestataire ne confirme pas
le même condensat.Auto Trait Implementations§
impl !RefUnwindSafe for RestSignatureProvider
impl !UnwindSafe for RestSignatureProvider
impl Freeze for RestSignatureProvider
impl Send for RestSignatureProvider
impl Sync for RestSignatureProvider
impl Unpin for RestSignatureProvider
impl UnsafeUnpin for RestSignatureProvider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Fake for T
impl<T> Fake for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.