Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
mathieu
technobel.sf
Commits
0815c85e
Commit
0815c85e
authored
Jul 12, 2018
by
Mat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[résolu] le jwt token était défaillant, je l'ai regénéré !
parent
47371563
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
0ne/orig/ajax/index4.html
0ne/orig/ajax/index4.html
+1
-1
src/Api2Bundle/Controller/BrasserieController.php
src/Api2Bundle/Controller/BrasserieController.php
+2
-2
No files found.
0ne/orig/ajax/index4.html
View file @
0815c85e
...
...
@@ -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
'
));
}
}
});
...
...
src/Api2Bundle/Controller/BrasserieController.php
View file @
0815c85e
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment