Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
edenleung committed May 24, 2021
1 parent 1aab7ee commit 7ea4b73
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# jwt-auth

## isntall
## install

```bash

Expand Down Expand Up @@ -30,6 +30,7 @@ $options = [
'refresh_code' => 50002,
'iss' => 'client.tant',
'aud' => 'server.tant',
'user_model' => \app\common\model\User::class
];

$auth = new JwtAuth(new Config($options));
Expand All @@ -55,4 +56,6 @@ var_dump($auth->getVerifyToken()->claims()->get('jti'));
// 解析 token
var_dump($auth->parseToken($token));

// 获取效验后的用户模型对象
var_dump($auth->getUser());
```

0 comments on commit 7ea4b73

Please sign in to comment.