pub enum UniversignSignatureProvider {
Http(RestSignatureProvider),
Simulated {
hmac_secret: Vec<u8>,
},
}Variants§
Implementations§
Source§impl UniversignSignatureProvider
impl UniversignSignatureProvider
pub fn new(base_url: String, hmac_secret: Vec<u8>) -> Self
Sourcepub fn simulated(hmac_secret: Vec<u8>) -> Self
pub fn simulated(hmac_secret: Vec<u8>) -> Self
Prestataire simulé utilisable en développement (DoD Story 4.4).
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 (mode Http).
Trait Implementations§
Source§impl ElectronicSignatureProvider for UniversignSignatureProvider
impl ElectronicSignatureProvider for UniversignSignatureProvider
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 UniversignSignatureProvider
impl !UnwindSafe for UniversignSignatureProvider
impl Freeze for UniversignSignatureProvider
impl Send for UniversignSignatureProvider
impl Sync for UniversignSignatureProvider
impl Unpin for UniversignSignatureProvider
impl UnsafeUnpin for UniversignSignatureProvider
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.