getLoginObject() public method

On this page the provider should create a new Login object from those credentials, and return the object. This object will be then validated by user providers.
public getLoginObject ( ConfigObject $config ) : Login
$config Webiny\Component\Config\ConfigObject Firewall config
return Webiny\Component\Security\Authentication\Providers\Login
Example #1
0
 public function testGetLoginObject()
 {
     Request::deleteInstance();
     // mock POST
     $_POST = ['username' => 'un', 'password' => 'pw', 'rememberme' => 'yes'];
     $form = new Form();
     $c = new ConfigObject([]);
     $login = $form->getLoginObject($c);
     $this->assertInstanceOf('\\Webiny\\Component\\Security\\Authentication\\Providers\\Login', $login);
     $this->assertSame('un', $login->getUsername());
     $this->assertSame('pw', $login->getPassword());
     $this->assertSame('yes', $login->getRememberMe());
 }