pub struct ServiceAccountImpersonationCredentialProvider { /* private fields */ }Expand description
A Google-specific provider that loads a source credential and applies a fixed service-account impersonation flow.
This wrapper is useful when the impersonated result must participate in a
reqsign_core::Signer or another provider-oriented composition. It does
not cache the source or result; the consuming signer owns output caching.
Implementations§
Source§impl ServiceAccountImpersonationCredentialProvider
impl ServiceAccountImpersonationCredentialProvider
Sourcepub fn new(
source: impl ProvideCredential<Credential = Credential>,
grant: ServiceAccountImpersonationGrant,
) -> Self
pub fn new( source: impl ProvideCredential<Credential = Credential>, grant: ServiceAccountImpersonationGrant, ) -> Self
Create a provider from a source provider and bound impersonation grant.
Sourcepub fn with_lifetime(self, lifetime: Duration) -> Self
pub fn with_lifetime(self, lifetime: Duration) -> Self
Request a fixed lifetime for each impersonated credential.
Sourcepub fn with_grant(self, grant: ServiceAccountImpersonationGrant) -> Self
pub fn with_grant(self, grant: ServiceAccountImpersonationGrant) -> Self
Replace the bound target, scopes, and delegates.
Trait Implementations§
Source§impl ProvideCredential for ServiceAccountImpersonationCredentialProvider
impl ProvideCredential for ServiceAccountImpersonationCredentialProvider
Source§type Credential = Credential
type Credential = Credential
Credential returned by this loader. Read more
Source§async fn provide_credential(
&self,
ctx: &Context,
) -> Result<Option<Self::Credential>>
async fn provide_credential( &self, ctx: &Context, ) -> Result<Option<Self::Credential>>
Load signing credential from current env.
Auto Trait Implementations§
impl !RefUnwindSafe for ServiceAccountImpersonationCredentialProvider
impl !UnwindSafe for ServiceAccountImpersonationCredentialProvider
impl Freeze for ServiceAccountImpersonationCredentialProvider
impl Send for ServiceAccountImpersonationCredentialProvider
impl Sync for ServiceAccountImpersonationCredentialProvider
impl Unpin for ServiceAccountImpersonationCredentialProvider
impl UnsafeUnpin for ServiceAccountImpersonationCredentialProvider
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> MaybeSend for Twhere
T: Send,
Source§impl<T> ProvideCredentialDyn for Twhere
T: ProvideCredential + ?Sized,
impl<T> ProvideCredentialDyn for Twhere
T: ProvideCredential + ?Sized,
Source§type Credential = <T as ProvideCredential>::Credential
type Credential = <T as ProvideCredential>::Credential
Credential returned by this loader.
Source§fn provide_credential_dyn<'a>(
&'a self,
ctx: &'a Context,
) -> Pin<Box<dyn Future<Output = Result<Option<<T as ProvideCredentialDyn>::Credential>, Error>> + Send + 'a>>
fn provide_credential_dyn<'a>( &'a self, ctx: &'a Context, ) -> Pin<Box<dyn Future<Output = Result<Option<<T as ProvideCredentialDyn>::Credential>, Error>> + Send + 'a>>
Dyn version of
ProvideCredential::provide_credential.