-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Completely re-reading the security book #4606
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
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d9a9310
Completely re-reading the security book
weaverryan 95d6a7d
[#4606] Updating thanks to comments from everyone!
weaverryan 614da15
Changing to _ for consistency
weaverryan aedfcd2
[#4606] Tweaks thanks entirely to stof
weaverryan fe9fdac
[#4606] Getting my XML (and PHP) on in the new security chapter
weaverryan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[#4606] Updating thanks to comments from everyone!
- Loading branch information
commit 95d6a7de8e8f7655bb86d75a8a2d11d082f45b71
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,9 @@ How to Build a Traditional Login Form | |
.. tip:: | ||
|
||
If you need a login form and are storing users in some sort of a database, | ||
then see you should consider using `FOSUserBundle`_, which helps you | ||
build your ``User`` object and gives you many routes and controllers | ||
for common tasks like login, registration and forgot password. | ||
then you should consider using `FOSUserBundle`_, which helps you build | ||
your ``User`` object and gives you many routes and controllers for common | ||
tasks like login, registration and forgot password. | ||
|
||
In this entry, you'll build a traditional login form. Of course, when the | ||
user logs in, you can load your users from anywhere - like the database. | ||
|
@@ -69,7 +69,9 @@ First, enable form login under your firewall: | |
|
||
.. tip:: | ||
|
||
The ``login_path`` and ``check_path`` can also be route names. | ||
The ``login_path`` and ``check_path`` can also be route names (but cannot | ||
have mandatory wildcards - e.g. ``/login/{foo}`` where ``foo`` has no | ||
default value). | ||
|
||
Now, when the security system initiates the authentication process, it will | ||
redirect the user to the login form ``/login``. Implementing this login form | ||
|
@@ -99,7 +101,6 @@ under your ``form_login`` configuration (``/login`` and ``/login_check``): | |
|
||
// src/AppBundle/Controller/SecurityController.php | ||
// ... | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you should move the empty line below above this comment |
||
|
||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
|
||
class SecurityController extends Controller | ||
|
@@ -410,6 +411,7 @@ for the login page: | |
|
||
# ... | ||
firewalls: | ||
# order matters! This must be before the ^/ firewall | ||
login_firewall: | ||
pattern: ^/login$ | ||
anonymous: ~ | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is missing the folding comment (
// ...
).