Files
desktop-edge-win/DesktopEdge/Views/Controls/AddIdentitySignerChoice.xaml.cs
Christopher Britton c10a94578b Enroll to cert / token (#1001)
* add enroll-to fields to AddIdentity payload

* add AddIdentityViewModel for external JWT signer discovery draft

* wire signer discovery into add-by-URL preflight, simplify JWT signer fetching significantly

* add signer discovery and picker to add-by-URL draft

* clean up enroll identifier payload lambdas to be more readable

* extract dialog fade-in/fade-out animation helpers

* discover external JWT signers and add a dedicated enroll-mode dialog when applicable

* Trigger external auth for enroll to token/cert on 'join network'

* clear the identities list when the tunneler shuts off

* remove identity clear from LoadStatusFromService in favor of the one in ServiceClient_OnClientDisconnected

* initial multi-tun support commit. used for development

* fix reconnect loop

* Update release notes

---------

Co-authored-by: dovholuknf <46322585+dovholuknf@users.noreply.github.com>
2026-05-07 11:50:33 -04:00

46 lines
1.5 KiB
C#

/*
Copyright NetFoundry Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
using System;
using System.Windows.Controls;
using System.Windows.Input;
using ZitiDesktopEdge.DataStructures;
namespace ZitiDesktopEdge {
public partial class AddIdentitySignerChoice : UserControl {
public event CommonDelegates.CloseAction OnClose;
public event Action<EnrollIdentifierPayload, UserControl> OnAddIdentity;
public AddIdentitySignerChoice() {
InitializeComponent();
}
public void Prepare(AddIdentityViewModel viewModel) {
DataContext = viewModel;
}
private void JoinNetworkUrl(object sender, MouseButtonEventArgs e) {
AddIdentityViewModel vm = DataContext as AddIdentityViewModel;
if (vm == null || !vm.CanJoin) return;
OnAddIdentity?.Invoke(vm.BuildEnrollPayload(), this);
}
private void ExecuteClose(object sender, MouseButtonEventArgs e) {
this.OnClose?.Invoke(false, this);
}
}
}