File tree Expand file tree Collapse file tree 2 files changed +12
-15
lines changed
packages/connectivity/src/scp-cf Expand file tree Collapse file tree 2 files changed +12
-15
lines changed Original file line number Diff line number Diff line change @@ -184,20 +184,21 @@ async function xfS4hanaCloudBindingToDestination(
184184
185185async function iasBindingToDestination (
186186 service : Service ,
187- options ?: ServiceBindingTransformOptions & {
188- resource ?: string ;
187+ options : ServiceBindingTransformOptions & {
188+ targetURL : string ;
189+ resource : string ;
189190 appTenantId ?: string ;
190191 extraParams ?: Record < string , string > ;
191192 }
192193) : Promise < Destination > {
193194 const { access_token } = await getIasClientCredentialsToken ( service , {
194- resource : options ? .resource ,
195- appTenantId : options ? .appTenantId ,
196- extraParams : options ? .extraParams
195+ resource : options . resource ,
196+ appTenantId : options . appTenantId ,
197+ extraParams : options . extraParams
197198 } ) ;
198199 return buildClientCredentialsDestination (
199200 access_token ,
200- service . credentials . url ,
201+ options . targetURL ,
201202 service . name
202203 ) ;
203204}
Original file line number Diff line number Diff line change @@ -48,8 +48,8 @@ interface IasParameters {
4848 */
4949export async function getIasClientCredentialsToken (
5050 service : string | Service ,
51- options ? : {
52- resource ? : string ;
51+ options : {
52+ resource : string ;
5353 appTenantId ?: string ;
5454 extraParams ?: Record < string , string > ;
5555 }
@@ -81,13 +81,9 @@ export async function getIasClientCredentialsToken(
8181 client_id : clientid
8282 } ) ;
8383
84- if ( arg . resource ) {
85- const fullResource = `urn:sap:identity:application:provider:name:${ arg . resource } ` ;
86- params . append ( 'resource' , fullResource ) ;
87- logger . debug (
88- `Fetching IAS token with resource parameter: ${ fullResource } `
89- ) ;
90- }
84+ const fullResource = `urn:sap:identity:application:provider:name:${ arg . resource } ` ;
85+ params . append ( 'resource' , fullResource ) ;
86+ logger . debug ( `Fetching IAS token with resource parameter: ${ fullResource } ` ) ;
9187
9288 if ( arg . appTenantId ) {
9389 params . append ( 'app_tid' , arg . appTenantId ) ;
You can’t perform that action at this time.
0 commit comments