Skip to content

Commit

Permalink
handle secondary ext auth
Browse files Browse the repository at this point in the history
  • Loading branch information
dovholuknf committed Jan 13, 2025
1 parent 7bb578b commit be0e038
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 17 deletions.
19 changes: 8 additions & 11 deletions DesktopEdge/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2038,20 +2038,17 @@ void OnAddIdentityAction(EnrollIdentifierPayload payload, UserControl toClose) {
private async void CompleteExternalAuthEvent(ZitiIdentity identity, string provider) {
try {
DataClient client = (DataClient)Application.Current.Properties["ServiceClient"];
if (identity?.ExtAuthProviders?.Count > 0) {
ExternalAuthLoginResponse resp = await serviceClient.ExternalAuthLogin(identity.Identifier, provider);
if (resp?.Error == null) {
if (resp?.Data?.url != null) {
Console.WriteLine(resp.Data?.url);
Process.Start(resp.Data.url);
} else {
Console.WriteLine("The response contained no url???");
}
ExternalAuthLoginResponse resp = await serviceClient.ExternalAuthLogin(identity.Identifier, provider);
if (resp?.Error == null) {
if (resp?.Data?.url != null) {
Console.WriteLine(resp.Data?.url);
Process.Start(resp.Data.url);
} else {
ShowError("Failed to Authenticate", resp.Error);
Console.WriteLine("The response contained no url???");
}
} else {
ShowError("Failed to Authenticate", "No external providers found! This is a configuration error. Inform your network administrator.");
logger.Error("external auth failed: [{}]", resp.Error);
ShowError("Failed to Authenticate", "External authentication could not start. This is likely a configuration error. Inform your network administrator.");
}
} catch (Exception ex) {
logger.Error("unexpected error!", ex);
Expand Down
2 changes: 2 additions & 0 deletions DesktopEdge/Views/ItemRenderers/IdentityItem.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,8 @@ private void ShowExtAuthList(object sender, System.Windows.Input.MouseEventArgs
}
} else if (_identity?.ExtAuthProviders?.Count == 1) {
this.CompleteExternalAuth.Invoke(this.Identity, _identity?.ExtAuthProviders[0]);
} else {
this.CompleteExternalAuth.Invoke(this.Identity, null);
}
fe.ContextMenu.PlacementTarget = fe;
fe.ContextMenu.IsOpen = true;
Expand Down
17 changes: 17 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Release 2.5.2.6

## What's New
* properly handle secondary auth by ext jwt

## Other changes
* n/a

## Bugs fixed:
* n/a

## Dependencies

* ziti-tunneler: v1.3.7
* ziti-sdk: 1.3.5
* tlsuv: v0.33.2[OpenSSL 3.3.1 4 Jun 2024]

# Release 2.5.2.5
## What's New
* nothing - bugfix
Expand Down
10 changes: 5 additions & 5 deletions release-streams/beta.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "2.5.2.5",
"tag_name": "2.5.2.5",
"published_at": "2025-01-10T08:16:11Z",
"name": "2.5.2.6",
"tag_name": "2.5.2.6",
"published_at": "2025-01-13T07:08:38Z",
"installation_critical": false,
"assets": [
{
"name": "Ziti.Desktop.Edge.Client-2.5.2.5.exe",
"browser_download_url": "https://github.com/openziti/desktop-edge-win/releases/download/2.5.2.5/Ziti.Desktop.Edge.Client-2.5.2.5.exe"
"name": "Ziti.Desktop.Edge.Client-2.5.2.6.exe",
"browser_download_url": "https://github.com/openziti/desktop-edge-win/releases/download/2.5.2.6/Ziti.Desktop.Edge.Client-2.5.2.6.exe"
}
]
}
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.2.5
2.5.2.6

0 comments on commit be0e038

Please sign in to comment.