mirror of
https://github.com/shlinkio/shlink.git
synced 2026-07-31 00:27:57 -05:00
26 lines
665 B
PHP
26 lines
665 B
PHP
<?php
|
|||
|
|
namespace Acelaya\UrlShortener\Service;
|
||
|
|
|
||
|
|
use Acelaya\UrlShortener\Entity\RestToken;
|
||
|
|
use Acelaya\UrlShortener\Exception\AuthenticationException;
|
||
|
|
use Acelaya\UrlShortener\Exception\InvalidArgumentException;
|
||
|
|
|
||
|
|
interface RestTokenServiceInterface
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* @param string $token
|
||
|
|
* @return RestToken
|
||
|
|
* @throws InvalidArgumentException
|
||
|
|
*/
|
||
|
|
public function getByToken($token);
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Creates and returns a new RestToken if username and password are correct
|
||
|
|
* @param $username
|
||
|
|
* @param $password
|
||
|
|
* @return RestToken
|
||
|
|
* @throws AuthenticationException
|
||
|
|
*/
|
||
|
|
public function createToken($username, $password);
|
||
|
|
}
|