pub struct GoogleIdentity { /* private fields */ }Expand description
A Google Cloud workload uses its attached service account; there is no per-instance secret. The metadata endpoint is fixed, never supplied by an untrusted URL or header.
Implementations§
Source§impl GoogleIdentity
impl GoogleIdentity
Sourcepub fn new(audience: impl Into<String>) -> Result<Arc<Self>, StoreError>
pub fn new(audience: impl Into<String>) -> Result<Arc<Self>, StoreError>
A provider of Google-signed identity tokens for audience, fetched
from the fixed metadata endpoint and cached for 60 seconds. The
server verifies expiry, issuer, audience and subject on every call.
§Errors
StoreError when audience is empty or the metadata client cannot
be built.
Trait Implementations§
Source§impl BearerProvider for GoogleIdentity
impl BearerProvider for GoogleIdentity
Source§fn token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BearerToken, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BearerToken, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The credential to send on the next control-plane call. Called once
per request, inside that request’s deadline. Read more
Auto Trait Implementations§
impl !Freeze for GoogleIdentity
impl !RefUnwindSafe for GoogleIdentity
impl !UnwindSafe for GoogleIdentity
impl Send for GoogleIdentity
impl Sync for GoogleIdentity
impl Unpin for GoogleIdentity
impl UnsafeUnpin for GoogleIdentity
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