Skip to content

Instantly share code, notes, and snippets.

@arghav
Created December 6, 2010 10:06
Show Gist options
  • Select an option

  • Save arghav/730091 to your computer and use it in GitHub Desktop.

Select an option

Save arghav/730091 to your computer and use it in GitHub Desktop.
$container->loadFromExtension('security', 'config', array(
'provider' => array(
'main' => array(
'password_encoder' => 'sha1',
'document' => array(
'class' => 'Application/BlogBundle/Document/User',
'property' => 'username'
)
)),
'firewalls' => array(
'admin' => array(
'form_login' => array(
'check_path' => '/login_check',
'login_path' => '/login',
),
'anonymous' => true,
'logout' => true,
),
),
'access_control' => array(
array('path' => '/admin/.*', 'role' => 'IS_AUTHENTICATED_FULLY'),
array('path' => '/.*', 'role' => 'IS_AUTHENTICATED_ANONYMOUSLY'),
),
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment