public AllowedCallersClaimsValidator(BotSkillConfiguration settings) { // skillConfiguration.allowedCallers is the setting in the appsettings.json file // that consists of the list of parent bot IDs that are allowed to access the skill. // To add a new parent bot, simply edit the AllowedCallers and add // the parent bot's Microsoft app ID to the list. // In this sample, we allow all callers if AllowedCallers contains an "*". if (settings?.AllowedCallers != null) { _allowedCallers = new List <string>(settings.AllowedCallers); } }
public AllowedCallersClaimsValidator(BotSkillConfiguration settings) { // skillConfiguration.allowedCallers is the setting in the appsettings.json file // that consists of the list of parent bot IDs that are allowed to access the skill. // To add a new parent bot, simply edit the AllowedCallers and add // the parent bot's Microsoft app ID to the list. // In this sample, we allow all callers if AllowedCallers contains an "*". if (settings?.AllowedCallers == null || settings.AllowedCallers.Length == 0) { throw new ArgumentException($"skill.allowedCallers has to be defined, e.g. ['*'] or ['callerAppId']"); } _allowedCallers = new List <string>(settings.AllowedCallers); }