Skip to content

[Security] Add deprecation notices about Guard authenticators #15529

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,11 @@ you to control *every* part of the authentication process (see the next section)
Guard Authenticators
~~~~~~~~~~~~~~~~~~~~

.. deprecated:: 5.3

Guard authenticators are deprecated since Symfony 5.3 in favor of the
:doc:`new authenticator-based system </security/authenticator_manager>`.

A Guard authenticator is a class that gives you *complete* control over your
authentication process. There are many different ways to build an authenticator;
here are a few common use-cases:
Expand Down
6 changes: 3 additions & 3 deletions security/auth_providers.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Built-in Authentication Providers
=================================

If you need to add authentication to your app, we recommend using
:doc:`Guard authentication </security/guard_authentication>` because it gives you
full control over the process.
If you need to add authentication to your app, we recommend using the
:doc:`new authenticator-based system </security/authenticator_manager>` because
it gives you full control over the process.

But, Symfony also offers a number of built-in authentication providers: systems
that are easier to implement, but harder to customize. If your authentication
Expand Down
6 changes: 2 additions & 4 deletions security/custom_authentication_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ How to Create a custom Authentication Provider
.. caution::

Creating a custom authentication system is hard, and almost definitely
**not** needed. Instead, see :doc:`/security/guard_authentication` for a
simple way to create an authentication system you will love. Do **not**
keep reading unless you want to learn the lowest level details of
authentication.
**not** needed. Instead, see the
:doc:`new authenticator-based system </security/authenticator_manager>`

Symfony provides support for the most
:doc:`common authentication mechanisms </security/auth_providers>`. However, your
Expand Down
10 changes: 5 additions & 5 deletions security/guard_authentication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
Custom Authentication System with Guard (API Token Example)
===========================================================

.. deprecated:: 5.3

Guard authenticators are deprecated since Symfony 5.3 in favor of the
:doc:`new authenticator-based system </security/authenticator_manager>`.

Guard authentication can be used to:

* :doc:`Build a Login Form </security/form_login_setup>`
Expand All @@ -14,11 +19,6 @@ Guard authentication can be used to:
and many more. In this example, we'll build an API token authentication
system, so we can learn more about Guard in detail.

.. tip::

A :doc:`new authenticator-based system </security/authenticator_manager>`
was introduced in Symfony 5.1, which will eventually replace Guards in Symfony 6.0.

Step 1) Prepare your User Class
-------------------------------

Expand Down
5 changes: 5 additions & 0 deletions security/multiple_guard_authenticators.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
How to Use Multiple Guard Authenticators
========================================

.. deprecated:: 5.3

Guard authenticators are deprecated since Symfony 5.3 in favor of the
:doc:`new authenticator-based system </security/authenticator_manager>`.

The Guard authentication component allows you to use many different
authenticators at a time.

Expand Down