feat(auth): Add support for partial-auth, by facilitating injection of authentication parameters in headers (#4802)

Co-authored-by: Jagan <jaganelavarasan@gmail.com>
This commit is contained in:
Nishant Joshi
2024-08-01 14:57:39 +05:30
committed by GitHub
parent 5e1eb4af86
commit 1d4c87a9e3
31 changed files with 523 additions and 103 deletions

View File

@ -4,7 +4,7 @@
use std::{fmt, marker::PhantomData};
use crate::{strategy::Strategy, PeekInterface};
use crate::{strategy::Strategy, PeekInterface, StrongSecret};
///
/// Secret thing.
@ -81,6 +81,14 @@ where
{
f(self.inner_secret).into()
}
/// Convert to [`StrongSecret`]
pub fn into_strong(self) -> StrongSecret<SecretValue, MaskingStrategy>
where
SecretValue: zeroize::DefaultIsZeroes,
{
StrongSecret::new(self.inner_secret)
}
}
impl<SecretValue, MaskingStrategy> PeekInterface<SecretValue>