Skip to content

Commit

Permalink
Added mentions to some popular (and useful) Symfony bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz committed Jun 9, 2015
1 parent 5c0f8fb commit 963d0a6
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 2 deletions.
8 changes: 7 additions & 1 deletion book/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,11 @@ But who can you login as? Where do users come from?
What other methods are supported? See the :doc:`Configuration Reference </reference/configuration/security>`
or :doc:`build your own </cookbook/security/custom_authentication_provider>`.

.. tip::

If your application logs in users via a third-party service such as Google,
Facebook or Twitter, check out the `HWIOAuthBundle`_ community bundle.

.. _security-user-providers:
.. _where-do-users-come-from-user-providers:

Expand Down Expand Up @@ -480,7 +485,7 @@ else, you'll want to encode their passwords. The best algorithm to use is
<encoder class="Symfony\Component\Security\Core\User\User"
algorithm="bcrypt"
cost="12" />
<!-- ... -->
</config>
</srv:container>
Expand Down Expand Up @@ -1283,3 +1288,4 @@ Learn More from the Cookbook

.. _`online tool`: https://www.dailycred.com/blog/12/bcrypt-calculator
.. _`frameworkextrabundle documentation`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html
.. _`HWIOAuthBundle`: https://github.com/hwi/HWIOAuthBundle
8 changes: 8 additions & 0 deletions cookbook/assetic/asset_management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ To include an image you can use the ``image`` tag.
You can also use Assetic for image optimization. More information in
:doc:`/cookbook/assetic/jpeg_optimize`.

.. tip::

Instead of using Assetic to include images, you may consider using the
`LiipImagineBundle`_ community bundle, which allows to compress and
manipulate images (rotate, resize, watermark, etc.) before serving them.

.. _cookbook-assetic-cssrewrite:

Fixing CSS Paths with the ``cssrewrite`` Filter
Expand Down Expand Up @@ -572,3 +578,5 @@ some isolated directory (e.g. ``/js/compiled``), to keep things organized:
) as $url): ?>
<script src="<?php echo $view->escape($url) ?>"></script>
<?php endforeach ?>
.. _`LiipImagineBundle`: http://knpbundles.com/liip/LiipImagineBundle
6 changes: 6 additions & 0 deletions cookbook/assetic/jpeg_optimize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -250,4 +250,10 @@ file:
),
));
.. tip::

Instead of using Assetic and Jpegoptim, you can also compress and manipulate
images before serving them using the `LiipImagineBundle`_ community bundle.

.. _`Jpegoptim`: http://www.kokkonen.net/tjko/projects.html
.. _`LiipImagineBundle`: http://knpbundles.com/liip/LiipImagineBundle
8 changes: 8 additions & 0 deletions cookbook/doctrine/file_uploads.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
How to Handle File Uploads with Doctrine
========================================

.. note::

Instead of handling file uploading yourself, you may consider using the
`VichUploaderBundle`_ community bundle. This bundle provides all the common
operations (such as file renaming, saving and deleting) and it's tightly
integratd with Doctrine ORm, ODM, PHPCR ODM and Propel.

Handling file uploads with Doctrine entities is no different than handling
any other file upload. In other words, you're free to move the file in your
controller after handling a form submission. For examples of how to do this,
Expand Down Expand Up @@ -557,3 +564,4 @@ order to remove the file. Before it's removed, you must store the file path
from the database, you can safely delete the file (in ``PostRemove``).

.. _`preUpdate`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html#preupdate
.. _`VichUploaderBundle`: https://github.com/dustin10/VichUploaderBundle
10 changes: 9 additions & 1 deletion cookbook/security/custom_authentication_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
How to Create a custom Authentication Provider
==============================================

.. note::

If you want to authenticate users via OAuth using a third-party service
such as Google, Facebook or Twitter, there is no need to create your own
authentication provider. In those cases, use the `HWIOAuthBundle`_ community
bundle.

If you have read the chapter on :doc:`/book/security`, you understand the
distinction Symfony makes between authentication and authorization in the
implementation of security. This chapter discusses the core classes involved
Expand Down Expand Up @@ -280,7 +287,7 @@ the ``PasswordDigest`` header value matches with the user's password.

.. note::

The comparsion of the expected and the provided digests uses a constant
The comparison of the expected and the provided digests uses a constant
time comparison provided by the
:method:`Symfony\\Component\\Security\\Core\\Util\\StringUtils::equals`
method of the ``StringUtils`` class. It is used to mitigate possible
Expand Down Expand Up @@ -615,6 +622,7 @@ set to any desirable value per firewall.
The rest is up to you! Any relevant configuration items can be defined
in the factory and consumed or passed to the other classes in the container.

.. _`HWIOAuthBundle`: https://github.com/hwi/HWIOAuthBundle
.. _`WSSE`: http://www.xml.com/pub/a/2003/12/17/dive.html
.. _`nonce`: http://en.wikipedia.org/wiki/Cryptographic_nonce
.. _`timing attacks`: http://en.wikipedia.org/wiki/Timing_attack

0 comments on commit 963d0a6

Please sign in to comment.