fix(ops/yandex-cloud-rs): add Bearer
prefix to auth token
Change-Id: I27d23de0598e3ca926a85cba3022f2dfff25f6be Reviewed-on: https://cl.tvl.fyi/c/depot/+/8762 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
597d1a0aa2
commit
6f912f5ecf
1 changed files with 3 additions and 2 deletions
|
@ -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")
|
||||
})?;
|
||||
|
||||
|
|
Loading…
Reference in a new issue