C# Class RibbitMvc.Services.SecurityService

Inheritance: ISecurityService
Show file Open project: dato1357/Social-Network Class Usage Examples

Public Methods

Method Description
Authenticate ( string username, string password ) : bool
CreateUser ( SignupViewModel signupModel, bool login = true ) : User
DoesUserExist ( string username ) : bool
GetCurrentUser ( ) : User
Login ( User user ) : void
Login ( string username ) : void
Logout ( ) : void
SecurityService ( IUserService users, System.Web.SessionState.HttpSessionState session = null ) : System

Method Details

Authenticate() public method

public Authenticate ( string username, string password ) : bool
username string
password string
return bool

CreateUser() public method

public CreateUser ( SignupViewModel signupModel, bool login = true ) : User
signupModel RibbitMvc.ViewModel.SignupViewModel
login bool
return RibbitMvc.Models.User

DoesUserExist() public method

public DoesUserExist ( string username ) : bool
username string
return bool

GetCurrentUser() public method

public GetCurrentUser ( ) : User
return RibbitMvc.Models.User

Login() public method

public Login ( User user ) : void
user RibbitMvc.Models.User
return void

Login() public method

public Login ( string username ) : void
username string
return void

Logout() public method

public Logout ( ) : void
return void

SecurityService() public method

public SecurityService ( IUserService users, System.Web.SessionState.HttpSessionState session = null ) : System
users IUserService
session System.Web.SessionState.HttpSessionState
return System