Conditions | 4 |
Paths | 5 |
Total Lines | 19 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
26 | public function __construct($options) |
||
27 | { |
||
28 | if (isset($options['jwt'])) |
||
29 | { |
||
30 | $this->is_valid_using($options); |
||
31 | $this->is_present_option($options, 'UAPAY_pubkey'); |
||
32 | $this->is_present_option($options, 'our_privkey'); |
||
33 | |||
34 | // todo replace with: |
||
35 | // $this->is_present_option($options, 'algorithm'); |
||
36 | // in next major version |
||
37 | if (empty($options['jwt']['algorithm'])) { |
||
38 | $options['jwt']['algorithm'] = 'RS512'; |
||
39 | } |
||
40 | if (empty($options['jwt']['key_type'])) { |
||
41 | $options['jwt']['key_type'] = Key::KEYS_IN_FILES; |
||
42 | } |
||
43 | |||
44 | $this->jwt = $options['jwt']; |
||
45 | } |
||
88 |