mirror of
https://github.com/wallabag/wallabag.git
synced 2024-09-28 06:11:56 +00:00
31 lines
685 B
PHP
31 lines
685 B
PHP
<?php
|
|
|
|
namespace Wallabag\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);
|
|
}
|