File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,6 @@ use serde::{Deserialize, Serialize};
1414use std:: collections:: HashMap ;
1515use url:: Url ;
1616
17- const ARTIFACTORY_API_KEY_HEADER : & str = "X-JFrog-Art-Api" ;
18-
1917#[ derive( Debug ) ]
2018pub struct ArtifactoryProvider {
2119 paths : ForemanPaths ,
@@ -42,7 +40,7 @@ impl ToolProviderImpl for ArtifactoryProvider {
4240 . map_err ( |error| ForemanError :: ArtiAAError { error } ) ?;
4341
4442 if let Some ( credentials) = tokens. get_credentials ( host) {
45- builder = builder. header ( ARTIFACTORY_API_KEY_HEADER , credentials. token . to_string ( ) ) ;
43+ builder = builder. header ( AUTHORIZATION , format ! { "Bearer {}" , credentials. token. to_string( ) } ) ;
4644 }
4745 log:: debug!( "Downloading artifactory releases for {}" , repo) ;
4846 let response_body = builder
@@ -98,7 +96,7 @@ impl ToolProviderImpl for ArtifactoryProvider {
9896
9997 let tokens = artiaa_auth:: Tokens :: load ( & self . paths . artiaa_path ( ) ?) . unwrap ( ) ;
10098 if let Some ( credentials) = tokens. get_credentials ( & artifactory_url) {
101- builder = builder. header ( AUTHORIZATION , format ! ( "bearer {}" , credentials. token) ) ;
99+ builder = builder. header ( AUTHORIZATION , format ! ( "Bearer {}" , credentials. token) ) ;
102100 }
103101
104102 log:: debug!( "Downloading release asset {}" , url) ;
You can’t perform that action at this time.
0 commit comments