License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You can customize the url parameter of each route.
N.B.: You must have a @homepage routing rule (used when a user sign out)

These routes are automatically registered by the plugin if the module sfGuardAuth
is enabled unless you defined sf_guard_plugin_routes_register to false
in the app.yml configuration file:

all:
sf_guard_plugin:
routes_register: false

Secure some modules or your entire application in security.yml

default:
is_secure: on

You're done. Now, if you try to access a secure page, you will be redirected
to the login page.
If you have loaded the default fixture file, try to login with admin as
username and admin as password.

Manage your users, permissions and groups

To be able to manage your users, permissions and groups, sfGuardPlugin comes
with 3 modules that can be integrated in your backend application.
These modules are auto-generated thanks to the symfony admin generator.

Super administrator flag

sfGuardPlugin has a notion of super administrator. A user that is a super
administrator bypasses all credential checks.

The super administrator flag cannot be set on the web, you must set the flag
directly in the database or use the pake task:

symfony promote-super-admin admin

Validators

sfGuardPlugin comes with a validator that you can use in your modules:
sfGuardUserValidator.

This validator is used by the sfGuardAuth module to validate a user and
password and automatically signin the user.

Customize the sfGuardUser model

The sfGuardUser model is quite simple. There is no email or first_name
or birthday columns. As you cannot add methods to the class, the sfAuthPlugin
gives you the possibility to define a user profile class.

By default, sfGuardUser looks for a sfGuardUserProfile class.

Here is a simple example of a sfGuardProfile class that you can add to schema.yml:

Check the user password with an external method

If you don't want to store the password in the database because you already
have a LDAP server, a .htaccess file or if you store your passwords in another
table, you can provide your own checkPassword callable (static method or
function) in app.yml:

When symfony will call the $this->getUser()->checkPassword() method, it will
call your method or function. Your function must takes 2 parameters, the first
one is the username and the second one is the password. It must returns true
or false. Here is a template for such a function: