#[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 are
overridden.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
OauthToken(Box<OAuthToken>)
If specified, an
OAuth token
is generated and attached as the Authorization header in the HTTP
request.
This type of authorization should generally be used only when calling Google APIs hosted on *.googleapis.com. Note that both the service account email and the scope MUST be specified when using the queue-level authorization override.
OidcToken(Box<OidcToken>)
If specified, an
OIDC
token is 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. Note that both the service account email and the audience MUST be specified when using the queue-level authorization override.
Trait Implementations§
Source§impl Clone for AuthorizationHeader
impl Clone for AuthorizationHeader
Source§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 UnsafeUnpin 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
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,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request