A Token was not found in the SecurityContext.
Closed this issue · 1 comments
joelurraco commented
I am using Symfony 2.3.24 and the 1.2.0 version of this bundle.
I installed and configured the bundle and the firewall, but when I try to enter the secured area, the following exception is thrown:
A Token was not found in the SecurityContext.
500 Internal Server Error - AuthenticationCredentialsNotFoundException
This is my security.yml file, I want all pages to be secured:
security:
encoders:
Kayue\WordpressBundle\Entity\User:
id: kayue_wordpress.security.encoder.phpass
role_hierarchy:
ROLE_ADMIN: ROLE_USER
ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
providers:
wordpress:
entity: { class: Kayue\WordpressBundle\Entity\User, property: username }
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
secured_area:
pattern: ^/
kayue_wordpress: ~
access_control:
- { path: ^/, roles: ROLE_ADMIN }
kayue commented
@joelurraco This usually happens when your route is not protected by firewall.
Do you have the complete backtrace log?