Answer the question
In order to leave comments, you need to log in
Silex and SecurityServiceProvider: Job firewalls
Hi again.
Faced SecurityServiceProvider in Silex. At the first step, a question arose, the answer to which was not possible to google.
To connect the SecurityServiceProvider, you need to place the following code:
$app->register(new Silex\Provider\SecurityServiceProvider(), array(
'security.firewalls' => // see below
));
Answer the question
In order to leave comments, you need to log in
C battle figured out that the correct form is as follows:
$app->register(new Silex\Provider\SecurityServiceProvider());
$app['security.firewalls'] = array(
'admin' => array(
'pattern' => '^/admin',
'http' => true,
'users' => array(
'admin' => array(admin),
),
),
);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question