Skip to content

Commit 4d94838

Browse files
committed
fix namespace 问题
1 parent 5b3aa20 commit 4d94838

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/BearerToken.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace xiaodi;
44

55
use think\App;
6-
use xiaodi\Exception\Exception;
6+
use xiaodi\Exception\JwtException;
77

88
class BearerToken
99
{
@@ -19,7 +19,7 @@ public function getToken()
1919
$authorization = $this->request->header('authorization');
2020

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

2525
return substr($authorization, 7);

0 commit comments

Comments
 (0)