|
10 | 10 |
|
11 | 11 | class DatabaseTokenRepository implements TokenRepositoryInterface |
12 | 12 | { |
13 | | - /** |
14 | | - * The database connection instance. |
15 | | - * |
16 | | - * @var \Illuminate\Database\ConnectionInterface |
17 | | - */ |
18 | | - protected $connection; |
19 | | - |
20 | | - /** |
21 | | - * The Hasher implementation. |
22 | | - * |
23 | | - * @var \Illuminate\Contracts\Hashing\Hasher |
24 | | - */ |
25 | | - protected $hasher; |
26 | | - |
27 | | - /** |
28 | | - * The token database table. |
29 | | - * |
30 | | - * @var string |
31 | | - */ |
32 | | - protected $table; |
33 | | - |
34 | | - /** |
35 | | - * The hashing key. |
36 | | - * |
37 | | - * @var string |
38 | | - */ |
39 | | - protected $hashKey; |
40 | | - |
41 | | - /** |
42 | | - * The number of seconds a token should last. |
43 | | - * |
44 | | - * @var int |
45 | | - */ |
46 | | - protected $expires; |
47 | | - |
48 | | - /** |
49 | | - * Minimum number of seconds before re-redefining the token. |
50 | | - * |
51 | | - * @var int |
52 | | - */ |
53 | | - protected $throttle; |
54 | | - |
55 | 13 | /** |
56 | 14 | * Create a new token repository instance. |
57 | | - * |
58 | | - * @param \Illuminate\Database\ConnectionInterface $connection |
59 | | - * @param \Illuminate\Contracts\Hashing\Hasher $hasher |
60 | | - * @param string $table |
61 | | - * @param string $hashKey |
62 | | - * @param int $expires |
63 | | - * @param int $throttle |
64 | | - * @return void |
65 | 15 | */ |
66 | 16 | public function __construct( |
67 | | - ConnectionInterface $connection, |
68 | | - HasherContract $hasher, |
69 | | - $table, |
70 | | - $hashKey, |
71 | | - $expires = 60, |
72 | | - $throttle = 60, |
| 17 | + protected ConnectionInterface $connection, |
| 18 | + protected HasherContract $hasher, |
| 19 | + protected string $table, |
| 20 | + protected string $hashKey, |
| 21 | + protected int $expires = 3600, |
| 22 | + protected int $throttle = 60, |
73 | 23 | ) { |
74 | | - $this->table = $table; |
75 | | - $this->hasher = $hasher; |
76 | | - $this->hashKey = $hashKey; |
77 | | - $this->expires = $expires * 60; |
78 | | - $this->connection = $connection; |
79 | | - $this->throttle = $throttle; |
80 | 24 | } |
81 | 25 |
|
82 | 26 | /** |
|
0 commit comments