summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-07-30 20:35:50 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-07-30 20:35:50 -0700
commit7eb89073a6054c511f7ba5e4933b4f0214070fa6 (patch)
tree523c749509d8b697a0efa866b1c540521d267add
parent1ebe02ae919c5eb14933c6f54fec82ef063cf3f7 (diff)
downloadDotNetOpenAuth-7eb89073a6054c511f7ba5e4933b4f0214070fa6.zip
DotNetOpenAuth-7eb89073a6054c511f7ba5e4933b4f0214070fa6.tar.gz
DotNetOpenAuth-7eb89073a6054c511f7ba5e4933b4f0214070fa6.tar.bz2
Moved the OpenIdRelyingParty instantiating in the RP MVC sample so it doesn't happen over and over.
-rw-r--r--samples/OpenIdRelyingPartyMvc/Controllers/UserController.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/samples/OpenIdRelyingPartyMvc/Controllers/UserController.cs b/samples/OpenIdRelyingPartyMvc/Controllers/UserController.cs
index dd526d3..c0478b1 100644
--- a/samples/OpenIdRelyingPartyMvc/Controllers/UserController.cs
+++ b/samples/OpenIdRelyingPartyMvc/Controllers/UserController.cs
@@ -10,6 +10,8 @@
using DotNetOpenAuth.OpenId.RelyingParty;
public class UserController : Controller {
+ private static OpenIdRelyingParty openid = new OpenIdRelyingParty();
+
public ActionResult Index() {
if (!User.Identity.IsAuthenticated) {
Response.Redirect("/User/Login?ReturnUrl=Index");
@@ -33,7 +35,6 @@
}
public ActionResult Authenticate(string returnUrl) {
- var openid = new OpenIdRelyingParty();
var response = openid.GetResponse();
if (response == null) {
// Stage 2: user submitting Identifier