The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ
1
0
Fork 0
Browse Source

Created the NullAuth backend.

master
Gergely Polonkai (W00d5t0ck) 10 years ago
parent
commit
63caacdc8b
  1. 50
      src/SmsGateway/Auth/NullAuth.php

50
src/SmsGateway/Auth/NullAuth.php

@ -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';
}
}
Loading…
Cancel
Save