@@ -222,6 +222,16 @@ class OidcUtils {
222222 core . exportVariable ( 'JFROG_CLI_USAGE_CONFIG_OIDC' , 'TRUE' ) ;
223223 core . exportVariable ( 'JFROG_CLI_USAGE_OIDC_USED' , 'TRUE' ) ;
224224 }
225+ /**
226+ * Constructs the payload for the OIDC token exchange request.
227+ * NOTE: This structure is intended for legacy CLI versions and matches the access API format.
228+ * The payload includes a context object and some duplicated parameters for backward compatibility.
229+ * Future updates will move all additional parameters into the context object.
230+ * @param jwt
231+ * @param providerName
232+ * @param applicationKey
233+ * @private
234+ */
225235 static buildOidcTokenExchangePayload ( jwt , providerName , applicationKey ) {
226236 var _a , _b , _c , _d , _e , _f , _g , _h ;
227237 return {
@@ -230,26 +240,24 @@ class OidcUtils {
230240 subject_token : jwt ,
231241 provider_name : providerName ,
232242 project_key : ( _a = process . env . JF_PROJECT ) !== null && _a !== void 0 ? _a : '' ,
243+ // gh_* params are used for usage tracking
233244 gh_job_id : ( _b = process . env . GITHUB_JOB ) !== null && _b !== void 0 ? _b : '' ,
234245 gh_run_id : ( _c = process . env . GITHUB_RUN_ID ) !== null && _c !== void 0 ? _c : '' ,
235246 gh_repo : ( _d = process . env . GITHUB_REPOSITORY ) !== null && _d !== void 0 ? _d : '' ,
236247 gh_revision : ( _e = process . env . GITHUB_SHA ) !== null && _e !== void 0 ? _e : '' ,
237248 gh_branch : ( _f = process . env . GITHUB_REF_NAME ) !== null && _f !== void 0 ? _f : '' ,
238249 application_key : applicationKey ,
250+ // This object is planned to be expanded as needed
251+ // even though currently it contains some duplicated parameters
239252 context : {
240253 vcs_commit : {
241- vcs_url : this . buildVcsUrl ( ) ,
254+ vcs_url : utils_1 . Utils . buildVcsUrl ( ) ,
242255 branch : ( _g = process . env . GITHUB_REF_NAME ) !== null && _g !== void 0 ? _g : '' ,
243256 revision : ( _h = process . env . GITHUB_SHA ) !== null && _h !== void 0 ? _h : '' ,
244257 } ,
245258 } ,
246259 } ;
247260 }
248- static buildVcsUrl ( ) {
249- const serverUrl = process . env . GITHUB_SERVER_URL ;
250- const repo = process . env . GITHUB_REPOSITORY ;
251- return serverUrl && repo ? `${ serverUrl } /${ repo } ` : '' ;
252- }
253261 /**
254262 * Retrieves the application key from .jfrog/config file.
255263 *
0 commit comments