summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--samples/OpenIdOfflineProvider/MainWindow.xaml10
-rw-r--r--samples/OpenIdOfflineProvider/MainWindow.xaml.cs10
2 files changed, 18 insertions, 2 deletions
diff --git a/samples/OpenIdOfflineProvider/MainWindow.xaml b/samples/OpenIdOfflineProvider/MainWindow.xaml
index de215ba..8b3510f 100644
--- a/samples/OpenIdOfflineProvider/MainWindow.xaml
+++ b/samples/OpenIdOfflineProvider/MainWindow.xaml
@@ -6,7 +6,9 @@
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
<RowDefinition Height="*"/>
+ <RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
@@ -20,6 +22,12 @@
<ComboBoxItem>Auto respond: No</ComboBoxItem>
<ComboBoxItem>Intercept</ComboBoxItem>
</ComboBox>
- <TextBox Height="auto" Margin="0,8,0,0" Grid.Row="2" Grid.ColumnSpan="2" Name="logBox" IsReadOnly="True" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Auto" />
+ <Expander Grid.Row="2" Grid.ColumnSpan="2" Header="Advanced options">
+ <StackPanel Margin="3">
+ <CheckBox Name="directedIdentityTrailingPeriodsCheckbox">Directed identity uses trailing periods in path</CheckBox>
+ </StackPanel>
+ </Expander>
+ <TextBox Height="auto" Margin="0,8,0,0" Grid.Row="3" Grid.ColumnSpan="2" Name="logBox" IsReadOnly="True" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Auto" />
+ <Button Grid.Row="4" Grid.ColumnSpan="2" Click="Button_Click">Clear log</Button>
</Grid>
</Window>
diff --git a/samples/OpenIdOfflineProvider/MainWindow.xaml.cs b/samples/OpenIdOfflineProvider/MainWindow.xaml.cs
index 8f04da3..bf88e78 100644
--- a/samples/OpenIdOfflineProvider/MainWindow.xaml.cs
+++ b/samples/OpenIdOfflineProvider/MainWindow.xaml.cs
@@ -117,7 +117,11 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider {
switch (checkidRequestList.SelectedIndex) {
case 0:
if (authRequest.IsDirectedIdentity) {
- authRequest.ClaimedIdentifier = new Uri(this.hostedProvider.UserIdentityPageBase, "directedidentity");
+ if (directedIdentityTrailingPeriodsCheckbox.IsChecked.Value) {
+ authRequest.ClaimedIdentifier = this.hostedProvider.UserIdentityPageBase + "directedidentity.";
+ } else {
+ authRequest.ClaimedIdentifier = this.hostedProvider.UserIdentityPageBase + "directedidentity";
+ }
authRequest.LocalIdentifier = authRequest.ClaimedIdentifier;
}
authRequest.IsAuthenticated = true;
@@ -169,5 +173,9 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider {
MessageBox.Show(this, ex.Message, "Error while copying OP Identifier to the clipboard", MessageBoxButton.OK, MessageBoxImage.Error);
}
}
+
+ private void Button_Click(object sender, RoutedEventArgs e) {
+ logBox.Clear();
+ }
}
}