- Notifications
You must be signed in to change notification settings - Fork3
feat: add support for RDP URIs#87
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
+596 −86
Merged
Changes fromall commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
24 changes: 17 additions & 7 deletionsApp/App.xaml.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -41,6 +41,7 @@ public partial class App : Application | ||
#endif | ||
private readonly ILogger<App> _logger; | ||
private readonly IUriHandler _uriHandler; | ||
public App() | ||
{ | ||
@@ -72,6 +73,8 @@ public App() | ||
.Bind(builder.Configuration.GetSection(MutagenControllerConfigSection)); | ||
services.AddSingleton<ISyncSessionController, MutagenController>(); | ||
services.AddSingleton<IUserNotifier, UserNotifier>(); | ||
services.AddSingleton<IRdpConnector, RdpConnector>(); | ||
services.AddSingleton<IUriHandler, UriHandler>(); | ||
// SignInWindow views and view models | ||
services.AddTransient<SignInViewModel>(); | ||
@@ -98,6 +101,7 @@ public App() | ||
_services = services.BuildServiceProvider(); | ||
_logger = (ILogger<App>)_services.GetService(typeof(ILogger<App>))!; | ||
_uriHandler = (IUriHandler)_services.GetService(typeof(IUriHandler))!; | ||
InitializeComponent(); | ||
} | ||
@@ -190,7 +194,19 @@ public void OnActivated(object? sender, AppActivationArguments args) | ||
_logger.LogWarning("URI activation with null data"); | ||
return; | ||
} | ||
// don't need to wait for it to complete. | ||
_uriHandler.HandleUri(protoArgs.Uri).ContinueWith(t => | ||
{ | ||
if (t.Exception != null) | ||
{ | ||
// don't log query params, as they contain secrets. | ||
_logger.LogError(t.Exception, | ||
spikecurtis marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
"unhandled exception while processing URI coder://{authority}{path}", | ||
protoArgs.Uri.Authority, protoArgs.Uri.AbsolutePath); | ||
} | ||
}); | ||
break; | ||
case ExtendedActivationKind.AppNotification: | ||
@@ -204,12 +220,6 @@ public void OnActivated(object? sender, AppActivationArguments args) | ||
} | ||
} | ||
public void HandleNotification(AppNotificationManager? sender, AppNotificationActivatedEventArgs args) | ||
{ | ||
// right now, we don't do anything other than log | ||
218 changes: 141 additions & 77 deletionsApp/Services/CredentialManager.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.