@@ -118,8 +118,8 @@ public function getPrivateKey(): string
118
118
public function getTokenUrl (): string
119
119
{
120
120
return str_replace (
121
- ['#{tokenUrl } ' ],
122
- [$ this ->getImsUrl (' imsUrl ' )],
121
+ ['#{imsUrl } ' ],
122
+ [$ this ->getImsUrl ()],
123
123
$ this ->scopeConfig ->getValue (self ::XML_PATH_TOKEN_URL )
124
124
);
125
125
}
@@ -130,9 +130,9 @@ public function getTokenUrl(): string
130
130
public function getAuthUrl (): string
131
131
{
132
132
return str_replace (
133
- ['#{authUrl } ' ,'#{client_id} ' , '#{redirect_uri} ' , '#{scope} ' , '#{locale} ' ],
133
+ ['#{imsUrl } ' ,'#{client_id} ' , '#{redirect_uri} ' , '#{scope} ' , '#{locale} ' ],
134
134
[
135
- $ this ->getImsUrl (' imsUrl ' ),
135
+ $ this ->getImsUrl (),
136
136
$ this ->getApiKey (),
137
137
$ this ->getCallBackUrl (),
138
138
$ this ->getScopes (),
@@ -170,8 +170,8 @@ public function getLogoutUrl(string $accessToken, string $redirectUrl = '') : st
170
170
$ redirectUrl = 'self ' ;
171
171
}
172
172
return str_replace (
173
- ['#{logoutUrl } ' , '#{access_token} ' , '#{redirect_uri} ' ],
174
- [$ this ->getImsUrl (' imsUrl ' ), $ accessToken , $ redirectUrl ],
173
+ ['#{imsUrl } ' , '#{access_token} ' , '#{redirect_uri} ' ],
174
+ [$ this ->getImsUrl (), $ accessToken , $ redirectUrl ],
175
175
$ this ->scopeConfig ->getValue (self ::XML_PATH_LOGOUT_URL ) ?? ''
176
176
);
177
177
}
@@ -196,8 +196,8 @@ public function getProfileImageUrl(): string
196
196
public function getProfileUrl (): string
197
197
{
198
198
return str_replace (
199
- ['#{client_id} ' ],
200
- [$ this ->getApiKey ()],
199
+ ['#{imsUrl} ' , ' #{ client_id} ' ],
200
+ [$ this ->getImsUrl (), $ this -> getApiKey ()],
201
201
$ this ->scopeConfig ->getValue (self ::XML_PATH_PROFILE_URL )
202
202
);
203
203
}
@@ -212,8 +212,8 @@ public function getProfileUrl(): string
212
212
public function getValidateTokenUrl (string $ code , string $ tokenType ): string
213
213
{
214
214
return str_replace (
215
- ['#{token} ' , '#{client_id} ' , '#{token_type} ' ],
216
- [$ code , $ this ->getApiKey (), $ tokenType ],
215
+ ['#{imsUrl} ' , ' #{ token} ' , '#{client_id} ' , '#{token_type} ' ],
216
+ [$ this -> getImsUrl (), $ code , $ this ->getApiKey (), $ tokenType ],
217
217
$ this ->scopeConfig ->getValue (self ::XML_PATH_VALIDATE_TOKEN_URL )
218
218
);
219
219
}
@@ -231,8 +231,9 @@ public function getAdminAdobeImsAuthUrl(?string $clientId): string
231
231
}
232
232
233
233
return str_replace (
234
- ['#{client_id} ' , '#{redirect_uri} ' , '#{scope} ' , '#{locale} ' ],
234
+ ['#{imsUrl} ' , ' #{ client_id} ' , '#{redirect_uri} ' , '#{scope} ' , '#{locale} ' ],
235
235
[
236
+ $ this ->getImsUrl (),
236
237
$ clientId ,
237
238
$ this ->getAdminAdobeImsCallBackUrl (),
238
239
$ this ->getAdminScopes (),
@@ -250,8 +251,9 @@ public function getAdminAdobeImsAuthUrl(?string $clientId): string
250
251
public function getAdminAdobeImsReAuthUrl (): string
251
252
{
252
253
return str_replace (
253
- ['#{client_id} ' , '#{redirect_uri} ' , '#{scope} ' , '#{locale} ' ],
254
+ ['#{imsUrl} ' , ' #{ client_id} ' , '#{redirect_uri} ' , '#{scope} ' , '#{locale} ' ],
254
255
[
256
+ $ this ->getImsUrl (),
255
257
$ this ->getApiKey (),
256
258
$ this ->getAdminAdobeImsReAuthCallBackUrl (),
257
259
$ this ->getAdminScopes (),
@@ -270,8 +272,8 @@ public function getAdminAdobeImsReAuthUrl(): string
270
272
public function getBackendLogoutUrl (string $ accessToken ) : string
271
273
{
272
274
return str_replace (
273
- ['#{logoutUrl } ' , '#{access_token} ' , '#{client_secret} ' , '#{client_id} ' ],
274
- [$ this ->getImsUrl (' imsUrl ' ), $ accessToken , $ this ->getPrivateKey (), $ this ->getApiKey ()],
275
+ ['#{imsUrl } ' , '#{access_token} ' , '#{client_secret} ' , '#{client_id} ' ],
276
+ [$ this ->getImsUrl (), $ accessToken , $ this ->getPrivateKey (), $ this ->getApiKey ()],
275
277
$ this ->scopeConfig ->getValue (self ::XML_PATH_ADMIN_LOGOUT_URL )
276
278
);
277
279
}
@@ -284,7 +286,11 @@ public function getBackendLogoutUrl(string $accessToken) : string
284
286
*/
285
287
public function getCertificateUrl (string $ fileName ): string
286
288
{
287
- return $ this ->scopeConfig ->getValue (self ::XML_PATH_CERTIFICATE_PATH ) . $ fileName ;
289
+ return str_replace (
290
+ ['#{certificateUrl} ' ],
291
+ [$ this ->getImsUrl ('certificateUrl ' )],
292
+ $ this ->scopeConfig ->getValue (self ::XML_PATH_CERTIFICATE_PATH ) . $ fileName
293
+ );
288
294
}
289
295
290
296
/**
@@ -296,8 +302,8 @@ public function getCertificateUrl(string $fileName): string
296
302
public function getOrganizationMembershipUrl (string $ orgId ): string
297
303
{
298
304
return str_replace (
299
- ['#{org_id} ' ],
300
- [$ orgId ],
305
+ ['#{organizationMembershipUrl} ' , ' #{ org_id} ' ],
306
+ [$ this -> getImsUrl ( ' organizationMembershipUrl ' ), $ orgId ],
301
307
$ this ->scopeConfig ->getValue (self ::XML_PATH_ORGANIZATION_MEMBERSHIP_URL )
302
308
);
303
309
}
@@ -332,7 +338,7 @@ private function getAdminScopes(): string
332
338
* @param string $urlType
333
339
* @return string
334
340
*/
335
- private function getImsUrl (string $ urlType ): string
341
+ private function getImsUrl (string $ urlType = ' imsUrl ' ): string
336
342
{
337
343
return $ this ->scopeConfig ->getValue (self ::XML_CONFIG_PATH . $ urlType );
338
344
}
0 commit comments