pub struct ExternalAccountCredentialProvider { /* private fields */ }Expand description
Exchanges an external subject token for a Google access token.
Implementations§
Source§impl ExternalAccountCredentialProvider
impl ExternalAccountCredentialProvider
Sourcepub fn from_subject_token(
config: ExternalAccountConfig,
subject_token: impl Into<String>,
) -> Self
pub fn from_subject_token( config: ExternalAccountConfig, subject_token: impl Into<String>, ) -> Self
Create a provider for one caller-bound subject token.
Sourcepub fn from_subject_token_and_expiration(
config: ExternalAccountConfig,
subject_token: impl Into<String>,
expires_at: Timestamp,
) -> Self
pub fn from_subject_token_and_expiration( config: ExternalAccountConfig, subject_token: impl Into<String>, expires_at: Timestamp, ) -> Self
Create a provider for a caller-bound subject token with absolute expiration.
Sourcepub fn with_scope(self, scope: impl Into<String>) -> Self
pub fn with_scope(self, scope: impl Into<String>) -> Self
Set the OAuth2 scope.
Trait Implementations§
Source§impl ProvideCredential for ExternalAccountCredentialProvider
impl ProvideCredential for ExternalAccountCredentialProvider
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 Freeze for ExternalAccountCredentialProvider
impl RefUnwindSafe for ExternalAccountCredentialProvider
impl Send for ExternalAccountCredentialProvider
impl Sync for ExternalAccountCredentialProvider
impl Unpin for ExternalAccountCredentialProvider
impl UnsafeUnpin for ExternalAccountCredentialProvider
impl UnwindSafe for ExternalAccountCredentialProvider
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.