Skip to content

Commit

Permalink
Hotfix. Remove unused loginUrl property. Fix namespace typo in Adapte…
Browse files Browse the repository at this point in the history
…r\Exception classes. Housekeeping on formatting for all Exception classes.
  • Loading branch information
jeremiahsmall committed Mar 10, 2013
1 parent 549744d commit 89ce570
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 28 deletions.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@


namespace Soliant\SimpleFM\ZF2\Authentication\Adapter\Exception; namespace Soliant\SimpleFM\ZF2\Authentication\Adapter\Exception;


class InvalidArgumentException class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
extends \InvalidArgumentException
implements \SimpleFM\Authentication\Adapter\Exception\ExceptionInterface
{ {
} }
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@


namespace Soliant\SimpleFM\ZF2\Authentication\Adapter\Exception; namespace Soliant\SimpleFM\ZF2\Authentication\Adapter\Exception;


class RuntimeException class RuntimeException extends \RuntimeException implements ExceptionInterface
extends \RuntimeException
implements \SimpleFM\Authentication\Adapter\Exception\ExceptionInterface
{ {


} }
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@


namespace Soliant\SimpleFM\ZF2\Authentication\Adapter\Exception; namespace Soliant\SimpleFM\ZF2\Authentication\Adapter\Exception;


class UnexpectedValueException class UnexpectedValueException extends \UnexpectedValueException implements ExceptionInterface
extends \UnexpectedValueException
implements \SimpleFM\Authentication\Adapter\Exception\ExceptionInterface
{ {
} }
15 changes: 2 additions & 13 deletions library/Soliant/SimpleFM/ZF2/Authentication/Adapter/SimpleFM.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ class SimpleFM implements \Zend\Authentication\Adapter\AdapterInterface
*/ */
protected $password; protected $password;


/**
* URI of user login form
*
* @var string
*/
protected $loginUrl;

/** /**
* Adapter to be used for login validation * Adapter to be used for login validation
* *
Expand Down Expand Up @@ -85,23 +78,19 @@ class SimpleFM implements \Zend\Authentication\Adapter\AdapterInterface
* Constructor * Constructor
* *
* @param array $config Configuration settings: * @param array $config Configuration settings:
* 'loginUrl' => string Example: '/login'
* 'validateSimpleFmAdapter' => Soliant\SimpleFM\Adapter * 'validateSimpleFmAdapter' => Soliant\SimpleFM\Adapter
* 'encryptionKey' => string Example: '56cb36c21eb9a29c1317092b973a5f9cba393a367de783af45a2799f7302c', * 'encryptionKey' => string Example: '56cb36c21eb9a29c1317092b973a5f9cba393a367de783af45a2799f7302c',
* 'appUsername' => string Example: 'webSystem' * 'appUsername' => string Example: 'webSystem'
* 'appPassword' => string Example: '317akx1gr43m4pd' * 'appPassword' => string Example: '317akx1gr43m4pd'
* 'identityLayout' => string Example: 'gateway_User'
* 'accountNameField' => string Example: 'AccountName'
* @throws Soliant\SimpleFM\ZF2\Authentication\Adapter\InvalidArgumentException * @throws Soliant\SimpleFM\ZF2\Authentication\Adapter\InvalidArgumentException
* @return void * @return void
*/ */
public function __construct(array $config, Adapter $simpleFmValidateAdapter) public function __construct(array $config, Adapter $simpleFmValidateAdapter)
{ {
$this->simpleFmValidateAdapter = $simpleFmValidateAdapter; $this->simpleFmValidateAdapter = $simpleFmValidateAdapter;


if (empty($config['loginUrl'])) {
throw new Exception\InvalidArgumentException('Config key \'loginUrl\' is required');
}
$this->loginUrl = $config['loginUrl'];

if (empty($config['encryptionKey'])) { if (empty($config['encryptionKey'])) {
throw new Exception\InvalidArgumentException('Config key \'encryptionKey\' is required'); throw new Exception\InvalidArgumentException('Config key \'encryptionKey\' is required');
} }
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@


namespace Soliant\SimpleFM\ZF2\Authentication\Mapper\Exception; namespace Soliant\SimpleFM\ZF2\Authentication\Mapper\Exception;


class InvalidArgumentException class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
extends \InvalidArgumentException
implements ExceptionInterface
{ {
} }
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@


namespace Soliant\SimpleFM\ZF2\Authentication\Storage\Exception; namespace Soliant\SimpleFM\ZF2\Authentication\Storage\Exception;


class InvalidArgumentException class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
extends \InvalidArgumentException
implements ExceptionInterface
{ {
} }

0 comments on commit 89ce570

Please sign in to comment.