C# Class HelloWorld.JsonUserService

Inheritance: IGameUserService
Show file Open project: Ivony/HelloWorld

Public Methods

Method Description
GetUserID ( string loginToken ) : Guid?
JsonUserService ( string rootPath ) : System
TryLogin ( string email, string password, string &loginToken ) : bool
TryRegister ( string email, string password, string &loginToken ) : bool

尝试注册一个用户

TryResetPassword ( string loginToken, string oldPassword, string newPassword ) : bool

尝试重设用户密码

Private Methods

Method Description
CreateLoginToken ( System.Guid userID, string email ) : string
EncryptPassword ( string password ) : string
GetFilepath ( string email ) : string
LoadLoginData ( string loginToken ) : Newtonsoft.Json.Linq.JObject
LoadUserData ( string email ) : dynamic

Method Details

GetUserID() public method

public GetUserID ( string loginToken ) : Guid?
loginToken string
return Guid?

JsonUserService() public method

public JsonUserService ( string rootPath ) : System
rootPath string
return System

TryLogin() public method

public TryLogin ( string email, string password, string &loginToken ) : bool
email string
password string
loginToken string
return bool

TryRegister() public method

尝试注册一个用户
public TryRegister ( string email, string password, string &loginToken ) : bool
email string 邮箱
password string 密码
loginToken string
return bool

TryResetPassword() public method

尝试重设用户密码
public TryResetPassword ( string loginToken, string oldPassword, string newPassword ) : bool
loginToken string
oldPassword string
newPassword string
return bool