Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to use TokenEndpoint #89

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions BotConnectorApp/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<add key="BotId" value="" />
<add key="BotTenantId" value="" />
<add key="BotName" value="" />
<add key="BotTokenEndpoint" value="https://powerva.microsoft.com/api/botmanagement/v1/directline/directlinetoken" />
<add key="BotTokenEndpoint" value="" />
<add key="EndConversationMessage" value="quit" />
</appSettings>
</configuration>
</configuration>
1 change: 0 additions & 1 deletion BotConnectorApp/BotConnector/BotEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public BotEndpoint(string botId, string tenantId, string tokenEndPoint)
BotId = botId;
TenantId = tenantId;
UriBuilder uriBuilder = new UriBuilder(tokenEndPoint);
uriBuilder.Query = $"botId={BotId}&tenantId={TenantId}";
TokenUrl = uriBuilder.Uri;
}

Expand Down
5 changes: 0 additions & 5 deletions BotConnectorApp/BotConnector/BotService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ public class BotService

public string BotName { get; set; }

public string BotId { get; set; }

public string TenantId { get; set; }

public string TokenEndPoint { get; set; }

/// <summary>
Expand All @@ -34,7 +30,6 @@ public async Task<string> GetTokenAsync()
{
httpRequest.Method = HttpMethod.Get;
UriBuilder uriBuilder = new UriBuilder(TokenEndPoint);
uriBuilder.Query = $"botId={BotId}&tenantId={TenantId}";
httpRequest.RequestUri = uriBuilder.Uri;
using (var response = await s_httpClient.SendAsync(httpRequest))
{
Expand Down