Skip to content

Commit

Permalink
Fix for issue laravel#293
Browse files Browse the repository at this point in the history
  • Loading branch information
plokko authored Mar 3, 2017
1 parent 5d0f87f commit e68497f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Http/Middleware/CreateFreshApiToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Laravel\Passport\Http\Middleware;

use Closure;
use Illuminate\Http\Response;
use Symfony\Component\HttpFoundation\Response;
use Laravel\Passport\Passport;
use Laravel\Passport\ApiTokenCookieFactory;

Expand Down Expand Up @@ -78,7 +78,7 @@ protected function shouldReceiveFreshToken($request, $response)
*/
protected function requestShouldReceiveFreshToken($request)
{
return $request->isMethod('GET') && $request->user($this->guard);
return in_array($request->getMethod(), array('GET', 'POST', 'PUT')) && $request->user($this->guard);
}

/**
Expand Down

0 comments on commit e68497f

Please sign in to comment.