Commit 29328ea3 authored by Diego Molteni's avatar Diego Molteni
Browse files

fix: updated audiences on refresh

parent f3773fa7
Pipeline #79655 failed with stages
in 19 minutes
......@@ -185,10 +185,13 @@ export class ImpersonationTokenHandler {
}
// generate the impersonation token credential token (the auth credential)
const impersonationToken = AuthProviderFactory.build(
Config.SERVICE_AUTH_PROVIDER).convertToImpersonationTokenModel(
await AuthProviderFactory.build(
Config.SERVICE_AUTH_PROVIDER).generateAuthCredential());
const authProvider = AuthProviderFactory.build(Config.SERVICE_AUTH_PROVIDER);
const scopes = [authProvider.getClientID()];
if (Config.DES_TARGET_AUDIENCE) {
scopes.push(Config.DES_TARGET_AUDIENCE);
}
const impersonationToken = authProvider.convertToImpersonationTokenModel(
await authProvider.generateScopedAuthCredential(scopes));
impersonationToken.context = requestParams.tokenContext;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment