C# Class EasyAuth.Authentication

Mostrar archivo Open project: adamkdean/EasyAuth

Public Methods

Method Description
HashPassword ( string password, string salt, bool secure = false ) : string
IsAuthenticated ( ) : bool
Login ( string username, string password ) : bool
Login ( string username, string password, bool persist, int length = 28 ) : bool
Logout ( ) : void

Protected Methods

Method Description
Authenticate ( string username, string hash ) : bool
Authenticate ( string username, string hash, bool persist, int length = 28 ) : bool
CreateCookie ( string username, string hash, int days = 28 ) : void
ExpireCookie ( ) : void
GetCookie ( ) : System.Web.HttpCookie

Method Details

Authenticate() protected static method

protected static Authenticate ( string username, string hash ) : bool
username string
hash string
return bool

Authenticate() protected static method

protected static Authenticate ( string username, string hash, bool persist, int length = 28 ) : bool
username string
hash string
persist bool
length int
return bool

CreateCookie() protected static method

protected static CreateCookie ( string username, string hash, int days = 28 ) : void
username string
hash string
days int
return void

ExpireCookie() protected static method

protected static ExpireCookie ( ) : void
return void

GetCookie() protected static method

protected static GetCookie ( ) : System.Web.HttpCookie
return System.Web.HttpCookie

HashPassword() public static method

public static HashPassword ( string password, string salt, bool secure = false ) : string
password string
salt string
secure bool
return string

IsAuthenticated() public static method

public static IsAuthenticated ( ) : bool
return bool

Login() public static method

public static Login ( string username, string password ) : bool
username string
password string
return bool

Login() public static method

public static Login ( string username, string password, bool persist, int length = 28 ) : bool
username string
password string
persist bool
length int
return bool

Logout() public static method

public static Logout ( ) : void
return void