Log message #4045813

# At Username Text
# 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:
# Jun 28th 2017, 16:26 pedroseco too bad… so how should I be getting it?
# Jun 28th 2017, 16:25 jeremyharris that session is created from the cookie, which is not shared
# Jun 28th 2017, 16:25 jeremyharris no
# Jun 28th 2017, 16:25 pedroseco can a $_SESSION[‘Auth’] work?
# Jun 28th 2017, 16:24 jeremyharris use db or cache based sessions
# Jun 28th 2017, 16:24 pedroseco how can I share cakephp session and check authentication from external project?
# Jun 28th 2017, 16:24 pedroseco hi guys!
# Jun 28th 2017, 15:51 jarard I decided ot stick with /admin/users/login afterall :)
# Jun 28th 2017, 15:51 jarard it means the Users controller (which in my case is only concerned with admins) can be tucked away there and only delas with Auth stuff
# Jun 28th 2017, 15:50 jarard I like the way admin routing in v3 gives the option to split the controller into the Admin/folder
# Jun 28th 2017, 15:46 jarard thanks
# Jun 28th 2017, 15:40 hmic or admin => false, prefix => null - i never can remember that bit
# Jun 28th 2017, 15:39 hmic you can add prefix => false to the loginAction on the auth setup, if you like to
# Jun 28th 2017, 15:38 neon1024 As I prefer /users/login for logging into the admin
# Jun 28th 2017, 15:38 neon1024 More than likely it’s because you are working in the admin prefix when your session times out, so CakePHP redirects you to /users/login, but because the prefix is ‘sticky’ it remains which creates /admin/users/login
# Jun 28th 2017, 15:35 hmic so if you duplicate the logic in the admin prefix, thats what you get
# Jun 28th 2017, 15:34 hmic yes, like /users/login gives access to the not admin site...