# |
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... |
# |
Jun 28th 2017, 15:34 |
jarard |
i guess it's a matter of taste, more to the point though I'm not clear why the redirect for login goes to admin/users/login when in my app controller it is set to users/login |
# |
Jun 28th 2017, 15:33 |
jarard |
becuase it gives access to admin |
# |
Jun 28th 2017, 15:33 |
neon1024 |
It’ll really depend on where you controller is |
# |
Jun 28th 2017, 15:33 |
hmic |
why not? |
# |
Jun 28th 2017, 15:33 |
neon1024 |
Well you could visit /users/login just fine |
# |
Jun 28th 2017, 15:33 |
jarard |
I don't think it should be |
# |
Jun 28th 2017, 15:33 |
hmic |
jarard, what you think jarad? :O |
# |
Jun 28th 2017, 15:32 |
jarard |
when using admin prefix is it correct for the login to be in Admin/Users/ |
# |
Jun 28th 2017, 15:22 |
elboletaire |
yeah, orange is the new black :see_no_evil: |
# |
Jun 28th 2017, 15:04 |
chris-andre |
oh. notBlank() is the new notEmpty() :slightly_smiling_face: Good to know |
# |
Jun 28th 2017, 15:03 |
jeremyharris |
no worries, good luck :slightly_smiling_face: |
# |
Jun 28th 2017, 15:03 |
chris-andre |
Thanks anyway @jeremyharris . |
# |
Jun 28th 2017, 15:01 |
chris-andre |
That did not work. I need to do some other magic :P |
# |
Jun 28th 2017, 14:57 |
chris-andre |
That is just a quick test away from the answer. Ill test. |
# |
Jun 28th 2017, 14:56 |
chris-andre |
Allright, so if requirePresence fails, but the next rule is true, the property will go trough the validation? |
# |
Jun 28th 2017, 14:53 |
jeremyharris |
at least one of them must be posted though |
# |
Jun 28th 2017, 14:52 |
jeremyharris |
use requirePresence if you want it to fail if no property is posted. then if it is, it will continue down the list of rules for that key |
# |
Jun 28th 2017, 14:51 |
jeremyharris |
that is true |
# |
Jun 28th 2017, 14:51 |
chris-andre |
Yes. But it seems like the rule is not triggered if the property isn't posted. |
# |
Jun 28th 2017, 14:49 |
jeremyharris |
you’re on the right track then I think |