diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2010-03-07 15:15:50 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2010-03-07 15:15:50 -0800 |
commit | 0a66008fa7ee711be201627a526f0338cfe795fa (patch) | |
tree | 9379f9f9e5bbd2271fe05f2573201117366b1682 /src | |
parent | 94d13172073aa4686ffb37a61d67ae8b849ddb19 (diff) | |
download | DotNetOpenAuth-0a66008fa7ee711be201627a526f0338cfe795fa.zip DotNetOpenAuth-0a66008fa7ee711be201627a526f0338cfe795fa.tar.gz DotNetOpenAuth-0a66008fa7ee711be201627a526f0338cfe795fa.tar.bz2 |
Trimmed down the AccountController and renamed a couple actions.
Diffstat (limited to 'src')
-rw-r--r-- | src/DotNetOpenAuth/OpenId/RelyingParty/RelyingPartyUtilities.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/DotNetOpenAuth/OpenId/RelyingParty/RelyingPartyUtilities.cs b/src/DotNetOpenAuth/OpenId/RelyingParty/RelyingPartyUtilities.cs index 6d0b191..8c3438a 100644 --- a/src/DotNetOpenAuth/OpenId/RelyingParty/RelyingPartyUtilities.cs +++ b/src/DotNetOpenAuth/OpenId/RelyingParty/RelyingPartyUtilities.cs @@ -51,7 +51,7 @@ namespace DotNetOpenAuth.OpenId.RelyingParty { /// string setup; // URL to initiate a setup request. /// } /// </remarks> - public static JsonResult AjaxDiscover(Identifier identifier, Realm realm, Uri returnTo) { + public static JsonResult AjaxDiscover(Identifier identifier, Realm realm, Uri returnTo, Action<IAuthenticationRequest> attachExtensions) { Contract.Requires<ArgumentNullException>(identifier != null); Contract.Requires<ArgumentNullException>(realm != null); Contract.Requires<ArgumentNullException>(returnTo != null); @@ -60,8 +60,13 @@ namespace DotNetOpenAuth.OpenId.RelyingParty { selector.RealmUrl = realm; selector.ReturnToUrl = returnTo.AbsoluteUri; selector.ID = "MVC"; - var requests = selector.CreateRequests(identifier); + var requests = selector.CreateRequests(identifier).CacheGeneratedResults(); if (requests.Any()) { + if (attachExtensions != null) { + foreach (var request in requests) { + attachExtensions(request); + } + } return new JsonResult { Data = new { claimedIdentifier = requests.First().ClaimedIdentifier, |