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 { ...@@ -185,10 +185,13 @@ export class ImpersonationTokenHandler {
} }
// generate the impersonation token credential token (the auth credential) // generate the impersonation token credential token (the auth credential)
const impersonationToken = AuthProviderFactory.build( const authProvider = AuthProviderFactory.build(Config.SERVICE_AUTH_PROVIDER);
Config.SERVICE_AUTH_PROVIDER).convertToImpersonationTokenModel( const scopes = [authProvider.getClientID()];
await AuthProviderFactory.build( if (Config.DES_TARGET_AUDIENCE) {
Config.SERVICE_AUTH_PROVIDER).generateAuthCredential()); scopes.push(Config.DES_TARGET_AUDIENCE);
}
const impersonationToken = authProvider.convertToImpersonationTokenModel(
await authProvider.generateScopedAuthCredential(scopes));
impersonationToken.context = requestParams.tokenContext; 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