@@ -5,9 +5,9 @@ Authentication and Firewalls (i.e. Getting the User's Credentials)
5
5
------------------------------------------------------------------
6
6
7
7
You can configure Symfony to authenticate your users using any method you
8
- want and to load user information from any source. This is a complex topic,
9
- but the :doc: `Security Cookbook Section </cookbook/ security/index >` has a
10
- lot of information about this.
8
+ want and to load user information from any source. This is a complex topic, but
9
+ the :doc: `Security Cookbook Section </security >` has a lot of information about
10
+ this.
11
11
12
12
Regardless of your needs, authentication is configured in ``security.yml ``,
13
13
primarily under the ``firewalls `` key.
@@ -127,7 +127,7 @@ Using ``@Security``, this looks like:
127
127
Using Expressions for Complex Security Restrictions
128
128
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
129
129
130
- If your security logic is a little bit more complex, you can use an `expression `_
130
+ If your security logic is a little bit more complex, you can use an :doc: `expression < /components/expression_language >`
131
131
inside ``@Security ``. In the following example, a user can only access the
132
132
controller if their email matches the value returned by the ``getAuthorEmail ``
133
133
method on the ``Post `` object:
@@ -254,7 +254,7 @@ Security Voters
254
254
255
255
If your security logic is complex and can't be centralized into a method
256
256
like ``isAuthor() ``, you should leverage custom voters. These are an order
257
- of magnitude easier than :doc: `ACLs </cookbook/ security/acl >` and will give
257
+ of magnitude easier than :doc: `ACLs </security/acl >` and will give
258
258
you the flexibility you need in almost all cases.
259
259
260
260
First, create a voter class. The following example shows a voter that implements
@@ -358,18 +358,17 @@ The `FOSUserBundle`_, developed by the Symfony community, adds support for a
358
358
database-backed user system in Symfony. It also handles common tasks like
359
359
user registration and forgotten password functionality.
360
360
361
- Enable the :doc: `Remember Me feature </cookbook/ security/remember_me >` to
361
+ Enable the :doc: `Remember Me feature </security/remember_me >` to
362
362
allow your users to stay logged in for a long period of time.
363
363
364
364
When providing customer support, sometimes it's necessary to access the application
365
365
as some *other * user so that you can reproduce the problem. Symfony provides
366
- the ability to :doc: `impersonate users </cookbook/ security/impersonating_user >`.
366
+ the ability to :doc: `impersonate users </security/impersonating_user >`.
367
367
368
368
If your company uses a user login method not supported by Symfony, you can
369
- develop :doc: `your own user provider </cookbook/ security/custom_provider >` and
370
- :doc: `your own authentication provider </cookbook/ security/custom_authentication_provider >`.
369
+ develop :doc: `your own user provider </security/custom_provider >` and
370
+ :doc: `your own authentication provider </security/custom_authentication_provider >`.
371
371
372
372
.. _`ParamConverter` : http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html
373
373
.. _`@Security annotation` : http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/security.html
374
- .. _`expression` : http://symfony.com/doc/current/components/expression_language/introduction.html
375
374
.. _`FOSUserBundle` : https://github.com/FriendsOfSymfony/FOSUserBundle
0 commit comments