1000 search results

82 lines | src/Security/LoginFormAuthenticator.php
// ... lines 1 - 18
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 21 - 66
public function checkCredentials($credentials, UserInterface $user)
{
return $this->passwordEncoder->isPasswordValid($user, $credentials['password']);
}
// ... lines 71 - 80
}
See Code Block in Script
37 lines | templates/security/login.html.twig
// ... lines 1 - 10
{% block body %}
<form class="form-signin" method="post">
// ... lines 13 - 26
<div class="checkbox mb-3">
<label>
<input type="checkbox" value="remember-me"> Remember me
</label>
</div>
// ... lines 32 - 34
</form>
{% endblock %}
See Code Block in Script
37 lines | templates/security/login.html.twig
// ... lines 1 - 10
{% block body %}
<form class="form-signin" method="post">
// ... lines 13 - 26
<div class="checkbox mb-3">
<label>
<input type="checkbox" name="_remember_me"> Remember me
</label>
</div>
// ... lines 32 - 34
</form>
{% endblock %}
See Code Block in Script
57 lines | src/Security/LoginFormAuthenticator.php
// ... lines 1 - 11
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 14 - 35
public function getUser($credentials, UserProviderInterface $userProvider)
{
return $this->userRepository->findOneBy(['email' => $credentials['email']]);
}
public function checkCredentials($credentials, UserInterface $user)
{
// only needed if we need to check a password - we'll do that later!
return true;
}
// ... lines 46 - 55
}
See Code Block in Script
57 lines | src/Security/LoginFormAuthenticator.php
// ... lines 1 - 11
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 14 - 46
public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey)
{
dd('success!');
}
// ... lines 51 - 55
}
See Code Block in Script
61 lines | src/Security/LoginFormAuthenticator.php
// ... lines 1 - 7
use Symfony\Component\Routing\RouterInterface;
// ... lines 9 - 13
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 16 - 18
public function __construct(UserRepository $userRepository, RouterInterface $router)
{
// ... lines 21 - 22
}
// ... lines 24 - 59
}
See Code Block in Script
61 lines | src/Security/LoginFormAuthenticator.php
// ... lines 1 - 7
use Symfony\Component\Routing\RouterInterface;
// ... lines 9 - 13
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... line 16
private $router;
public function __construct(UserRepository $userRepository, RouterInterface $router)
{
// ... line 21
$this->router = $router;
}
// ... lines 24 - 59
}
See Code Block in Script
61 lines | src/Security/LoginFormAuthenticator.php
// ... lines 1 - 13
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 16 - 50
public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey)
{
return new RedirectResponse($this->router->generate('app_homepage'));
}
// ... lines 55 - 59
}
See Code Block in Script
61 lines | src/Security/LoginFormAuthenticator.php
// ... lines 1 - 13
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 16 - 55
protected function getLoginUrl()
{
// TODO: Implement getLoginUrl() method.
}
}
See Code Block in Script
{% extends 'base.html.twig' %}
{% block title %}Login!{% endblock %}
{% block body %}
<h1>Login to the SpaceBar!</h1>
{% endblock %}
See Code Block in Script
28 lines | templates/security/login.html.twig
// ... lines 1 - 4
{% block body %}
<h1>Login to the SpaceBar!</h1>
{% if error %}
<div>{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}
<form action="{{ path('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>
{% endblock %}
See Code Block in Script
28 lines | templates/security/login.html.twig
// ... lines 1 - 4
{% block body %}
// ... lines 6 - 11
<form method="post">
// ... lines 13 - 25
</form>
{% endblock %}
See Code Block in Script
32 lines | templates/security/login.html.twig
// ... lines 1 - 10
{% block body %}
<form class="form-signin" method="post">
{% if error %}
<div>{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}
<h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
<label for="inputEmail" class="sr-only">Email address</label>
<input type="email" name="email" id="inputEmail" class="form-control" placeholder="Email address" required autofocus>
<label for="inputPassword" class="sr-only">Password</label>
<input type="password" name="password" id="inputPassword" class="form-control" placeholder="Password" required>
<div class="checkbox mb-3">
<label>
<input type="checkbox" value="remember-me"> Remember me
</label>
</div>
<button class="btn btn-lg btn-primary btn-block" type="submit">
Sign in
</button>
</form>
{% endblock %}
See Code Block in Script
32 lines | templates/security/login.html.twig
// ... lines 1 - 4
{% block stylesheets %}
// ... lines 6 - 8
{% endblock %}
// ... lines 10 - 32
See Code Block in Script
32 lines | templates/security/login.html.twig
// ... lines 1 - 4
{% block stylesheets %}
{{ parent() }}
// ... lines 7 - 8
{% endblock %}
// ... lines 10 - 32
See Code Block in Script
32 lines | templates/security/login.html.twig
// ... lines 1 - 4
{% block stylesheets %}
{{ parent() }}
<link rel="stylesheet" href="{{ asset('css/login.css') }}">
{% endblock %}
// ... lines 10 - 32
See Code Block in Script
32 lines | templates/security/login.html.twig
// ... lines 1 - 10
{% block body %}
<form class="form-signin" method="post">
{% if error %}
<div>{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}
// ... lines 16 - 29
</form>
{% endblock %}
See Code Block in Script
32 lines | templates/security/login.html.twig
// ... lines 1 - 10
{% block body %}
<form class="form-signin" method="post">
{% if error %}
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}
// ... lines 16 - 29
</form>
{% endblock %}
See Code Block in Script
90 lines | src/Security/LoginFormAuthenticator.php
// ... lines 1 - 20
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 23 - 56
public function getUser($credentials, UserProviderInterface $userProvider)
{
// ... lines 59 - 60
return $this->em->getRepository(User::class)
// ... line 62
}
// ... lines 64 - 88
}
See Code Block in Script
21 lines | src/Security/Voter/RandomAccessVoter.php
// ... lines 1 - 8
class RandomAccessVoter extends Voter
{
protected function supports($attribute, $subject)
{
return $attribute === 'RANDOM_ACCESS';
}
// ... lines 15 - 19
}
See Code Block in Script