Skip to content

Commit

Permalink
Added basic authentication support for the changelog URL (ravibpatel#288
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Menno Deij - van Rijswijk authored and ravibpatel committed Jul 9, 2019
1 parent 4a58e81 commit 027e677
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions AutoUpdater.NET/AutoUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ public static class AutoUpdater
/// </summary>
public static BasicAuthentication BasicAuthXML;

/// <summary>
/// Set Basic Authentication credentials to navigate to the change log URL.
/// </summary>
public static BasicAuthentication BasicAuthChangeLog;

/// <summary>
/// If this is true users can see the skip button.
/// </summary>
Expand Down
9 changes: 8 additions & 1 deletion AutoUpdater.NET/UpdateForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,14 @@ private void UpdateFormLoad(object sender, EventArgs e)
}
else
{
webBrowser.Navigate(AutoUpdater.ChangelogURL);
if (null != AutoUpdater.BasicAuthChangeLog)
{
webBrowser.Navigate(AutoUpdater.ChangelogURL, "", null, $"Authorization: {AutoUpdater.BasicAuthChangeLog}");
}
else
{
webBrowser.Navigate(AutoUpdater.ChangelogURL);
}
}

var labelSize = new Size(Width - 110, 0);
Expand Down

0 comments on commit 027e677

Please sign in to comment.