title: Symfony2, FOS userbundle, Full authentication is required to access this resource
body: <p>I use the FOSuserbunble, everything was working fine and now for the
  app_dev.php/login
  I have a "Full authentication is required to access this resource."
   500 Internal Server Error - InsufficientAuthenticationException
  1 linked Exception: AccessDeniedException »</p>
  
  <p>My security.yml is</p>
  
  <pre><code># you can read more about security in the related section of the documentation
  </code></pre>
  
  <h1><a href="http://symfony.com/doc/current/book/security.html" rel="nofollow">http://symfony.com/doc/current/book/security.html</a></h1>
  
  <p>security:
      encoders:
          OandP\UserBundle\Entity\User: sha512</p>
  
  <pre><code># http://symfony.com/doc/current/book/security.html#hierarchical-roles
  role_hierarchy:
      ROLE_ADMIN:       [ROLE_CONCIERGE]
      ROLE_SUPER_ADMIN: [ROLE_CONCIERGE, ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
  
  # http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers
  providers:
      fos_userbundle:
          id: fos_user.user_provider.username
  
  # the main part of the security, where you can set up firewalls
  # for specific sections of your app
  firewalls:
      # … le pare-feu « dev »
      # Firewall principal pour le reste de notre site
      dev:
          pattern:  ^/(_(profiler|wdt)|css|images|js|ws)/
          security: false
  
      main_login:
          pattern:   ^/login$
          anonymous: true
      main_resettingRequest:
          pattern:   /resetting/request$
          anonymous: true
      main_resettingSendEmailt:
          pattern:   /resetting/send-email$
          anonymous: true
      main_resettingCheckEmail:
          pattern:   /resetting/check-email$
          anonymous: true
      main:
          pattern:        ^/
          anonymous:      false
          provider:       fos_userbundle
          form_login:
              login_path: /login
              check_path: /login_check
              csrf_provider: form.csrf_provider
          logout:
              path:       /logout
              target:     /
              invalidate_session: false
          remember_me:
              key:        %secret%
  
  
  
  # with these settings you can restrict or allow access for different parts
  # of your application based on roles, ip, host or methods
  # http://symfony.com/doc/current/book/security.html#security-book-access-control-matching-options
  access_control:
      #- { path: ^/members/hello, roles: IS_AUTHENTICATED_ANONYMOUSLY }
  </code></pre>
  
  <p>If someone has an idea
  Thank you so much for help</p>