Skip to content

Instantly share code, notes, and snippets.

@Shapit0
Created December 3, 2013 17:15
Show Gist options
  • Save Shapit0/7773282 to your computer and use it in GitHub Desktop.
Save Shapit0/7773282 to your computer and use it in GitHub Desktop.
$app->register(new Silex\Provider\SecurityServiceProvider(), array(
'security.firewalls' => array(
'login' => array(
'pattern' => '^/login$',
'anonymous' => true,
),
'login' => array(
'pattern' => '^/$',
'anonymous' => true,
),
'secured' => array(
'pattern' => '^/.*$',
'form' => array('login_path' => '/', 'check_path' => '/login_check'),
'users' => array(
'admin' => array('ROLE_ADMIN', '5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg=='),
),
),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment