Search code examples
phpsymfony1symfony-1.4sfguard

Symfony 1.4 sf auth routing


Is there any idea how to write sfAuth routing for symfony 1.4? which is similar like

homepage:
 url:   /
 param: { module: default, action: index }

default_index:
  url:   /:module
  param: { action: index }

default:
  url:   /:module/:action/*

Solution

  • To write sfAuth for symfony is simple, just follow the similar way you define default routing

    sf_guard_signin:
     url:   /login
     param: { module: sfGuardAuth, action: signin }
    
    sf_guard_signout:
     url:   /logout
     param: { module: sfGuardAuth, action: signout }
    
    sf_guard_password:
     url:   /request_password
     param: { module: sfGuardAuth, action: password }
    

    Hope this might give you some insight.