package cn.yyxx.commsdk.impl.channel.user;

import org.json.JSONException;
import org.json.JSONObject;

public class UserSession {

    public String login_token="",uname = "",password="";


    public void reset(){
        login_token="";
        uname = "";
        password = "";
    }

    public JSONObject toJSONObject(){
        JSONObject jsonObject = new JSONObject();
        try {
            jsonObject.put("login_token", login_token);
            jsonObject.put("uname", uname);
            jsonObject.put("password", password);
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return jsonObject;

    }


    @Override
    public String toString() {
        return "UserSession{" +
                "login_token='" + login_token + '\'' +
                ", uname='" + uname + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
