#[cfg(feature = "grpc")]
pub mod grpc;
pub(crate) type Auth = yup_oauth2::authenticator::DefaultAuthenticator;
#[allow(unused)] pub(crate) fn add_auth_token<Token, RequestBody>(
request: &mut http::Request<RequestBody>,
token: Token,
) -> Result<(), http::header::InvalidHeaderValue>
where
Token: AsRef<str>,
{
let header = format!("Bearer {}", token.as_ref());
let auth_header_value = http::header::HeaderValue::from_str(&header)?;
request
.headers_mut()
.insert(http::header::AUTHORIZATION, auth_header_value);
Ok(())
}