# |
Dec 10th 2019, 09:37 |
jotpe |
so then it's `composer require cakephp/authentication` |
# |
Dec 10th 2019, 09:36 |
gianmarxgagliardi |
to install cake I go to the www of wamp launch the command `composer self-update andand composer create-project --prefer-dist cakephp / app cms` and do it all |
# |
Dec 10th 2019, 09:35 |
challgren |
so bootstrap and middleware arent being called |
# |
Dec 10th 2019, 09:35 |
jotpe |
So @gianmarxgagliardi copy this to your Application.php if you want to do copy/paste: https://raw.githubusercontent.com/julianpollmann/cakephp-auth/master/src/Application.php |
# |
Dec 10th 2019, 09:35 |
challgren |
Inside the docblock too |
# |
Dec 10th 2019, 09:35 |
jotpe |
Ah, yeah. |
# |
Dec 10th 2019, 09:35 |
challgren |
`@@ -96,4 +106,39 @@ protected function bootstrapCli()` |
# |
Dec 10th 2019, 09:34 |
challgren |
`@@ -76,7 +83,10 @@ public function middleware($middlewareQueue)` |
# |
Dec 10th 2019, 09:34 |
challgren |
`@@ -36,6 +42,7 @@ public function bootstrap()` |
# |
Dec 10th 2019, 09:34 |
challgren |
@jotpe what about the diffs in his pastbin? |
# |
Dec 10th 2019, 09:34 |
jotpe |
Basically it's the same way how to install cakephp: https://book.cakephp.org/3/en/quickstart.html#getting-cakephp |
# |
Dec 10th 2019, 09:34 |
gianmarxgagliardi |
win 7 |
# |
Dec 10th 2019, 09:34 |
gianmarxgagliardi |
sorry |
# |
Dec 10th 2019, 09:34 |
gianmarxgagliardi |
win 10 |
# |
Dec 10th 2019, 09:33 |
jotpe |
Maybe it's only composer, i don't know about your system |
# |
Dec 10th 2019, 09:33 |
gianmarxgagliardi |
I went to the project folder which I called "testlogin" and gave it that command |
# |
Dec 10th 2019, 09:32 |
gianmarxgagliardi |
`Could not open input file: composer.phar` |
# |
Dec 10th 2019, 09:31 |
jotpe |
yes, to the folder, where your composer.json file is. You need to add the plugin as a dependency to composer https://en.wikipedia.org/wiki/Composer_(software) |
# |
Dec 10th 2019, 09:30 |
gianmarxgagliardi |
I go to my project folder and put `php composer.phar require cakephp/authentication`? |
# |
Dec 10th 2019, 09:28 |
jotpe |
via command line in your root folder |
# |
Dec 10th 2019, 09:27 |
jotpe |
you need to do something like this: `php composer.phar require cakephp/authentication` |
# |
Dec 10th 2019, 09:25 |
gianmarxgagliardi |
yes I noticed I deleted line 34 and now it gives me: *`Fatal error: Interface 'Authentication\AuthenticationServiceProviderInterface' not found in C:\wamp64\www\testlogin\src\Application.php on line _35_`* |
# |
Dec 10th 2019, 09:25 |
jotpe |
`*class* Application *extends* BaseApplication` `*class* Application *extends* BaseApplication implements AuthenticationServiceProviderInterface` this doesn't make much sense |
# |
Dec 10th 2019, 09:24 |
gianmarxgagliardi |
I'm sorry I'm not understanding |
# |
Dec 10th 2019, 09:22 |
gianmarxgagliardi |
:,'( |
# |
Dec 10th 2019, 09:21 |
challgren |
*raises hand* I know I know! |
# |
Dec 10th 2019, 09:21 |
jotpe |
Well...that's obvious? :) |
# |
Dec 10th 2019, 09:20 |
gianmarxgagliardi |
https://pastebin.com/wxsNmFD9 |
# |
Dec 10th 2019, 09:19 |
jotpe |
Paste it in a pastebin or github gitst plz |
# |
Dec 10th 2019, 09:19 |
jotpe |
So what's in line 35? |
# |
Dec 10th 2019, 09:19 |
gianmarxgagliardi |
I made a copy and paste of the Application.php file |
# |
Dec 10th 2019, 09:18 |
gianmarxgagliardi |
@jotpe give me this *`( ! ) Parse error: syntax error, unexpected 'class' (T_CLASS), expecting '{' in C:\wamp64\www\testlogin\src\Application.php on line _35_`* |
# |
Dec 10th 2019, 09:14 |
jotpe |
https://book.cakephp.org/3/en/development/application.html |
# |
Dec 10th 2019, 09:14 |
jotpe |
src/Application.php |
# |
Dec 10th 2019, 09:13 |
gianmarxgagliardi |
@jotpe |
# |
Dec 10th 2019, 09:11 |
gianmarxgagliardi |
nameCmsCake>vendor>composer>composer>src>ComposerConsole>Application.php ? |
# |
Dec 10th 2019, 09:09 |
gianmarxgagliardi |
Application.php where I find it ? |
# |
Dec 10th 2019, 09:08 |
gianmarxgagliardi |
where I find that file in the cake structure |
# |
Dec 10th 2019, 09:08 |
gianmarxgagliardi |
I didn't understand how I implement it |
# |
Dec 10th 2019, 09:04 |
jotpe |
@gianmarxgagliardi `$this->Auth->identify();` uses the AuthComponent `$this->Authentication->getResult();` the Middleware of the Authentication Plugin. You need to implement the AuthenticationService in your `Application.php` as in this commit https://github.com/julianpollmann/cakephp-auth/commit/9dbc3ac7d83c7be078e1579d1e9b9f94cf313717 |
# |
Dec 10th 2019, 09:01 |
jotpe |
Morning! |