summaryrefslogtreecommitdiffstats
path: root/samples/OpenIdOfflineProvider/CheckIdWindow.xaml.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-04-26 14:52:19 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-04-26 14:52:19 -0700
commit478bac96d7c00ed333a19021bbe6115dea865ba1 (patch)
tree82675bd8b562a1b8745430aab40d788fd9638cd3 /samples/OpenIdOfflineProvider/CheckIdWindow.xaml.cs
parent6b9e91cc059a489eb5c593d57b72156ecef8d0e3 (diff)
downloadDotNetOpenAuth-478bac96d7c00ed333a19021bbe6115dea865ba1.zip
DotNetOpenAuth-478bac96d7c00ed333a19021bbe6115dea865ba1.tar.gz
DotNetOpenAuth-478bac96d7c00ed333a19021bbe6115dea865ba1.tar.bz2
The auto-respond vs. intercept setting for checkid messages works now.
Diffstat (limited to 'samples/OpenIdOfflineProvider/CheckIdWindow.xaml.cs')
-rw-r--r--samples/OpenIdOfflineProvider/CheckIdWindow.xaml.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/samples/OpenIdOfflineProvider/CheckIdWindow.xaml.cs b/samples/OpenIdOfflineProvider/CheckIdWindow.xaml.cs
index 279f15f..6bab2ae 100644
--- a/samples/OpenIdOfflineProvider/CheckIdWindow.xaml.cs
+++ b/samples/OpenIdOfflineProvider/CheckIdWindow.xaml.cs
@@ -55,11 +55,17 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider {
/// </summary>
/// <param name="provider">The OpenID Provider host.</param>
/// <param name="request">The incoming authentication request.</param>
- internal static void ProcessAuthentication(HostedProvider provider, IAuthenticationRequest request) {
+ /// <param name="skipUI">if set to <c>true</c> no dialog should be displayed to the user.</param>
+ internal static void ProcessAuthentication(HostedProvider provider, IAuthenticationRequest request, bool skipUI) {
Contract.Requires(provider != null);
Contract.Requires(request != null);
- App.Current.Dispatcher.Invoke((Action)delegate {
+ if (skipUI) {
+ if (request.IsDirectedIdentity) {
+ throw new NotImplementedException();
+ }
+ request.IsAuthenticated = true;
+ } else {
var window = new CheckIdWindow(provider, request);
bool? result = window.ShowDialog();
@@ -74,7 +80,7 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider {
request.ClaimedIdentifier = window.claimedIdentifierBox.Text;
request.LocalIdentifier = window.localIdentifierBox.Text;
}
- });
+ }
}
/// <summary>