public SkillController(
     IBot bot,
     BotSettingsBase botSettings,
     IBotFrameworkHttpAdapter botFrameworkHttpAdapter,
     SkillWebSocketAdapter skillWebSocketAdapter)
 {
     _bot                     = bot ?? throw new ArgumentNullException(nameof(IBot));
     _botSettings             = botSettings ?? throw new ArgumentNullException(nameof(botSettings));
     _botFrameworkHttpAdapter = botFrameworkHttpAdapter ?? throw new ArgumentNullException(nameof(IBotFrameworkHttpAdapter));
     _skillWebSocketAdapter   = skillWebSocketAdapter;
 }
Beispiel #2
0
        public SkillController(
            IBot bot,
            BotSettingsBase botSettings,
            IBotFrameworkHttpAdapter botFrameworkHttpAdapter,
            SkillWebSocketAdapter skillWebSocketAdapter,
            IWhitelistAuthenticationProvider whitelistAuthenticationProvider)
        {
            _bot                             = bot ?? throw new ArgumentNullException(nameof(IBot));
            _botSettings                     = botSettings ?? throw new ArgumentNullException(nameof(botSettings));
            _botFrameworkHttpAdapter         = botFrameworkHttpAdapter ?? throw new ArgumentNullException(nameof(IBotFrameworkHttpAdapter));
            _whitelistAuthenticationProvider = whitelistAuthenticationProvider ?? throw new ArgumentNullException(nameof(whitelistAuthenticationProvider));
            _skillWebSocketAdapter           = skillWebSocketAdapter;

            _authenticationProvider = new MsJWTAuthenticationProvider(_botSettings.MicrosoftAppId);
            _authenticator          = new Authenticator(_authenticationProvider, _whitelistAuthenticationProvider);
        }