#app/config/security.yml
security: access_denied_url: /response/access-denied encoders: FOS\UserBundle\Model\UserInterface: sha512 acl: connection: default
role_hierarchy:
#ROLE_ADMIN: ROLE_USER
#ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
providers:
fos_userbundle:
id: fos_user.user_provider.username_email
firewalls:
main:
pattern: ^/
form_login:
provider: fos_userbundle
csrf_provider: form.csrf_provider
failure_handler: authentication_handler
success_handler: authentication_handler
logout:
path: fos_user_security_logout
target: /logout
success_handler: authentication_handler
anonymous: true
access_control:
#- { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https}
- { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https**}**
#- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
#- { path: ^/admin/, role: ROLE_ADMIN }
- { path: ^/$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
hi i'm new to symfony and i'm trying to logout the user but the route is not working kindly help
security.xml ---fosuserbudle config
http://ift.tt/1npbUx2">
<route id="fos_user_security_login" pattern="/login">
<default key="_controller">FOSUserBundle:Security:login</default>
</route>
<route id="fos_user_security_check" pattern="/login_check">
<default key="_controller">FOSUserBundle:Security:check</default>
<requirement key="_method">POST</requirement>
</route>
<route id="fos_user_security_logout" pattern="/logout">
<default key="_controller">FOSUserBundle:Security:logout</default>
</route>
app/config/routing.yml file
fos_user_security: resource: "@FOSUserBundle/Resources/config/routing/security.xml"
No comments:
Post a Comment