Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of git://github.com/zendframework/zf2 into cach…
Browse files Browse the repository at this point in the history
…e_interfaces
  • Loading branch information
marc-mabe committed May 31, 2012
3 parents e9d405d + 49a871c + 4145ab4 commit ff8e603
Show file tree
Hide file tree
Showing 30 changed files with 290 additions and 114 deletions.
2 changes: 1 addition & 1 deletion .travis/run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
travisdir=$(dirname $(readlink /proc/$$/fd/255))
travisdir=$(dirname "$0")
testdir="$travisdir/../tests"
testedcomponents=(`cat "$travisdir/tested-components"`)
result=0
Expand Down
1 change: 1 addition & 0 deletions .travis/skipped-components
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Zend/Amf
Zend/Date
Zend/Dojo
Zend/Queue
Zend/Service
Zend/Test
Expand Down
4 changes: 3 additions & 1 deletion .travis/tested-components
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,19 @@ Zend/Form
Zend/GData
Zend/Http
Zend/InfoCard
Zend/InputFilter
Zend/Json
Zend/Ldap
Zend/Loader
Zend/Locale
Zend/Log
Zend/Mail
Zend/Markup
Zend/Math
Zend/Measure
Zend/Memory
Zend/Mime
Zend/Module
Zend/ModuleManager
Zend/Mvc
Zend/Navigation
Zend/OAuth
Expand Down
4 changes: 2 additions & 2 deletions src/Adapter/AdapterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ interface AdapterInterface
/**
* Performs an authentication attempt
*
* @return Zend\Authentication\Result
* @throws Zend\Authentication\Adapter\Exception\ExceptionInterface If authentication cannot be performed
* @return \Zend\Authentication\Result
* @throws \Zend\Authentication\Adapter\Exception\ExceptionInterface If authentication cannot be performed
*/
public function authenticate();
}
10 changes: 5 additions & 5 deletions src/Adapter/DbTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@

namespace Zend\Authentication\Adapter;

use Zend\Authentication\Result as AuthenticationResult,
Zend\Db\Adapter\Adapter as DbAdapter,
Zend\Db\Sql\Select as DbSelect,
Zend\Db\Sql\Expression,
Zend\Db\ResultSet\ResultSet;
use Zend\Authentication\Result as AuthenticationResult;
use Zend\Db\Adapter\Adapter as DbAdapter;
use Zend\Db\ResultSet\ResultSet;
use Zend\Db\Sql\Expression;
use Zend\Db\Sql\Select as DbSelect;

/**
* @category Zend
Expand Down
13 changes: 6 additions & 7 deletions src/Adapter/Digest.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ class Digest implements AdapterInterface
* @param mixed $realm
* @param mixed $username
* @param mixed $password
* @return void
*/
public function __construct($filename = null, $realm = null, $username = null, $password = null)
{
Expand All @@ -94,7 +93,7 @@ public function getFilename()
* Sets the filename option value
*
* @param mixed $filename
* @return Zend\Authentication\Adapter\Digest Provides a fluent interface
* @return Digest Provides a fluent interface
*/
public function setFilename($filename)
{
Expand All @@ -116,7 +115,7 @@ public function getRealm()
* Sets the realm option value
*
* @param mixed $realm
* @return Zend\Authentication\Adapter\Digest Provides a fluent interface
* @return Digest Provides a fluent interface
*/
public function setRealm($realm)
{
Expand All @@ -138,7 +137,7 @@ public function getUsername()
* Sets the username option value
*
* @param mixed $username
* @return Zend\Authentication\Adapter\Digest Provides a fluent interface
* @return Digest Provides a fluent interface
*/
public function setUsername($username)
{
Expand All @@ -160,7 +159,7 @@ public function getPassword()
* Sets the password option value
*
* @param mixed $password
* @return Zend\Authentication\Adapter\Digest Provides a fluent interface
* @return Digest Provides a fluent interface
*/
public function setPassword($password)
{
Expand All @@ -171,8 +170,8 @@ public function setPassword($password)
/**
* Defined by Zend\Authentication\Adapter\AdapterInterface
*
* @throws Zend\Authentication\Adapter\Exception\ExceptionInterface
* @return Zend\Authentication\Result
* @throws Exception\ExceptionInterface
* @return AuthenticationResult
*/
public function authenticate()
{
Expand Down
6 changes: 4 additions & 2 deletions src/Adapter/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@

namespace Zend\Authentication\Adapter\Exception;

use Zend\Authentication\Exception\ExceptionInterface as Exception;

/**
* @category Zend
* @package Zend_Authentication
* @subpackage Adapter_Exception
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface ExceptionInterface extends \Zend\Authentication\Exception\ExceptionInterface
{}
interface ExceptionInterface extends Exception
{}
4 changes: 3 additions & 1 deletion src/Adapter/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

namespace Zend\Authentication\Adapter\Exception;

use Zend\Authentication\Exception;

class InvalidArgumentException
extends \InvalidArgumentException
extends Exception\InvalidArgumentException
implements ExceptionInterface
{
}
34 changes: 30 additions & 4 deletions src/Adapter/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,36 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Authentication
* @subpackage Adapter
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\Authentication\Adapter\Exception;

class RuntimeException
extends \RuntimeException
implements ExceptionInterface
{
use Zend\Authentication\Exception;

/**
* @category Zend
* @package Zend_Authentication
* @subpackage Adapter
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class RuntimeException extends Exception\RuntimeException implements
ExceptionInterface
{
}
33 changes: 30 additions & 3 deletions src/Adapter/Exception/UnexpectedValueException.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,36 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Authentication
* @subpackage Adapter
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\Authentication\Adapter\Exception;

class UnexpectedValueException
extends \UnexpectedValueException
implements ExceptionInterface
use Zend\Authentication\Exception;

/**
* @category Zend
* @package Zend_Authentication
* @subpackage Adapter
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class UnexpectedValueException extends Exception\UnexpectedValueException implements
ExceptionInterface
{
}
41 changes: 20 additions & 21 deletions src/Adapter/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

namespace Zend\Authentication\Adapter;

use Zend\Authentication,
Zend\Http\Request as HTTPRequest,
Zend\Http\Response as HTTPResponse,
Zend\Uri\UriFactory;
use Zend\Authentication;
use Zend\Http\Request as HTTPRequest;
use Zend\Http\Response as HTTPResponse;
use Zend\Uri\UriFactory;

/**
* HTTP Authentication Adapter
Expand Down Expand Up @@ -59,14 +59,14 @@ class Http implements AdapterInterface
/**
* Object that looks up user credentials for the Basic scheme
*
* @var Zend\Authentication\Adapter\Http\Resolver
* @var Http\ResolverInterface
*/
protected $_basicResolver;

/**
* Object that looks up user credentials for the Digest scheme
*
* @var Zend\Authentication\Adapter\Http\Resolver
* @var Http\ResolverInterface
*/
protected $_digestResolver;

Expand Down Expand Up @@ -161,8 +161,7 @@ class Http implements AdapterInterface
* 'use_opaque' => <bool> Whether to send the opaque value in the header
* 'alogrithm' => <string> See $_supportedAlgos. Default: MD5
* 'proxy_auth' => <bool> Whether to do authentication as a Proxy
* @throws Zend\Authentication\Adapter\InvalidArgumentException
* @return void
* @throws Exception\InvalidArgumentException
*/
public function __construct(array $config)
{
Expand Down Expand Up @@ -241,8 +240,8 @@ public function __construct(array $config)
/**
* Setter for the _basicResolver property
*
* @param Zend\Authentication\Adapter\Http\ResolverInterface $resolver
* @return Zend\Authentication\Adapter\Http Provides a fluent interface
* @param Http\ResolverInterface $resolver
* @return Http Provides a fluent interface
*/
public function setBasicResolver(Http\ResolverInterface $resolver)
{
Expand All @@ -254,7 +253,7 @@ public function setBasicResolver(Http\ResolverInterface $resolver)
/**
* Getter for the _basicResolver property
*
* @return Zend\Authentication\Adapter\Http\ResolverInterface
* @return Http\ResolverInterface
*/
public function getBasicResolver()
{
Expand All @@ -264,8 +263,8 @@ public function getBasicResolver()
/**
* Setter for the _digestResolver property
*
* @param Zend\Authentication\Adapter\Http\ResolverInterface $resolver
* @return Zend\Authentication\Adapter\Http Provides a fluent interface
* @param Http\ResolverInterface $resolver
* @return Http Provides a fluent interface
*/
public function setDigestResolver(Http\ResolverInterface $resolver)
{
Expand All @@ -277,7 +276,7 @@ public function setDigestResolver(Http\ResolverInterface $resolver)
/**
* Getter for the _digestResolver property
*
* @return Zend\Authentication\Adapter\Http\ResolverInterface
* @return Http\ResolverInterface
*/
public function getDigestResolver()
{
Expand Down Expand Up @@ -333,8 +332,8 @@ public function getResponse()
/**
* Authenticate
*
* @throws Zend\Authentication\Adapter\Exception\RuntimeException
* @return Zend\Authentication\Result
* @throws Exception\RuntimeException
* @return Authentication\Result
*/
public function authenticate()
{
Expand Down Expand Up @@ -398,7 +397,7 @@ public function authenticate()
* Sets a 401 or 407 Unauthorized response code, and creates the
* appropriate Authenticate header(s) to prompt for credentials.
*
* @return Zend\Authentication\Result Always returns a non-identity Auth result
* @return Authentication\Result Always returns a non-identity Auth result
*/
protected function _challengeClient()
{
Expand Down Expand Up @@ -464,8 +463,8 @@ protected function _digestHeader()
* Basic Authentication
*
* @param string $header Client's Authorization header
* @throws Zend\Authentication\Exception\ExceptionInterface
* @return Zend\Authentication\Result
* @throws Exception\ExceptionInterface
* @return Authentication\Result
*/
protected function _basicAuth($header)
{
Expand Down Expand Up @@ -511,8 +510,8 @@ protected function _basicAuth($header)
* Digest Authentication
*
* @param string $header Client's Authorization header
* @throws Zend\Authentication\Adapter\Exception\ExceptionInterface
* @return Zend\Authentication\Result Valid auth result only on successful auth
* @throws Exception\ExceptionInterface
* @return Authentication\Result Valid auth result only on successful auth
*/
protected function _digestAuth($header)
{
Expand Down
6 changes: 4 additions & 2 deletions src/Adapter/Http/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

namespace Zend\Authentication\Adapter\Http\Exception;

use Zend\Authentication\Adapter\Exception\ExceptionInterface as Exception;

/**
* HTTP Auth Resolver Exception
*
Expand All @@ -30,5 +32,5 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface ExceptionInterface extends \Zend\Authentication\Adapter\Exception\ExceptionInterface
{}
interface ExceptionInterface extends Exception
{}
Loading

0 comments on commit ff8e603

Please sign in to comment.