Use this provider if you have a HTML login form for your users to sign in.
Inheritance: implements Webiny\Component\Security\Authentication\Providers\AuthenticationInterface, use trait Webiny\Component\Http\HttpTrait
Exemplo n.º 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());
 }