Skip to content

Commit

Permalink
fix namespace 问题
Browse files Browse the repository at this point in the history
  • Loading branch information
edenleung committed Jan 9, 2020
1 parent 5b3aa20 commit 4d94838
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/BearerToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace xiaodi;

use think\App;
use xiaodi\Exception\Exception;
use xiaodi\Exception\JwtException;

class BearerToken
{
Expand All @@ -19,7 +19,7 @@ public function getToken()
$authorization = $this->request->header('authorization');

if (strpos($authorization, 'Bearer ') !== 0) {
throw new Exception('获取Token失败.');
throw new JwtException('获取Token失败.');
}

return substr($authorization, 7);
Expand Down

0 comments on commit 4d94838

Please sign in to comment.