#[non_exhaustive]pub enum AuthorizationHeader {
OauthToken(Box<OAuthToken>),
OidcToken(Box<OidcToken>),
}Expand description
The mode for generating an Authorization header for HTTP requests.
If specified, all Authorization headers in the
HttpRequest.headers field will
be overridden.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
OauthToken(Box<OAuthToken>)
If specified, an
OAuth token
will be generated and attached as an Authorization header in the HTTP
request.
This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com.
OidcToken(Box<OidcToken>)
If specified, an
OIDC
token will be generated and attached as an Authorization header in the
HTTP request.
This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself.
Trait Implementations§
Source§impl Clone for AuthorizationHeader
impl Clone for AuthorizationHeader
Source§fn clone(&self) -> AuthorizationHeader
fn clone(&self) -> AuthorizationHeader
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AuthorizationHeader
impl Debug for AuthorizationHeader
Source§impl PartialEq for AuthorizationHeader
impl PartialEq for AuthorizationHeader
impl StructuralPartialEq for AuthorizationHeader
Auto Trait Implementations§
impl Freeze for AuthorizationHeader
impl RefUnwindSafe for AuthorizationHeader
impl Send for AuthorizationHeader
impl Sync for AuthorizationHeader
impl Unpin for AuthorizationHeader
impl UnwindSafe for AuthorizationHeader
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