0

I am trying to configure a custom user provider in synfony 2 to create a login mechanism using the DB as a storage system. Just as the tutorial says I have added this definition to my security.xml

  <provider name="in_db">
     <entity class="Nourdine\BusinessBundle\Entity\AuthenticatedUser" property="username" />
  </provider>

unfortunately this break everything and I get a nasty:

InvalidConfigurationException: Unrecognized options "entity" under "security.providers.in_db"

What am I doing wrong?

thanks

1 Answer 1

1

Which tutorial are you following?

The official cookbook is recommended: http://symfony.com/doc/current/cookbook/security/custom_provider.html

In your security config, you are giving the User class as a provider. Big difference.

Your UserProvider needs to be a service. You then provide it's service id under providers.

Unless you are trying to use the AuthenticatedUser's repository?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.