| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | protected function performChecks() |
||
| 17 | { |
||
| 18 | $token = $this->request->getHeader( |
||
| 19 | Config::get('app.authHeader') |
||
| 20 | ); |
||
| 21 | |||
| 22 | if (empty($token)) { |
||
| 23 | throw new UnAuthorizedException('Missing Header'); |
||
| 24 | } |
||
| 25 | |||
| 26 | $this->userId = $this->extractTokenInfo(current($token)); |
||
| 27 | |||
| 28 | if (empty($this->userId)) { |
||
| 29 | throw new UnAuthorizedException('Unauthorized'); |
||
| 30 | } |
||
| 31 | } |
||
| 32 | |||
| 48 | } |