Last active
December 7, 2015 02:42
-
-
Save ymhuang0808/65b87ab689c8ed19c44b to your computer and use it in GitHub Desktop.
JWT-Auth for refreshing token
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$api = app('Dingo\Api\Routing\Router'); | |
// Version 1.0 | |
$api->version('v1.0', function ($api) { | |
// ignore other endpoints | |
/* | |
|-------------------------------------------------------------------------- | |
| Refresh token endpoint | |
|-------------------------------------------------------------------------- | |
| | |
| Refresh a new JWT | |
| | |
*/ | |
$api->group(['middleware' => ['jwt.refresh']], function ($api) { | |
// For refresh token | |
$api->post('auth/refresh_token', function () { return response(null, 204); }); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment