1 | <?php |
||
13 | class JWTConfig extends AbstractConfig |
||
14 | { |
||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | private $privateKey; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | private $publicKey; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | public $id; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | public $issuer; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | public $audience; |
||
39 | |||
40 | /** |
||
41 | * @var integer |
||
42 | */ |
||
43 | public $expiration; |
||
44 | |||
45 | /** |
||
46 | * Sets the private key location. |
||
47 | * |
||
48 | * @param string $key The private key location. |
||
49 | * @throws InvalidArgumentException If the argument is not a string. |
||
50 | * @return self |
||
51 | */ |
||
52 | public function setPrivateKey($key) |
||
62 | |||
63 | /** |
||
64 | * Retrieves the private key location. |
||
65 | * |
||
66 | * @return string |
||
67 | */ |
||
68 | public function privateKey() |
||
72 | |||
73 | /** |
||
74 | * Sets the public key location. |
||
75 | * |
||
76 | * @param string $key The public key location. |
||
77 | * @throws InvalidArgumentException If the argument is not a string. |
||
78 | * @return self |
||
79 | */ |
||
80 | public function setPublicKey($key) |
||
90 | |||
91 | /** |
||
92 | * Retrieves the public key location. |
||
93 | * |
||
94 | * @return string |
||
95 | */ |
||
96 | public function publicKey() |
||
100 | |||
101 | /** |
||
102 | * Sets the private key location. |
||
103 | * |
||
104 | * @param string $id The private key location. |
||
105 | * @throws InvalidArgumentException If the argument is not a string. |
||
106 | * @return self |
||
107 | */ |
||
108 | public function setId($id) |
||
118 | |||
119 | /** |
||
120 | * Retrieves the private key location. |
||
121 | * |
||
122 | * @return string |
||
123 | */ |
||
124 | public function id() |
||
128 | |||
129 | /** |
||
130 | * Sets the token issuer |
||
131 | * |
||
132 | * @param string $issuer The private key location. |
||
133 | * @throws InvalidArgumentException If the argument is not a string. |
||
134 | * @return self |
||
135 | */ |
||
136 | public function setIssuer($issuer) |
||
146 | |||
147 | /** |
||
148 | * Retrieves the token issuer. |
||
149 | * |
||
150 | * @return string |
||
151 | */ |
||
152 | public function issuer() |
||
156 | |||
157 | /** |
||
158 | * Sets the token audience. |
||
159 | * |
||
160 | * @param string $audience The token audience. |
||
161 | * @throws InvalidArgumentException If the argument is not a string. |
||
162 | * @return self |
||
163 | */ |
||
164 | public function setAudience($audience) |
||
174 | |||
175 | /** |
||
176 | * Retrieves the token audience. |
||
177 | * |
||
178 | * @return string |
||
179 | */ |
||
180 | public function audience() |
||
184 | |||
185 | /** |
||
186 | * Sets the expiration (in seconds). |
||
187 | * |
||
188 | * @param string|integer $expiration The expiration time, in seconds. |
||
189 | * @return self |
||
190 | */ |
||
191 | public function setExpiration($expiration) |
||
196 | |||
197 | /** |
||
198 | * Retrieves the expiration time (in seconds). |
||
199 | * |
||
200 | * @return integer |
||
201 | */ |
||
202 | public function expiration() |
||
206 | } |
||
207 |