[FLOW3-general] Authentication process

Robin Lehrmann role at vkf-renzel.de
Mon Sep 24 09:15:55 CEST 2012


On 24.09.2012 09:13, Federico Bernardin wrote:
> Hi guys,
> I have just created my first authentication process, using PersistedUsernamePasswordProvider.
> I created a controller that extends AuthenticationController, an action and its templates named login and in the template put the code from online manual:
> <form action="/firsttest/standard/authenticate" method="post" name="loginform">
>                  <input type="text" id="username"
>                          name="__authentication[TYPO3][FLOW3][Security][Authentication][Token][UsernamePassword][username]"
>                          value="" tabindex="1" />
>                  <input type="password" id="password"
>                          name="__authentication[TYPO3][FLOW3][Security][Authentication][Token][UsernamePassword][password]"
>                          value="" tabindex="2" />
>                  <input type="submit" value="Login" tabindex="3" />
>              </form>
>
> Then I created a template for authenticate action but FLOW3 always write:
>
> authenticateAction
>
> Wrong credentials.
>
> Before I created a user with this code:
> public function newaccountAction(){
>          $identifier = 'test';
>          $password = 'test';
>          $roles = array('Administrator');
>          $authenticationProviderName = 'DefaultProvider';
>
>          $account = $this->accountFactory->createAccountWithPassword($identifier, $password, $roles, $authenticationProviderName);
>          $this->accountRepository->add($account);
>
>          // add a message and redirect to the login form
>              //$this->flashMessageContainer->addMessage('Account created. Please login.');
>          $this->redirect('index');
>      }
>
> And there is the account into db.
>
> In settings I wrote:
>   security:
>        authentication:
>         # authenticationStrategy: oneToken
>          providers:
>            DefaultProvider:
>              provider: PersistedUsernamePasswordProvider
>
>
> What am I doing wrong?
>
> Thanks
> Federico
> _______________________________________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/f
Hey, Federico

show your authenticateAction() method please


More information about the FLOW3-general mailing list