summaryrefslogtreecommitdiffstats
path: root/samples/OpenIdOfflineProvider/MainWindow.xaml.cs
diff options
context:
space:
mode:
Diffstat (limited to 'samples/OpenIdOfflineProvider/MainWindow.xaml.cs')
-rw-r--r--samples/OpenIdOfflineProvider/MainWindow.xaml.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/samples/OpenIdOfflineProvider/MainWindow.xaml.cs b/samples/OpenIdOfflineProvider/MainWindow.xaml.cs
index bf88e78..86b6206 100644
--- a/samples/OpenIdOfflineProvider/MainWindow.xaml.cs
+++ b/samples/OpenIdOfflineProvider/MainWindow.xaml.cs
@@ -25,6 +25,7 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider {
using System.Windows.Navigation;
using System.Windows.Shapes;
using DotNetOpenAuth.Messaging;
+ using DotNetOpenAuth.OpenId;
using DotNetOpenAuth.OpenId.Provider;
using log4net;
using log4net.Appender;
@@ -117,11 +118,15 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider {
switch (checkidRequestList.SelectedIndex) {
case 0:
if (authRequest.IsDirectedIdentity) {
+ string userIdentityPageBase = this.hostedProvider.UserIdentityPageBase.AbsoluteUri;
+ if (capitalizedHostName.IsChecked.Value) {
+ userIdentityPageBase = (this.hostedProvider.UserIdentityPageBase.Scheme + Uri.SchemeDelimiter + this.hostedProvider.UserIdentityPageBase.Authority).ToUpperInvariant() + this.hostedProvider.UserIdentityPageBase.PathAndQuery;
+ }
+ string leafPath = "directedidentity";
if (directedIdentityTrailingPeriodsCheckbox.IsChecked.Value) {
- authRequest.ClaimedIdentifier = this.hostedProvider.UserIdentityPageBase + "directedidentity.";
- } else {
- authRequest.ClaimedIdentifier = this.hostedProvider.UserIdentityPageBase + "directedidentity";
+ leafPath += ".";
}
+ authRequest.ClaimedIdentifier = Identifier.Parse(userIdentityPageBase + leafPath, true);
authRequest.LocalIdentifier = authRequest.ClaimedIdentifier;
}
authRequest.IsAuthenticated = true;