Skip to content

Commit

Permalink
Removing the BlowfishPassword hasher
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Jun 3, 2014
1 parent 941a195 commit 3ee5b6b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 66 deletions.
4 changes: 2 additions & 2 deletions src/Controller/Component/Auth/BaseAuthenticate.php
Expand Up @@ -42,7 +42,7 @@ abstract class BaseAuthenticate {
* - `contain` Extra models to contain and store in session.
* - `passwordHasher` Password hasher class. Can be a string specifying class name
* or an array containing `className` key, any other keys will be passed as
* config to the class. Defaults to 'Blowfish'.
* config to the class. Defaults to 'Simple'.
*
* @var array
*/
Expand All @@ -54,7 +54,7 @@ abstract class BaseAuthenticate {
'userModel' => 'Users',
'scope' => [],
'contain' => null,
'passwordHasher' => 'Blowfish'
'passwordHasher' => 'Simple'
];

/**
Expand Down
61 changes: 0 additions & 61 deletions src/Controller/Component/Auth/BlowfishPasswordHasher.php

This file was deleted.

Expand Up @@ -298,7 +298,7 @@ public function testPasswordHasherSettings() {
'userModel' => 'Users'
]);
$this->auth->config('passwordHasher', [
'className' => 'Blowfish'
'className' => 'Simple'
]);
$this->assertEquals($expected, $this->auth->authenticate($request, $this->response));

Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Controller/Component/AuthComponentTest.php
Expand Up @@ -375,7 +375,7 @@ public function testAllConfigWithAuthenticate() {
public function testSameAuthenticateWithDifferentHashers() {
$this->Controller->Auth->config('authenticate', [
'FormSimple' => ['className' => 'Form', 'passwordHasher' => 'Simple'],
'FormBlowfish' => ['className' => 'Form', 'passwordHasher' => 'Blowfish'],
'FormBlowfish' => ['className' => 'Form', 'passwordHasher' => 'Fallback'],
]);

$objects = $this->Controller->Auth->constructAuthenticate();
Expand All @@ -385,7 +385,7 @@ public function testSameAuthenticateWithDifferentHashers() {
$this->assertInstanceOf('Cake\Controller\Component\Auth\FormAuthenticate', $objects[1]);

$this->assertInstanceOf('Cake\Controller\Component\Auth\SimplePasswordHasher', $objects[0]->passwordHasher());
$this->assertInstanceOf('Cake\Controller\Component\Auth\BlowfishPasswordHasher', $objects[1]->passwordHasher());
$this->assertInstanceOf('Cake\Controller\Component\Auth\FallbackPasswordHasher', $objects[1]->passwordHasher());
}

/**
Expand Down

0 comments on commit 3ee5b6b

Please sign in to comment.