/// Apply Authorization header, if available.
///
/// If no access_token is set, no changes are made to the builder.
Apply Authorization header, if available.
If no access_token is set, no changes are made to the builder.
Apply Authorization header if available . If no access_token is set no changes are made to the builder .
async fn authenticate(&self, builder: request::Builder) -> Result<request::Builder> {
        if self.refresh_token.is_none() {
            return Ok(builder);
        }
        let access_token = self.access_token.lock().await;
        Ok(builder.header("Authorization", format!("Bearer {}", access_token)))
    }
async fn authenticate ( & self , builder : request :: Builder ) -> Result < request :: Builder > { if self . refresh_token . is_none ( ) { return Ok ( builder ) ; } let access_token = self . access_token . lock ( ) . await ; Ok ( builder . header ( " " , format ! ( " " access_token ) ) ) }
Apply Authorization header, if available.
Apply Authorization header if available .
&self
builder
request::Builder