wallabag/src/Wallabag/CoreBundle/SiteConfig/Authenticator/Authenticator.php
2024-02-02 22:36:27 +01:00

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