Skip to content
This repository was archived by the owner on Mar 20, 2019. It is now read-only.

Commit 7ea8396

Browse files
committed
Fixes OpenIdProviderWebForms login.
1 parent 1928d80 commit 7ea8396

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

samples/OpenIdOfflineProvider/CheckIdWindow.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ internal static async Task ProcessAuthenticationAsync(Uri userIdentityPageBase,
6767

6868
var window = new CheckIdWindow(userIdentityPageBase, request);
6969

70-
bool isRPDiscoverable = await request.IsReturnUrlDiscoverableAsync(cancellationToken: cancellationToken) == RelyingPartyDiscoveryResult.Success;
70+
IHostFactories hostFactories = new DefaultOpenIdHostFactories();
71+
bool isRPDiscoverable = await request.IsReturnUrlDiscoverableAsync(hostFactories, cancellationToken) == RelyingPartyDiscoveryResult.Success;
7172
window.discoverableYesLabel.Visibility = isRPDiscoverable ? Visibility.Visible : Visibility.Collapsed;
7273
window.discoverableNoLabel.Visibility = isRPDiscoverable ? Visibility.Collapsed : Visibility.Visible;
7374

samples/OpenIdProviderWebForms/decide.aspx.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ namespace OpenIdProviderWebForms {
55
using System.Web.Security;
66
using System.Web.UI;
77
using DotNetOpenAuth.Messaging;
8+
using DotNetOpenAuth.OpenId;
89
using DotNetOpenAuth.OpenId.Extensions.ProviderAuthenticationPolicy;
910
using DotNetOpenAuth.OpenId.Extensions.SimpleRegistration;
1011
using DotNetOpenAuth.OpenId.Provider;
@@ -25,7 +26,7 @@ protected void Page_Load(object src, EventArgs e) {
2526
}
2627

2728
this.relyingPartyVerificationResultLabel.Text =
28-
await ProviderEndpoint.PendingRequest.IsReturnUrlDiscoverableAsync() == RelyingPartyDiscoveryResult.Success ? "passed" : "failed";
29+
await ProviderEndpoint.PendingRequest.IsReturnUrlDiscoverableAsync(new DefaultOpenIdHostFactories()) == RelyingPartyDiscoveryResult.Success ? "passed" : "failed";
2930

3031
this.realmLabel.Text = ProviderEndpoint.PendingRequest.Realm.ToString();
3132

src/DotNetOpenAuth.OpenId/OpenId/Provider/IHostProcessedRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ public interface IHostProcessedRequest : IRequest {
5757
/// <para>Return URL verification is only attempted if this method is called.</para>
5858
/// <para>See OpenID Authentication 2.0 spec section 9.2.1.</para>
5959
/// </remarks>
60-
Task<RelyingPartyDiscoveryResult> IsReturnUrlDiscoverableAsync(IHostFactories hostFactories = null, CancellationToken cancellationToken = default(CancellationToken));
60+
Task<RelyingPartyDiscoveryResult> IsReturnUrlDiscoverableAsync(IHostFactories hostFactories, CancellationToken cancellationToken = default(CancellationToken));
6161
}
6262
}

0 commit comments

Comments
 (0)