mirror of
https://github.com/wallabag/wallabag.git
synced 2024-05-20 01:58:06 +00:00
32 lines
696 B
PHP
32 lines
696 B
PHP
<?php
|
|
|
|
namespace Wallabag\CoreBundle\SiteConfig\Authenticator;
|
|
|
|
use GuzzleHttp\ClientInterface;
|
|
|
|
interface Authenticator
|
|
{
|
|
/**
|
|
* Logs the configured user on the given Guzzle client.
|
|
*
|
|
* @return self
|
|
*/
|
|
public function login(ClientInterface $guzzle);
|
|
|
|
/**
|
|
* Checks if we are logged into the site, but without calling the server (e.g. do we have a Cookie).
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function isLoggedIn(ClientInterface $guzzle);
|
|
|
|
/**
|
|
* Checks from the HTML of a page if authentication is requested by a grabbed page.
|
|
*
|
|
* @param string $html
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function isLoginRequired($html);
|
|
}
|