/// <inheritdoc/> public async Task CreateConversationUsingCertificateAsync(string channelId, string serviceUrl, AppCredentials appCredentials, ConversationParameters conversationParameters, BotCallbackHandler callback, CancellationToken cancellationToken) { var cert = await this.certificateProvider.GetCertificateAsync(appCredentials.MicrosoftAppId); var options = new CertificateAppCredentialsOptions() { AppId = appCredentials.MicrosoftAppId, ClientCertificate = cert, }; await this.CreateConversationAsync(channelId, serviceUrl, new CertificateAppCredentials(options) as AppCredentials, conversationParameters, callback, cancellationToken); }
/// <inheritdoc/> protected override async Task <AppCredentials> BuildCredentialsAsync(string appId, string oAuthScope = null) { appId = appId ?? throw new ArgumentNullException(nameof(appId)); if (!this.certificateProvider.IsCertificateAuthenticationEnabled()) { return(await base.BuildCredentialsAsync(appId, oAuthScope)); } var cert = await this.certificateProvider.GetCertificateAsync(appId); var options = new CertificateAppCredentialsOptions() { AppId = appId, ClientCertificate = cert, OauthScope = oAuthScope, }; var certificateAppCredentials = new CertificateAppCredentials(options) as AppCredentials; return(certificateAppCredentials); }