@@ -49,31 +49,28 @@ impl ConfigDefaultCredentials {
4949 } )
5050 }
5151
52- #[ instrument( level = Level :: DEBUG , skip( cred, client) ) ]
52+ #[ instrument( level = Level :: DEBUG , skip( cred, client) , fields ( provider = "ConfigDefaultCredentials" ) ) ]
5353 async fn fetch_token (
5454 cred : & AuthorizedUserRefreshToken ,
5555 client : & HttpClient ,
5656 ) -> Result < Arc < Token > , Error > {
5757 client
58- . token (
59- & || {
60- Request :: builder ( )
61- . method ( Method :: POST )
62- . uri ( DEFAULT_TOKEN_GCP_URI )
63- . header ( CONTENT_TYPE , "application/json" )
64- . body ( Full :: from ( Bytes :: from (
65- serde_json:: to_vec ( & RefreshRequest {
66- client_id : & cred. client_id ,
67- client_secret : & cred. client_secret ,
68- grant_type : "refresh_token" ,
69- refresh_token : & cred. refresh_token ,
70- } )
71- . unwrap ( ) ,
72- ) ) )
73- . unwrap ( )
74- } ,
75- "ConfigDefaultCredentials" ,
76- )
58+ . token ( & || {
59+ Request :: builder ( )
60+ . method ( Method :: POST )
61+ . uri ( DEFAULT_TOKEN_GCP_URI )
62+ . header ( CONTENT_TYPE , "application/json" )
63+ . body ( Full :: from ( Bytes :: from (
64+ serde_json:: to_vec ( & RefreshRequest {
65+ client_id : & cred. client_id ,
66+ client_secret : & cred. client_secret ,
67+ grant_type : "refresh_token" ,
68+ refresh_token : & cred. refresh_token ,
69+ } )
70+ . unwrap ( ) ,
71+ ) ) )
72+ . unwrap ( )
73+ } )
7774 . await
7875 }
7976}
0 commit comments