# |
Dec 22nd 2019, 00:57 |
challgren |
Plus I prefer CakeDC/Users as it has everything I need built in |
# |
Dec 22nd 2019, 00:54 |
challgren |
Yeah thats why Im holding off for a bit. The docs seem really incomplete and plus for the sites I build a lot of plugins dont support 4.x yet |
# |
Dec 22nd 2019, 00:52 |
luizcmarin |
I'm doing it step by step for the third time, following the tutorial and making corrections to it. It's hard ... |
# |
Dec 22nd 2019, 00:50 |
challgren |
Im not sure with the new authentication plugin, I havent switched to that stuff yet |
# |
Dec 22nd 2019, 00:50 |
luizcmarin |
@challgren https://github.com/cakephp/docs/pull/6349/commits/a4f2a0da7301d15db9226ea971e080ebe54818bb |
# |
Dec 22nd 2019, 00:47 |
luizcmarin |
yes |
# |
Dec 22nd 2019, 00:46 |
challgren |
Do you have `use Authentication\Middleware\AuthenticationMiddleware` on top of your file? |
# |
Dec 22nd 2019, 00:46 |
luizcmarin |
I already added the fix |
# |
Dec 22nd 2019, 00:45 |
luizcmarin |
composer require cakephp/authentication. install 2.0.2 composer require cakephp/authentication:^2.0 install 2.0.0 |
# |
Dec 22nd 2019, 00:44 |
challgren |
Did you run `composer require cakephp/authentication:^2.0` |
# |
Dec 22nd 2019, 00:44 |
luizcmarin |
Undefined method 'configAuth'. inteliphense |
# |
Dec 22nd 2019, 00:44 |
luizcmarin |
Undefined type 'Authentication\Middleware\AuthenticationMiddleware'. - inteliphense |
# |
Dec 22nd 2019, 00:43 |
luizcmarin |
I can't get out of this point: "https://book.cakephp.org/4/en/tutorials-and-examples/cms/authentication-plugin.html#adding-login" which correct sentence to "-> add (new \ Authentication \ Middleware \ AuthenticationMiddleware ($ this-> configAuth ()));" |
# |
Dec 21st 2019, 23:49 |
luizcmarin |
I will clean and start again, third try, step by step. |
# |
Dec 21st 2019, 23:43 |
luizcmarin |
ok |
# |
Dec 21st 2019, 23:43 |
waspinator |
see if you my example app can help you get started @luizcmarin https://github.com/waspinator/cakephp-quickstart/blob/authorization/app/src/Model/Entity/User.php |
# |
Dec 21st 2019, 23:37 |
luizcmarin |
I am following the tutorial to add authentication and found some issues. https://book.cakephp.org/4/en/tutorials-and-examples/cms/authentication-plugin.html#adding-password-hashing in the example ´´ return (new DefaultPasswordHasher ()) -> hash ($ password); ´´ I get: `` Undefined type 'Authentication \ PasswordHasher \ DefaultPasswordHasher'. `` |
# |
Dec 21st 2019, 21:07 |
teruss |
Hi! Is this an appropriate place to ask for help? I'm tinkering with CakePHP and have encountered a challenge I can't solve. |
# |
Dec 21st 2019, 19:53 |
luizcmarin |
thanks you @jimbo2150 |
# |
Dec 21st 2019, 12:20 |
dsar |
Just ask ;) |
# |
Dec 21st 2019, 12:02 |
kiwi_3 |
I need your help to resolve a problem, can someone help me ? |
# |
Dec 21st 2019, 12:02 |
kiwi_3 |
Hello, it's my first on IRC of CakePHP. |
# |
Dec 21st 2019, 11:41 |
storkovo |
@kailas see the last point here https://github.com/CakeDC/users/blob/master/Docs/Documentation/Migration/4.x-5.0.md |
# |
Dec 21st 2019, 11:36 |
storkovo |
@kailas did it worked before you switched to custom User class, or starting with that plugin yet? |
# |
Dec 21st 2019, 05:33 |
kailas |
I’m trying to get CakeDC.Users working. I’m using a custom user class (SiteUsers) that i’ve set in users.php and have successfully used the users shell command to addSuperuser. i’ve created config/permissions.php, however, it doesn’t seem to be loading. i know this is the case since i put a die(‘asdfasdf’) in there and it doesnt run. I just get a “too many redirects”error to /profile . anyone know what i’m missing? |
# |
Dec 21st 2019, 00:41 |
jimbo2150 |
You are thinking of AuthComponent ( https://book.cakephp.org/4/en/controllers/components/authentication.html ) which is deprecated. The authorization and authentication plugins are the way to handle account validation and permissions in 4.0. |
# |
Dec 20th 2019, 23:27 |
luizcmarin |
no deprecated? |
# |
Dec 20th 2019, 23:27 |
luizcmarin |
it's ok ? https://book.cakephp.org/4/en/tutorials-and-examples/cms/authentication-plugin.html |
# |
Dec 20th 2019, 23:27 |
luizcmarin |
hi |
# |
Dec 20th 2019, 22:34 |
challgren |
@devito from https://book.cakephp.org/3/en/controllers/middleware.html#cross-site-request-forgery-csrf-middleware |
# |
Dec 20th 2019, 21:45 |
devito |
@adman in the router?? |
# |
Dec 20th 2019, 21:27 |
admad |
yes, use it's `whitelistCallBack()` method |
# |
Dec 20th 2019, 20:53 |
devito |
is there an easy way to disable csrf middle ware for a particular controller or controller action? |
# |
Dec 20th 2019, 20:48 |
slackebot |
!awesome |
# |
Dec 20th 2019, 20:48 |
slackebot |
Command sent from Slack by latenal: |
# |
Dec 20th 2019, 19:05 |
japerlman |
Did not know that, cool. Thanks! |
# |
Dec 20th 2019, 19:04 |
dsar |
If you don't redirect in your action, POST will be kept in various http requests |
# |
Dec 20th 2019, 19:04 |
japerlman |
I guess I could just do hidden form objects |
# |
Dec 20th 2019, 19:03 |
japerlman |
will my POST data still be in $this->request->data? |
# |
Dec 20th 2019, 19:03 |
japerlman |
I'm using the cakepdf plugin, so I think I need it on the url |
# |
Dec 20th 2019, 18:55 |
dsar |
Or do you need it in the url? |