Commit 07379f94 authored by Fabien Potencier's avatar Fabien Potencier

minor #1471 Update guard_authentication.rst (Czarnodziej)

This PR was merged into the 2.1.x-dev branch.

Discussion
----------

Update guard_authentication.rst

isPasswordValid() needs hashed password, not plaintext.

Commits
-------

1a86c8ac Update guard_authentication.rst
parents a2e5382b 1a86c8ac
...@@ -150,7 +150,8 @@ Finally, configure your `security.firewalls` key to use this authenticator: ...@@ -150,7 +150,8 @@ Finally, configure your `security.firewalls` key to use this authenticator:
// configure where your users come from. Hardcode them, or load them from somewhere // configure where your users come from. Hardcode them, or load them from somewhere
// http://silex.sensiolabs.org/doc/providers/security.html#defining-a-custom-user-provider // http://silex.sensiolabs.org/doc/providers/security.html#defining-a-custom-user-provider
'users' => array( 'users' => array(
'victoria' => array('ROLE_USER', 'randomsecret'), //raw password = foo
'victoria' => array('ROLE_USER', '$2y$10$3i9/lVd8UOFIJ6PAMFt8gu3/r5g0qeCJvoSlLCsvMTythye19F77a'),
), ),
// 'anonymous' => true // 'anonymous' => true
), ),
...@@ -175,7 +176,7 @@ under different conditions: ...@@ -175,7 +176,7 @@ under different conditions:
# {"message":"Username could not be found."} # {"message":"Username could not be found."}
# test with a working token # test with a working token
curl -H "X-AUTH-TOKEN: victoria:randomsecret" http://localhost:8000/ curl -H "X-AUTH-TOKEN: victoria:foo" http://localhost:8000/
# the homepage controller is executed: the page loads normally # the homepage controller is executed: the page loads normally
For more details read the Symfony cookbook entry on For more details read the Symfony cookbook entry on
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment