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

Created AuthInterface

master
Gergely Polonkai (W00d5t0ck) 10 years ago
parent
commit
57a2da32cb
  1. 51
      gatewayBackend.php
  2. 6
      src/SmsGateway/AuthInterface
  3. 17
      src/SmsGateway/AuthInterface.php

51
gatewayBackend.php

@ -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);
}

6
src/SmsGateway/AuthInterface

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

17
src/SmsGateway/AuthInterface.php

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