#[non_exhaustive]pub struct OidcToken {
pub service_account_email: String,
pub audience: String,
/* private fields */
}Expand description
Contains information needed for generating an OpenID Connect token. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.service_account_email: StringService account email to be used for generating OIDC token. The service account must be within the same project as the queue. The caller must have iam.serviceAccounts.actAs permission for the service account.
audience: StringAudience to be used when generating OIDC token. If not specified, the URI specified in target will be used.
Implementations§
Source§impl OidcToken
impl OidcToken
pub fn new() -> Self
Sourcepub fn set_service_account_email<T: Into<String>>(self, v: T) -> Self
pub fn set_service_account_email<T: Into<String>>(self, v: T) -> Self
Sets the value of service_account_email.
Sourcepub fn set_audience<T: Into<String>>(self, v: T) -> Self
pub fn set_audience<T: Into<String>>(self, v: T) -> Self
Sets the value of audience.
Trait Implementations§
impl StructuralPartialEq for OidcToken
Auto Trait Implementations§
impl Freeze for OidcToken
impl RefUnwindSafe for OidcToken
impl Send for OidcToken
impl Sync for OidcToken
impl Unpin for OidcToken
impl UnwindSafe for OidcToken
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