Skip to content

Instantly share code, notes, and snippets.

@ymhuang0808
Last active December 7, 2015 02:42
Show Gist options
  • Save ymhuang0808/65b87ab689c8ed19c44b to your computer and use it in GitHub Desktop.
Save ymhuang0808/65b87ab689c8ed19c44b to your computer and use it in GitHub Desktop.
JWT-Auth for refreshing token
$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