mirror of
https://github.com/rudollee/LearningMVC.git
synced 2025-06-07 07:56:14 +00:00
23 lines
514 B
C#
23 lines
514 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Security;
|
|
using SportsStore.WebUI.Infrastructure.Abstract;
|
|
|
|
namespace SportsStore.WebUI.Infrastructure.Concrete
|
|
{
|
|
public class FormsAuthProvider : IAuthProvider
|
|
{
|
|
public bool Authenticate(string username, string password)
|
|
{
|
|
bool result = FormsAuthentication.Authenticate(username, password);
|
|
if (result)
|
|
{
|
|
FormsAuthentication.SetAuthCookie(username, false);
|
|
}
|
|
|
|
return result;
|
|
}
|
|
}
|
|
} |