1
0
Fork 0

Created the NullAuth backend.

This commit is contained in:
Gergely Polonkai (W00d5t0ck) 2012-10-08 13:00:36 +02:00
parent 883bff620b
commit 63caacdc8b
1 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,50 @@
<?php
namespace SmsGateway\Auth;
use SmsGateway\AuthInterface;
use SmsGateway\LoggerInterface;
/**
* Description of NullAuth
*
* @author Gergely Polonkai
*/
class NullAuth implements AuthInterface
{
private $logger;
public function setLogger(LoggerInterface $logger)
{
$this->logger = $logger;
}
public function getLogger()
{
return $this->logger;
}
public function removeToken($token, $ip, $sessionId)
{
return true;
}
public function isTokenValid($token, $ip, $sessionId)
{
return true;
}
public function authenticate($username, $password, $ip, $sessionId)
{
return true;
}
public function getTokenUsername($token, $ip, $sessionId)
{
return 'unknown';
}
public function getToken($username, $ip, $sessionId)
{
return 'alwaysValid';
}
}