# |
Jun 28th 2017, 18:29 |
steinkel |
try using a different alias in line 22 |
# |
Jun 28th 2017, 17:56 |
chris-andre |
Any idea someone? |
# |
Jun 28th 2017, 17:55 |
chris-andre |
Can't figure out my issue with validating. My custom rule is only triggered if another rule is triggered. https://gist.github.com/chris-andre/4e6d9bda6d671feb3a529654b931fe05#file-customerstable-php-L23 |
# |
Jun 28th 2017, 17:44 |
saeideng |
try this `aclKey => 'user_type_id` |
# |
Jun 28th 2017, 17:28 |
saeideng |
for 3.x you can |
# |
Jun 28th 2017, 17:28 |
saeideng |
? |
# |
Jun 28th 2017, 17:28 |
saeideng |
jarad you need use `user_type_id` instead of `user_id` |
# |
Jun 28th 2017, 17:11 |
jarard |
I think this does it : aclModel => 'Group' |
# |
Jun 28th 2017, 17:05 |
jarard |
dereuromark - if I want to use TinyAuth for a pre-existing 2.x App is it possible to configure the Plugin to user UserTypes rather than Roles since the Users table has already uses user_type_id |
# |
Jun 28th 2017, 16:50 |
jarard |
and I don't see a folder relating to debug kit in vendor |
# |
Jun 28th 2017, 16:49 |
jarard |
odd behvior here - installed debug kit via composer but getting an error message that it is missing |
# |
Jun 28th 2017, 16:41 |
hmic |
it's not about the session, it's the cookie only. cake will handle the session if the cookie is present |
# |
Jun 28th 2017, 16:38 |
pedroseco |
what is the name of the header the $.post needs so my method knows it’s authenticated? |
# |
Jun 28th 2017, 16:37 |
jarard |
in my composer.json: "friendsofcake/crud" : "3.*", |
# |
Jun 28th 2017, 16:37 |
pedroseco |
*right. |
# |
Jun 28th 2017, 16:37 |
pedroseco |
yes you were write I can get the session |
# |
Jun 28th 2017, 16:37 |
jarard |
i just ran compser update and no in my 2.x app I am getting: Plugin Crud could not be found. |
# |
Jun 28th 2017, 16:35 |
hmic |
it should just work by default IMHO |
# |
Jun 28th 2017, 16:34 |
pedroseco |
I’ll try that approach. thanks |
# |
Jun 28th 2017, 16:34 |
pedroseco |
I see your point |
# |
Jun 28th 2017, 16:34 |
hmic |
just check in the network debugging tab of your browser. if it's missing, you need to make sure the JS sends it... |
# |
Jun 28th 2017, 16:33 |
hmic |
you should do nothing. the AJAX request the JS sends will have the correct cookie anyways |
# |
Jun 28th 2017, 16:33 |
pedroseco |
so I should just ask for the currrent session cookie? |
# |
Jun 28th 2017, 16:32 |
hmic |
the JS can easily - and the browser would by default i think, send the auth cookie back. no problems at all |
# |
Jun 28th 2017, 16:32 |
pedroseco |
just not sure on what this line: $app = require_once ‘/path/to/laravel/bootstrap/start.php’; can transalte into cakephp file tree |
# |
Jun 28th 2017, 16:31 |
pedroseco |
is_authorized, in this case. |
# |
Jun 28th 2017, 16:31 |
pedroseco |
for example they load the main class and listen to a true/false for is_authenticated method |
# |
Jun 28th 2017, 16:31 |
hmic |
just make it do so! |
# |
Jun 28th 2017, 16:30 |
hmic |
so it can send the neccessary auth cookie without any problems |
# |
Jun 28th 2017, 16:30 |
pedroseco |
yes |
# |
Jun 28th 2017, 16:30 |
pedroseco |
https://gist.github.com/frzsombor/ddd0e11f93885060ef35 |
# |
Jun 28th 2017, 16:30 |
hmic |
so that filemanager is JS and hosted on the same webserver as your project of course? |
# |
Jun 28th 2017, 16:30 |
pedroseco |
i found a gist for laravel as the solution for this kind of thing, and was trying to read it and apply it into cake. |
# |
Jun 28th 2017, 16:29 |
hmic |
maybe you tell us what you like to do first, so we can think of different options |
# |
Jun 28th 2017, 16:29 |
pedroseco |
I added a external filemanager project into my cake plugin, and that filemanger needs to $.post a couple of info into my plugin, wich needs standart auth |
# |
Jun 28th 2017, 16:29 |
hmic |
you don't even need to change your own apps config - just create a JWT with an asymetric cipher, hand the pubkey to the other party and make sure all the infos needed are already added as additional payload to the JWT - if it's private information, you need to implement some API that spits out that info when given the JWT |
# |
Jun 28th 2017, 16:28 |
pedroseco |
It does seem too complicated for what I’m using it for. Probably should look from another angle |
# |
Jun 28th 2017, 16:27 |
pedroseco |
I could possibly use JWT yes.. |
# |
Jun 28th 2017, 16:27 |
hmic |
or just use JWT instead :p |
# |
Jun 28th 2017, 16:26 |
jeremyharris |
the external app will need to be able to connect to the respective db or cache of course |
# |
Jun 28th 2017, 16:26 |
jeremyharris |
use db or cache sessions :slightly_smiling_face: |