Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Session.js « Session « Model « src - git.mdns.eu/nextcloud/passwords-client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b7653f6b159479d13b15d92303c1efaf763ab173 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
export default class Session {

    get MODEL_TYPE() {return 'session';}

    constructor(user = null, token = null, id = null, authorized = false) {
        this._user = user;
        this._token = token;
        this._id = id;
        this._authorized = authorized;
    }

    /**
     * @return {String}
     */
    getId() {
        return this._id;
    }

    /**
     * @param {String} value
     *
     * @return {Session}
     */
    setId(value) {
        if(this._id !== value) {
            this._authorized = false;
            this._id = value;
        }

        return this;
    }

    /**
     * @return {String}
     */
    getUser() {
        return this._user;
    }

    /**
     * @param {String} value
     *
     * @return {Session}
     */
    setUser(value) {
        this._user = value;

        return this;
    }

    /**
     * @return {String}
     */
    getToken() {
        return this._token;
    }

    /**
     * @param {String} value
     *
     * @return {Session}
     */
    setToken(value) {
        this._token = value;

        return this;
    }

    /**
     *
     * @return {Boolean}
     */
    getAuthorized() {
        return this._authorized;
    }

    /**
     * @param {Boolean} value
     *
     * @return {Session}
     */
    setAuthorized(value) {
        this._authorized = value;

        return this;
    }


}