@@ -6,7 +6,8 @@ Authentication and Firewalls (i.e. Getting the User's Credentials)
6
6
7
7
You can configure Symfony to authenticate your users using any method you
8
8
want and to load user information from any source. This is a complex topic,
9
- but the `Security Cookbook Section `_ has a lot of information about this.
9
+ but the :doc: `Security Cookbook Section </cookbook/security/index >` has a
10
+ lot of information about this.
10
11
11
12
Regardless of your needs, authentication is configured in ``security.yml ``,
12
13
primarily under the ``firewalls `` key.
@@ -72,8 +73,9 @@ Authorization (i.e. Denying Access)
72
73
-----------------------------------
73
74
74
75
Symfony gives you several ways to enforce authorization, including the ``access_control ``
75
- configuration in `security.yml `_, the :ref: `@Security annotation <best-practices-security-annotation >`
76
- and using :ref: `isGranted <best-practices-directy-isGranted >` on the ``security.context ``
76
+ configuration in :doc: `security.yml </reference/configuration/security >` the
77
+ :ref: `@Security annotation <best-practices-security-annotation >` and using
78
+ :ref: `isGranted <best-practices-directy-isGranted >` on the ``security.context ``
77
79
service directly.
78
80
79
81
.. best-practice ::
@@ -240,8 +242,8 @@ Security Voters
240
242
241
243
If your security logic is complex and can't be centralized into a method
242
244
like ``isAuthor() ``, you should leverage custom voters. These are an order
243
- of magnitude easier than `ACL's `_ and will give you the flexibility you need
244
- in almost all cases.
245
+ of magnitude easier than :doc: `ACL's < /cookbook/security/acl >` and will give
246
+ you the flexibility you need in almost all cases.
245
247
246
248
First, create a voter class. The following example shows a voter that implements
247
249
the same ``getAuthorEmail `` logic you used above:
@@ -337,27 +339,18 @@ The `FOSUserBundle`_, developed by the Symfony community, adds support for a
337
339
database-backed user system in Symfony2. It also handles common tasks like
338
340
user registration and forgotten password functionality.
339
341
340
- Enable the `Remember Me feature `_ to allow your users to stay logged in for
341
- a long period of time.
342
+ Enable the :doc: `Remember Me feature < /cookbook/security/remember_me >` to
343
+ allow your users to stay logged in for a long period of time.
342
344
343
345
When providing customer support, sometimes it's necessary to access the application
344
346
as some *other * user so that you can reproduce the problem. Symfony provides
345
- the ability to `impersonate users `_ .
347
+ the ability to :doc: `impersonate users < /cookbook/security/impersonating_user >` .
346
348
347
349
If your company uses a user login method not supported by Symfony, you can
348
- develop `your own user provider `_ and `your own authentication provider `_.
350
+ develop :doc: `your own user provider </cookbook/security/custom_provider >` and
351
+ :doc: `your own authentication provider </cookbook/security/custom_authentication_provider >`.
349
352
350
- .. _`Security Cookbook Section` : http://symfony.com/doc/current/cookbook/security/index.html
351
- .. _`security.yml` : http://symfony.com/doc/current/reference/configuration/security.html
352
353
.. _`ParamConverter` : http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html
353
354
.. _`@Security annotation` : http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/security.html
354
- .. _`security.yml` : http://symfony.com/doc/current/reference/configuration/security.html
355
- .. _`security voter` : http://symfony.com/doc/current/cookbook/security/voters_data_permission.html
356
- .. _`Acces Control List` : http://symfony.com/doc/current/cookbook/security/acl.html
357
- .. _`ACL's` : http://symfony.com/doc/current/cookbook/security/acl.html
358
355
.. _`expression` : http://symfony.com/doc/current/components/expression_language/introduction.html
359
356
.. _`FOSUserBundle` : https://github.com/FriendsOfSymfony/FOSUserBundle
360
- .. _`Remember Me feature` : http://symfony.com/doc/current/cookbook/security/remember_me.html
361
- .. _`impersonate users` : http://symfony.com/doc/current/cookbook/security/impersonating_user.html
362
- .. _`your own user provider` : http://symfony.com/doc/current/cookbook/security/custom_provider.html
363
- .. _`your own authentication provider` : http://symfony.com/doc/current/cookbook/security/custom_authentication_provider.html
0 commit comments