php - Symfony2 anonymous and authenticated on same route -
i have liked in symfony2 "v2.1" page can accessed without authentication , authenticated.
i used anonymous, here token of authenticated user anonymous , not proper token.
does have solution
as mentioned in security:
anonymous users technically authenticated, meaning isauthenticated() method of anonymous user object homecoming true.
//if want mypage accessible security: firewalls: secured_area: pattern: ^/ anonymous: ~ access_control: - { path: ^/mypage, roles: is_authenticated_anonymously }
if remove anonymous key, firewall create user authenticate immediately.
php symfony2 symfony-2.1
No comments:
Post a Comment