summaryrefslogtreecommitdiffstats
path: root/samples/OpenIdOfflineProvider/CheckIdWindow.xaml.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-04-26 15:27:08 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-04-26 15:27:08 -0700
commit22172a21c0bbf55bc1ebd5169c3531cdbc928b98 (patch)
treed8c5e8965cc7bafb7c96da981d29b351073f95f8 /samples/OpenIdOfflineProvider/CheckIdWindow.xaml.cs
parent478bac96d7c00ed333a19021bbe6115dea865ba1 (diff)
downloadDotNetOpenAuth-22172a21c0bbf55bc1ebd5169c3531cdbc928b98.zip
DotNetOpenAuth-22172a21c0bbf55bc1ebd5169c3531cdbc928b98.tar.gz
DotNetOpenAuth-22172a21c0bbf55bc1ebd5169c3531cdbc928b98.tar.bz2
Removed all UI for unimplemented features in the Offline Provider.
Diffstat (limited to 'samples/OpenIdOfflineProvider/CheckIdWindow.xaml.cs')
-rw-r--r--samples/OpenIdOfflineProvider/CheckIdWindow.xaml.cs37
1 files changed, 16 insertions, 21 deletions
diff --git a/samples/OpenIdOfflineProvider/CheckIdWindow.xaml.cs b/samples/OpenIdOfflineProvider/CheckIdWindow.xaml.cs
index 6bab2ae..597f72f 100644
--- a/samples/OpenIdOfflineProvider/CheckIdWindow.xaml.cs
+++ b/samples/OpenIdOfflineProvider/CheckIdWindow.xaml.cs
@@ -44,7 +44,10 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider {
this.discoverableYesLabel.Visibility = isRPDiscoverable ? Visibility.Visible : Visibility.Collapsed;
this.discoverableNoLabel.Visibility = isRPDiscoverable ? Visibility.Collapsed : Visibility.Visible;
- if (!request.IsDirectedIdentity) {
+ if (request.IsDirectedIdentity) {
+ this.claimedIdentifierBox.Text = provider.UserIdentityPageBase.AbsoluteUri;
+ this.localIdentifierBox.Text = provider.UserIdentityPageBase.AbsoluteUri;
+ } else {
this.claimedIdentifierBox.Text = request.ClaimedIdentifier;
this.localIdentifierBox.Text = request.LocalIdentifier;
}
@@ -55,31 +58,23 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider {
/// </summary>
/// <param name="provider">The OpenID Provider host.</param>
/// <param name="request">The incoming authentication request.</param>
- /// <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) {
+ internal static void ProcessAuthentication(HostedProvider provider, IAuthenticationRequest request) {
Contract.Requires(provider != null);
Contract.Requires(request != null);
- if (skipUI) {
- if (request.IsDirectedIdentity) {
- throw new NotImplementedException();
- }
- request.IsAuthenticated = true;
- } else {
- var window = new CheckIdWindow(provider, request);
- bool? result = window.ShowDialog();
+ var window = new CheckIdWindow(provider, request);
+ bool? result = window.ShowDialog();
- // If the user pressed Esc or cancel, just send a negative assertion.
- if (!result.HasValue || !result.Value) {
- request.IsAuthenticated = false;
- return;
- }
+ // If the user pressed Esc or cancel, just send a negative assertion.
+ if (!result.HasValue || !result.Value) {
+ request.IsAuthenticated = false;
+ return;
+ }
- request.IsAuthenticated = window.tabControl1.SelectedItem == window.positiveTab;
- if (request.IsAuthenticated.Value) {
- request.ClaimedIdentifier = window.claimedIdentifierBox.Text;
- request.LocalIdentifier = window.localIdentifierBox.Text;
- }
+ request.IsAuthenticated = window.tabControl1.SelectedItem == window.positiveTab;
+ if (request.IsAuthenticated.Value) {
+ request.ClaimedIdentifier = window.claimedIdentifierBox.Text;
+ request.LocalIdentifier = window.localIdentifierBox.Text;
}
}