Commit 0815c85e authored by Mat's avatar Mat

[résolu] le jwt token était défaillant, je l'ai regénéré !

parent 47371563
......@@ -53,7 +53,7 @@ $(document).ready(function()
if (!options.beforeSend) {
options.beforeSend = function(xhr) {
// avec 2 espaces entre bearer et le token !!!!
xhr.setRequestHeader('Authorization', 'bearer ' + sessionStorage.getItem('token'));
xhr.setRequestHeader('Authorization', 'bearer ' + sessionStorage.getItem('token'));
}
}
});
......
......@@ -13,8 +13,8 @@ use Symfony\Component\HttpFoundation\Request;
/**
* Class BrasserieController
*
* //@Security("has_role('ROLE_USER')")
* @package Api2Bundle\Controller
* @Security("has_role('ROLE_USER')")
*/
class BrasserieController extends FOSRestController
{
......@@ -25,7 +25,7 @@ class BrasserieController extends FOSRestController
*/
public function getAction(Request $request)
{
dump($request); die;
//dump($request); die;
return $this->getDoctrine()
->getRepository(Brasserie::class)
->findAll();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment