Provide login_path with arguments in security.yml for symfony2.3

435 Views Asked by At

Below given my security.yml file. In that i need to provide "twilight" as an argment.

firewalls:

    frontend:
      pattern:    /twilight/backend/.*
      provider:   fos_userbundle
      anonymous: ~          
      form_login:
          check_path: /twilight/backend/login_check
          login_path: /twilight/backend/signin
          username_parameter: _username
          password_parameter: _password
          csrf_parameter: _csrf_token
          intention: authenticate               
          post_only: true
          remember_me: true
          #use_referer: true
          always_use_default_target_path: true
          default_target_path: /twilight/backend/securepage

Someone please help...

1

There are 1 best solutions below

0
On

On your parameters.yml (or any configuration file you included or already loaded) set:

custom_path: "/twilight"

And get the custom_path variable from your security.yml file:

check_path: %custom_path%/backend/login_check