1 | <?php |
||
5 | abstract class JWTProvider |
||
6 | { |
||
7 | /** |
||
8 | * @var string |
||
9 | */ |
||
10 | protected $secret; |
||
11 | |||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $algo; |
||
16 | |||
17 | /** |
||
18 | * @param string $secret |
||
19 | * @param string $algo |
||
20 | */ |
||
21 | 12 | public function __construct($secret, $algo = 'HS256') |
|
26 | |||
27 | /** |
||
28 | * Set the algorithm used to sign the token |
||
29 | * |
||
30 | * @param string $algo |
||
31 | * @return self |
||
32 | */ |
||
33 | 3 | public function setAlgo($algo) |
|
39 | |||
40 | /** |
||
41 | * Get the algorithm used to sign the token |
||
42 | * |
||
43 | * @return string |
||
44 | */ |
||
45 | 3 | public function getAlgo() |
|
49 | } |
||
50 |