# |
Jul 4th 2017, 23:12 |
angelxmoreno |
yes, it fails to tell me what it is |
# |
Jul 4th 2017, 23:08 |
phpnut |
Not working? |
# |
Jul 4th 2017, 23:07 |
angelxmoreno |
my CakeCamp is not working @phpnut |
# |
Jul 4th 2017, 22:43 |
NobbyNobbs |
but is this the intended behavior, or is it a configuration oversight on my part? I'm referring to including the token both in the headers and the body |
# |
Jul 4th 2017, 22:43 |
NobbyNobbs |
I can add a field called _Token to the data, no problem |
# |
Jul 4th 2017, 22:42 |
NobbyNobbs |
uhmmm a small question: I'm sending some data via JSON. I have added the X-CSRF-Token header, and it accepts the request. But upon getData, it throws error 400 "'_Token' was not found in request data." |
# |
Jul 4th 2017, 21:47 |
jeremyharris |
Glad you got it figured out @laureano ! |
# |
Jul 4th 2017, 21:40 |
laureano |
@jeremyharris Thank you for your support! I finally made a change to set a different sql_mode allowing zero dates. I used this as reference https://github.com/cakephp/cakephp/issues/9918 |
# |
Jul 4th 2017, 21:33 |
jigzat |
thanks I will look into it and come back |
# |
Jul 4th 2017, 21:32 |
cleptric |
Maybe this could help |
# |
Jul 4th 2017, 21:32 |
cleptric |
https://book.cakephp.org/3.0/en/controllers/components.html#aliasing-components |
# |
Jul 4th 2017, 21:32 |
jigzat |
yes |
# |
Jul 4th 2017, 21:31 |
cleptric |
And then you setup the same component twice |
# |
Jul 4th 2017, 21:31 |
cleptric |
I guess that your normal AppController is also initialized |
# |
Jul 4th 2017, 21:31 |
jigzat |
no, I haven't look into that |
# |
Jul 4th 2017, 21:30 |
jigzat |
but if I change the API's appcontroller configuration to digest the website works but of course the API doesnt |
# |
Jul 4th 2017, 21:30 |
cleptric |
Hm, I don’t now right away why this happens. Have you tried to put your api in a plugin? |
# |
Jul 4th 2017, 21:30 |
jigzat |
yes |
# |
Jul 4th 2017, 21:30 |
cleptric |
The api uses the prefix routing option I guess? |
# |
Jul 4th 2017, 21:29 |
jigzat |
though the API works |
# |
Jul 4th 2017, 21:29 |
jigzat |
and the log shows JWTAuthentication as the last step |
# |
Jul 4th 2017, 21:28 |
jigzat |
If I keep both controllers with their corresponding authentication, when I access the website I get an authentication error |
# |
Jul 4th 2017, 21:27 |
cleptric |
Ok, do you get any errors? |
# |
Jul 4th 2017, 21:26 |
jigzat |
they both use Cake\Controller\Controller |
# |
Jul 4th 2017, 21:24 |
cleptric |
Do both `AppController` inherit from the Cake Core `Controller` or is the API one inheriting from your apps `AppController`? |
# |
Jul 4th 2017, 21:23 |
jigzat |
is it posible to use both simultaneosly ? |
# |
Jul 4th 2017, 21:22 |
jigzat |
the former has the digest configuration and the latter uses JWT, but it looks like they are conflicting |
# |
Jul 4th 2017, 21:22 |
jigzat |
so I have the default appcontroller at the controller folder and a subfolder API with it's own AppController |
# |
Jul 4th 2017, 21:21 |
jigzat |
but I wanted to use digest for the "normal" website |
# |
Jul 4th 2017, 21:20 |
jigzat |
I have been tinkering with cakephp for a while I have a basic test API that uses ADmad JWT |
# |
Jul 4th 2017, 21:19 |
cleptric |
No, just ask :slightly_smiling_face: |
# |
Jul 4th 2017, 21:19 |
jigzat |
I'm not sure if it will be consider rude to ask again here |
# |
Jul 4th 2017, 21:19 |
jigzat |
I already posted the question in the cakephp forums |
# |
Jul 4th 2017, 21:18 |
jigzat |
I wanted to ask someone about cakephp |
# |
Jul 4th 2017, 21:18 |
jigzat |
I was in a traffic jam |
# |
Jul 4th 2017, 21:18 |
jigzat |
dont worry I'm not a maniac ;) |
# |
Jul 4th 2017, 21:01 |
igreat |
Good day all Would like to if there a way I can validate buildRules without saving the data or outside the save method |
# |
Jul 4th 2017, 20:34 |
cleptric |
Seems to be a good idea too :slightly_smiling_face: |
# |
Jul 4th 2017, 20:33 |
jeremyharris |
@cleptric the error page might be able to read the route and check the route class to find common mistakes between underscore/dashed |
# |
Jul 4th 2017, 20:32 |
jeremyharris |
check your routes file to see the fallback class |
# |
Jul 4th 2017, 20:32 |
jeremyharris |
oh that’s a routing thing. Perhaps you want /longerm-properties/view/x |