techdocs-backend: use separate plugin request token when syncing cache
Signed-off-by: Oskar Jiang <oskarjiang94@gmail.com>
This commit is contained in:
@@ -252,10 +252,14 @@ export async function createRouter(
|
||||
// However, if caching is enabled, take the opportunity to check and
|
||||
// invalidate stale cache entries.
|
||||
if (cache) {
|
||||
const { token: techDocsToken } = await auth.getPluginRequestToken({
|
||||
onBehalfOf: await auth.getOwnServiceCredentials(),
|
||||
targetPluginId: 'techdocs',
|
||||
});
|
||||
await docsSynchronizer.doCacheSync({
|
||||
responseHandler,
|
||||
discovery,
|
||||
token,
|
||||
token: techDocsToken,
|
||||
entity,
|
||||
});
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user