pub enum AuthorizationHeader {
OauthToken(OAuthToken),
OidcToken(OidcToken),
}
Expand description
The mode for generating an Authorization
header for HTTP requests.
If specified, all Authorization
headers in the
[HttpTarget.headers][google.cloud.scheduler.v1beta1.HttpTarget.headers]
field will be overridden.
Variants§
OauthToken(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(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.
Implementations§
source§impl AuthorizationHeader
impl AuthorizationHeader
sourcepub fn merge(
field: &mut Option<AuthorizationHeader>,
tag: u32,
wire_type: WireType,
buf: &mut impl Buf,
ctx: DecodeContext,
) -> Result<(), DecodeError>
pub fn merge( field: &mut Option<AuthorizationHeader>, tag: u32, wire_type: WireType, buf: &mut impl Buf, ctx: DecodeContext, ) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into self.
sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Trait Implementations§
source§impl Clone for AuthorizationHeader
impl Clone for AuthorizationHeader
source§fn clone(&self) -> AuthorizationHeader
fn clone(&self) -> AuthorizationHeader
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AuthorizationHeader
impl Debug for AuthorizationHeader
source§impl PartialEq for AuthorizationHeader
impl PartialEq for AuthorizationHeader
source§fn eq(&self, other: &AuthorizationHeader) -> bool
fn eq(&self, other: &AuthorizationHeader) -> bool
self
and other
values to be equal, and is used
by ==
.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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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