about summary refs log tree commit diff
path: root/ops/yandex-cloud-rs/src
diff options
context:
space:
mode:
Diffstat (limited to 'ops/yandex-cloud-rs/src')
-rw-r--r--ops/yandex-cloud-rs/src/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/ops/yandex-cloud-rs/src/lib.rs b/ops/yandex-cloud-rs/src/lib.rs
index 6b1425bc9e98..4693cc60ef31 100644
--- a/ops/yandex-cloud-rs/src/lib.rs
+++ b/ops/yandex-cloud-rs/src/lib.rs
@@ -80,8 +80,9 @@ impl<T: TokenProvider> Interceptor for AuthInterceptor<T> {
         &mut self,
         mut request: tonic::Request<()>,
     ) -> Result<tonic::Request<()>, tonic::Status> {
-        let token: MetadataValue<Ascii> =
-            self.token_provider.get_token().try_into().map_err(|_| {
+        let token: MetadataValue<Ascii> = format!("Bearer {}", self.token_provider.get_token())
+            .try_into()
+            .map_err(|_| {
                 tonic::Status::invalid_argument("authorization token contained invalid characters")
             })?;