1 | <?php |
||
12 | class Token |
||
13 | { |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $token; |
||
18 | |||
19 | /** |
||
20 | * @var \DateTime |
||
21 | */ |
||
22 | protected $validTo; |
||
23 | |||
24 | /** |
||
25 | * @var int |
||
26 | */ |
||
27 | protected $ttl; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $scope; |
||
33 | |||
34 | /** |
||
35 | * @var string |
||
36 | */ |
||
37 | protected $refreshToken; |
||
38 | |||
39 | 308 | public function __construct($token = null, $ttl = null, $scope = null) |
|
43 | |||
44 | /** |
||
45 | * @return string |
||
46 | */ |
||
47 | 306 | public function getToken() |
|
51 | |||
52 | /** |
||
53 | * @param string $token |
||
54 | * @return $this |
||
55 | */ |
||
56 | 308 | public function setToken($token) |
|
62 | |||
63 | /** |
||
64 | * @return \DateTime |
||
65 | */ |
||
66 | 1 | public function getValidTo() |
|
70 | |||
71 | /** |
||
72 | * @param \DateTime $validTo |
||
73 | * @return $this |
||
74 | */ |
||
75 | 12 | public function setValidTo(\DateTime $validTo) |
|
81 | |||
82 | /** |
||
83 | * @return int |
||
84 | */ |
||
85 | 12 | public function getTtl() |
|
89 | |||
90 | /** |
||
91 | * @param int $ttl |
||
92 | * @return $this |
||
93 | */ |
||
94 | 308 | public function setTtl($ttl) |
|
100 | |||
101 | /** |
||
102 | * @return string |
||
103 | */ |
||
104 | 3 | public function getScope() |
|
108 | |||
109 | /** |
||
110 | * @param string $scope |
||
111 | * @return $this |
||
112 | */ |
||
113 | 308 | public function setScope($scope) |
|
119 | |||
120 | /** |
||
121 | * @return string |
||
122 | */ |
||
123 | 4 | public function getRefreshToken() |
|
127 | |||
128 | /** |
||
129 | * @param string $refreshToken |
||
130 | * @return $this |
||
131 | */ |
||
132 | 4 | public function setRefreshToken($refreshToken) |
|
138 | } |
||
139 |