Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/01/11 01:52:25 (13 years ago)
Author:
cfleisch
Message:

#1439 Authentication process modified to work well with query plugin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/WebApplication/MVC2/HeuristicLabWeb.PluginHost/HLWebPluginHost/Controllers/AccountController.cs

    r4950 r5920  
    99using System.Web.Security;
    1010using HLWebPluginHost.Models;
     11using HLWebPluginHost.OKBQueryService;
     12using HLWebPluginHost.Helpers;
    1113
    1214namespace HLWebPluginHost.Controllers {
     
    3638    public ActionResult LogOn(LogOnModel model, string returnUrl) {
    3739      if (ModelState.IsValid) {
    38         if (MembershipService.ValidateUser(model.UserName, model.Password)) {
    39           Session["pwd"] = model.Password;
     40        QueryServiceClient client = Query.GetClientFactory(model.UserName, model.Password);
     41        if (client != null) {
     42          Session["Username"] = model.UserName;
     43          Session["Password"] = model.Password;
    4044          FormsService.SignIn(model.UserName, model.RememberMe);
    4145          if (!String.IsNullOrEmpty(returnUrl)) {
     
    5963    public ActionResult LogOff() {
    6064      FormsService.SignOut();
     65      Session.Remove("Username");
     66      Session.Remove("Password");
    6167
    6268      return RedirectToAction("Index", "Home");
Note: See TracChangeset for help on using the changeset viewer.