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

Commit

Permalink
Merge branch 'feature/5901' into develop
Browse files Browse the repository at this point in the history
Close #5901
  • Loading branch information
weierophinney committed Mar 10, 2014
2 parents 8ee3591 + e524c05 commit fbf3eef
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -34,6 +34,10 @@ version of PHP available to ensure you have the latest security fixes.

Additional updates that may affect existing applications include:

- [#5901](https://github.com/zendframework/zf2/pull/5901) adds a new interface,
`Zend\Authentication\AuthenticationServiceInterface`. You can not type-hint
against this instead of `Zend\Authentication\AuthenticationService`.

- [#5885](https://github.com/zendframework/zf2/pull/5885) adds the ability to
specify the Locale via a route match parameter, and have it apply to the
composed translator in the router, if any.
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Authentication/AuthenticationService.php
Expand Up @@ -9,7 +9,7 @@

namespace Zend\Authentication;

class AuthenticationService
class AuthenticationService implements AuthenticationServiceInterface
{
/**
* Persistent storage handler
Expand Down
44 changes: 44 additions & 0 deletions library/Zend/Authentication/AuthenticationServiceInterface.php
@@ -0,0 +1,44 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\Authentication;

/**
* Provides an API for authentication and identity management
*/
interface AuthenticationServiceInterface
{
/**
* Authenticates and provides an authentication result
*
* @return Result
*/
public function authenticate();

/**
* Returns true if and only if an identity is available
*
* @return bool
*/
public function hasIdentity();

/**
* Returns the authenticated identity or null if no identity is available
*
* @return mixed|null
*/
public function getIdentity();

/**
* Clears the identity
*
* @return void
*/
public function clearIdentity();
}

0 comments on commit fbf3eef

Please sign in to comment.