1000 search results

// ... lines 1 - 2
namespace AppBundle\Security;
// ... lines 4 - 7
use Symfony\Component\Security\Guard\Authenticator\AbstractFormLoginAuthenticator;
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 12 - 30
}
See Code Block in Script
{% extends 'base.html.twig' %}
{% block body %}
<div class="container">
<div class="row">
<div class="col-xs-12">
<h1>Login!</h1>
// ... lines 8 - 27
</div>
</div>
</div>
{% endblock %}
See Code Block in Script
// ... lines 1 - 2
{% block body %}
<div class="container">
<div class="row">
<div class="col-xs-12">
<h1>Login!</h1>
{% if error %}
<div>{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}
<form action="{{ path('security_login') }}" method="post">
<label for="username">Username:</label>
<input type="text" id="username" name="_username" value="{{ last_username }}" />
<label for="password">Password:</label>
<input type="password" id="password" name="_password" />
{#
If you want to control the URL the user
is redirected to on success (more details below)
<input type="hidden" name="_target_path" value="/account" />
#}
<button type="submit">login</button>
</form>
</div>
</div>
</div>
{% endblock %}
See Code Block in Script
// ... lines 1 - 2
{% block body %}
<div class="container">
<div class="row">
<div class="col-xs-12">
<h1>Login!</h1>
{% if error %}
<div class="alert alert-danger">
{{ error.messageKey|trans(error.messageData, 'security') }}
</div>
{% endif %}
// ... lines 14 - 19
</div>
</div>
</div>
{% endblock %}
See Code Block in Script
// ... lines 1 - 2
{% block body %}
<div class="container">
<div class="row">
<div class="col-xs-12">
<h1>Login!</h1>
{% if error %}
<div class="alert alert-danger">
{{ error.messageKey|trans(error.messageData, 'security') }}
</div>
{% endif %}
{{ form_start(form) }}
{{ form_row(form._username) }}
{{ form_row(form._password) }}
// ... line 18
{{ form_end(form) }}
</div>
</div>
</div>
{% endblock %}
See Code Block in Script
// ... lines 1 - 2
{% block body %}
<div class="container">
<div class="row">
<div class="col-xs-12">
// ... lines 7 - 14
{{ form_start(form) }}
// ... lines 16 - 17
<button type="submit" class="btn btn-success">Login <span class="fa fa-lock"></span></button>
{{ form_end(form) }}
</div>
</div>
</div>
{% endblock %}
See Code Block in Script
// ... lines 1 - 8
use Symfony\Component\Security\Core\User\UserProviderInterface;
// ... lines 10 - 11
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 14 - 36
public function getUser($credentials, UserProviderInterface $userProvider)
{
}
// ... lines 40 - 51
}
See Code Block in Script
// ... lines 1 - 12
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 15 - 39
public function getUser($credentials, UserProviderInterface $userProvider)
{
$username = $credentials['_username'];
// ... lines 43 - 45
}
// ... lines 47 - 58
}
See Code Block in Script
// ... lines 1 - 12
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 15 - 17
public function __construct(FormFactoryInterface $formFactory, EntityManager $em)
{
// ... lines 20 - 21
}
// ... lines 23 - 58
}
See Code Block in Script
// ... lines 1 - 12
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... line 15
private $em;
public function __construct(FormFactoryInterface $formFactory, EntityManager $em)
{
// ... line 20
$this->em = $em;
}
// ... lines 23 - 58
}
See Code Block in Script
// ... lines 1 - 12
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 15 - 39
public function getUser($credentials, UserProviderInterface $userProvider)
{
$username = $credentials['_username'];
return $this->em->getRepository('AppBundle:User')
->findOneBy(['email' => $username]);
}
// ... lines 47 - 58
}
See Code Block in Script
// ... lines 1 - 12
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 15 - 47
public function checkCredentials($credentials, UserInterface $user)
{
}
// ... lines 51 - 58
}
See Code Block in Script
// ... lines 1 - 12
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 15 - 47
public function checkCredentials($credentials, UserInterface $user)
{
$password = $credentials['_password'];
// ... lines 51 - 56
}
// ... lines 58 - 65
}
See Code Block in Script
// ... lines 1 - 49
$password = $credentials['_password'];
if ($password == 'iliketurtles') {
return true;
}
return false;
// ... lines 57 - 67
See Code Block in Script
// ... lines 1 - 12
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 15 - 58
protected function getLoginUrl()
{
}
// ... lines 62 - 65
}
See Code Block in Script
// ... lines 1 - 4
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\User\UserProviderInterface;
// ... lines 8 - 9
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
public function getCredentials(Request $request)
{
}
public function getUser($credentials, UserProviderInterface $userProvider)
{
}
public function checkCredentials($credentials, UserInterface $user)
{
}
// ... lines 23 - 30
}
See Code Block in Script
// ... lines 1 - 9
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 12 - 23
protected function getLoginUrl()
{
}
protected function getDefaultSuccessRedirectUrl()
{
}
}
See Code Block in Script
// ... lines 1 - 11
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 14 - 20
public function getCredentials(Request $request)
{
$isLoginSubmit = $request->getPathInfo() == '/login' && $request->isMethod('POST');
// ... lines 24 - 34
}
// ... lines 36 - 51
}
See Code Block in Script
// ... lines 1 - 22
$isLoginSubmit = $request->getPathInfo() == '/login' && $request->isMethod('POST');
if (!$isLoginSubmit) {
// skip authentication
return;
}
// ... lines 28 - 53
See Code Block in Script
// ... lines 1 - 11
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 14 - 15
public function __construct(FormFactoryInterface $formFactory)
{
// ... line 18
}
// ... lines 20 - 51
}
See Code Block in Script