forked from wallabag/wallabag
Make LoginFormAuthenticator a service and remove Factory
This commit is contained in:
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\SiteConfig\Authenticator;
|
||||
|
||||
use Wallabag\SiteConfig\SiteConfig;
|
||||
|
||||
/**
|
||||
* Builds an Authenticator based on a SiteConfig.
|
||||
*/
|
||||
class Factory
|
||||
{
|
||||
/**
|
||||
* @return Authenticator
|
||||
*
|
||||
* @throw \OutOfRangeException if there are no credentials for this host
|
||||
*/
|
||||
public function buildFromSiteConfig()
|
||||
{
|
||||
return new LoginFormAuthenticator();
|
||||
}
|
||||
}
|
||||
@ -16,7 +16,7 @@ class LoginFormAuthenticator implements Authenticator
|
||||
$postFields = [
|
||||
$siteConfig->getUsernameField() => $siteConfig->getUsername(),
|
||||
$siteConfig->getPasswordField() => $siteConfig->getPassword(),
|
||||
] + $this->getExtraFields($guzzle);
|
||||
] + $this->getExtraFields($siteConfig, $guzzle);
|
||||
|
||||
$guzzle->post(
|
||||
$siteConfig->getLoginUri(),
|
||||
|
||||
Reference in New Issue
Block a user