Created AuthInterface

This commit is contained in:
Gergely Polonkai (W00d5t0ck) 2012-09-25 19:32:35 +02:00
parent 61d0399828
commit 57a2da32cb
3 changed files with 17 additions and 57 deletions

View File

@ -1,51 +0,0 @@
<?php
interface gatewayBackend
{
/**
*
* @param String $username
* @param String $password
* @param String $ip
* @param String $sessionId
* @return String $token
*/
public function getToken($username, $password, $ip, $sessionId);
/**
*
* @param String $token
* @param String $sessionId
* @param String $ip
* @return Boolean
*/
public function checkToken($token, $sessionId, $ip);
/**
* removeToken() Remove a logged out user's token
*
* @param String $ip
* @param String $sessionId
* @param String $token
*/
public function removeToken($ip, $sessionId, $token);
/**
* auditLog() Log audit messages
*
* @param String $ip
* @param String $event
* @param String $message
*/
public function auditLog($ip, $event, $message);
/**
* messageLog() Log sent messages
*
* @param Integer $senderId
* @param String $recipient
* @param String $message
* @param String $ip
*/
public function messageLog($senderId, $recipient, $message, $ip);
}

View File

@ -1,6 +0,0 @@
<?php
namespace SmsGateway;
interface AuthInterface
{
}

View File

@ -0,0 +1,17 @@
<?php
namespace SmsGateway;
use SmsGateway\LoggerInterface;
interface AuthInterface
{
public function setLogger(LoggerInterface $logger);
public function getLogger();
public function getToken($username, $ip, $sessionId);
public function isTokenValid($token, $ip, $sessionId);
public function removeToken($token, $ip, $sessionId);
}