Skip to content

Commit

Permalink
use dynamic creation of issuer with tenant id
Browse files Browse the repository at this point in the history
  • Loading branch information
JhontSouth committed Mar 14, 2024
1 parent dfb6043 commit e9cb69a
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ export namespace EmulatorValidation {
return false;
}

if (Array.isArray(ToBotFromBotOrEmulatorTokenValidationParameters.issuer)) {
const tid = '/' + token.payload.tid + '/';

if (ToBotFromBotOrEmulatorTokenValidationParameters.issuer.find((issuer) => issuer.includes(tid)) == null) {
const newIssuer = 'https://sts.windows.net' + tid;
ToBotFromBotOrEmulatorTokenValidationParameters.issuer.push(newIssuer);
}
}

// Is the token issues by a source we consider to be the emulator?
if (
ToBotFromEmulatorTokenValidationParameters.issuer &&
Expand Down

0 comments on commit e9cb69a

Please sign in to comment.