Commit c7baf151 authored by Fabien Potencier's avatar Fabien Potencier

minor #1333 encode documentation exemple password with password_hash (mathroc)

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

Discussion
----------

encode documentation exemple password with password_hash

update documentation hashed password to match the default password encoder because the old hash is not valid with the bcrypt encoder

see #1320

Commits
-------

b6db6b38 encode documentation exemple password with password_hash
parents 1f061677 b6db6b38
...@@ -131,7 +131,7 @@ under ``/admin/``:: ...@@ -131,7 +131,7 @@ under ``/admin/``::
'http' => true, 'http' => true,
'users' => array( 'users' => array(
// raw password is foo // raw password is foo
'admin' => array('ROLE_ADMIN', '5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg=='), 'admin' => array('ROLE_ADMIN', '$2y$10$3i9/lVd8UOFIJ6PAMFt8gu3/r5g0qeCJvoSlLCsvMTythye19F77a'),
), ),
), ),
); );
...@@ -214,7 +214,7 @@ Here is how to secure all URLs under ``/admin/`` with a form:: ...@@ -214,7 +214,7 @@ Here is how to secure all URLs under ``/admin/`` with a form::
'pattern' => '^/admin/', 'pattern' => '^/admin/',
'form' => array('login_path' => '/login', 'check_path' => '/admin/login_check'), 'form' => array('login_path' => '/login', 'check_path' => '/admin/login_check'),
'users' => array( 'users' => array(
'admin' => array('ROLE_ADMIN', '5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg=='), 'admin' => array('ROLE_ADMIN', '$2y$10$3i9/lVd8UOFIJ6PAMFt8gu3/r5g0qeCJvoSlLCsvMTythye19F77a'),
), ),
), ),
); );
...@@ -279,7 +279,7 @@ It's also useful when you want to secure all URLs except the login form:: ...@@ -279,7 +279,7 @@ It's also useful when you want to secure all URLs except the login form::
'pattern' => '^.*$', 'pattern' => '^.*$',
'form' => array('login_path' => '/login', 'check_path' => '/login_check'), 'form' => array('login_path' => '/login', 'check_path' => '/login_check'),
'users' => array( 'users' => array(
'admin' => array('ROLE_ADMIN', '5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg=='), 'admin' => array('ROLE_ADMIN', '$2y$10$3i9/lVd8UOFIJ6PAMFt8gu3/r5g0qeCJvoSlLCsvMTythye19F77a'),
), ),
), ),
); );
...@@ -540,13 +540,13 @@ sample users:: ...@@ -540,13 +540,13 @@ sample users::
$app['db']->insert('users', array( $app['db']->insert('users', array(
'username' => 'fabien', 'username' => 'fabien',
'password' => '5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg==', 'password' => '$2y$10$3i9/lVd8UOFIJ6PAMFt8gu3/r5g0qeCJvoSlLCsvMTythye19F77a',
'roles' => 'ROLE_USER' 'roles' => 'ROLE_USER'
)); ));
$app['db']->insert('users', array( $app['db']->insert('users', array(
'username' => 'admin', 'username' => 'admin',
'password' => '5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg==', 'password' => '$2y$10$3i9/lVd8UOFIJ6PAMFt8gu3/r5g0qeCJvoSlLCsvMTythye19F77a',
'roles' => 'ROLE_ADMIN' 'roles' => 'ROLE_ADMIN'
)); ));
} }
......
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