[Flow] Problem with HttpBasic auth
Mathis Hoffmann
mathis at hoffpost.de
Fri Aug 16 15:11:10 CEST 2013
Hi Jan,
thank you for your reply!
As I think using HttpBais-Auth I do not need a login form because I use
the authentication-mechanism that every browser provides
"out-of-the-box", don't I?
Cheers
Mathis
Am 14.08.2013 12:11, schrieb Jan Greth:
> Am 10.08.2013 13:01, schrieb Mathis Hoffmann:
>> Hello again,
>>
>> I just try to enable HttpBasic-Auth for my app. I have come so far that
>> my browser displays the login-window and I have created an account (that
>> I can find in the database). But entering the security credentials does
>> not affect anything. After a short time the windows comes up again.
>>
>> My configuration is as follows:
>>
>> Settings.yaml:
>> TYPO3:
>> Flow:
>> security:
>> enable: TRUE
>> authentication:
>> authenticationStrategy: oneToken
>> providers:
>> DefaultProvider:
>> provider: PersistedUsernamePasswordProvider
>> tokenClass: UsernamePasswordHttpBasic
>> entryPoint: HttpBasic
>> entryPointOptions:
>> realm: 'Bitte einloggen'
>>
>> Policy.yaml:
>> roles:
>> User: []
>>
>> resources:
>> methods:
>> allControllerMethods: 'method(HdM\Accounting\Controller\.*->.*())'
>>
>> alcs:
>> User:
>> methods:
>> allControllerMethods: GRANT
>>
>> I created the account with this snipped:
>> $identifier = 'mathis';
>> $password = 'secret';
>> $roles = array('HdM.Accounting:User');
>> $account =
>> $this->accountFactory->createAccountWithPassword($identifier, $password,
>> $roles);
>> $this->accountRepository->add($account);
>>
>> I also tried setting the provider explicitly while creation which had no
>> effect:
>> $account =
>> $this->accountFactory->createAccountWithPassword($identifier, $password,
>> $roles, 'PersistedUsernamePasswordProvider');
>>
>> In the database I find the following entry:
>> 7ffc2fbe-18ad-03c5-528b-49dbbf944fd5, , mathis, DefaultProvider,
>> bcrypt=>$2a$14$5sb1X5DlX6BHmBBonlCxIO4t0VbcLIgNaT9rVkOBuQcz4AOaSftiW,
>> 2013-08-10 11:49:14,
>>
>> Can anyone tell me what I could do to get authentication work?
>>
>> In the security log I find:
>> 13-08-10 12:44:13 1575 127.0.0.1 INFO Flow Starting
>> authentication with entry point of type
>> TYPO3\Flow\Security\Authentication\EntryPoint\HttpBasic
>> 13-08-10 12:44:16 1575 127.0.0.1 NOTICE Flow Authentication
>> failed: "Could not authenticate any token. Might be missing or wrong
>> credentials or no authentication provider matched." #1222204027
>> 13-08-10 12:44:16 1575 127.0.0.1 INFO Flow Starting
>> authentication with entry point of type
>> TYPO3\Flow\Security\Authentication\EntryPoint\HttpBasic
>> .... and so on
>>
>> I'm sure that I enter the credentials correctly. So I think the problem
>> is "or no authentication provider matched". But the provider is set
>> explicitly in the configuration...
>>
>> Any ideas?
>>
>> Cheers
>> Mathis
>
>
> Hi!
>
> Does your Login Form have the right name?
>
> <f:form action="authenticate" method="post" name="loginform">
> <label>User:</label><f:form.textbox
> name="TYPO3[Flow][Security][Authentication][Token][UsernamePassword][username]"
> /><br />
> <label>Pass:</label><f:form.password
> name="TYPO3[Flow][Security][Authentication][Token][UsernamePassword][password]"
> /><br />
> <f:form.submit value="Login" />
> </f:form>
>
> Greets,
> Jan
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
More information about the Flow
mailing list