1000 search results

41 lines | app/config/security.yml
// ... lines 1 - 14
firewalls:
// ... lines 16 - 20
main:
// ... lines 22 - 29
logout_on_user_change: true
// ... lines 31 - 41
See Code Block in Script
// ... lines 1 - 19
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
use TargetPathTrait;
// ... lines 23 - 74
public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey)
{
// ... lines 77 - 81
}
// ... lines 83 - 87
}
See Code Block in Script
// ... lines 1 - 19
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 22 - 74
public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey)
{
if ($targetPath = $this->getTargetPath($request->getSession(), 'main')) {
// ... line 78
}
// ... line 81
}
// ... lines 83 - 87
}
See Code Block in Script
// ... lines 1 - 19
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 22 - 74
public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey)
{
if ($targetPath = $this->getTargetPath($request->getSession(), 'main')) {
return new RedirectResponse($targetPath);
}
return new RedirectResponse($this->router->generate('homepage'));
}
// ... lines 83 - 87
}
See Code Block in Script
services:
SensioLabs\Security\SecurityChecker:
public: false
SensioLabs\Security\Command\SecurityCheckerCommand:
arguments: ['@SensioLabs\Security\SecurityChecker']
tags:
- { name: console.command }
See Code Block in Script
// ... lines 1 - 10
{% block javascripts %}
// ... lines 12 - 13
<script src="{{ asset('build/login.js') }}"></script>
{% endblock %}
// ... lines 16 - 72
See Code Block in Script
// ... lines 1 - 4
{% block stylesheets %}
// ... lines 6 - 7
<link rel="stylesheet" href="{{ asset('assets/css/login.css') }}" />
{% endblock %}
{% block javascripts %}
// ... lines 12 - 13
<script src="{{ asset('build/login.js') }}"></script>
{% endblock %}
// ... lines 16 - 72
See Code Block in Script
// ... lines 1 - 16
{% block fos_user_content %}
<div class="container">
<div class="wrapper">
<form action="{{ path("fos_user_security_check") }}" method="post" class="form-signin">
<h3><img class="dumbbell" src="{{ asset('build/static/dumbbell.png') }}">Login! Start Lifting!</h3>
// ... lines 22 - 67
</form>
</div>
</div>
{% endblock fos_user_content %}
See Code Block in Script
// ... lines 1 - 4
{% block stylesheets %}
// ... lines 6 - 7
<link rel="stylesheet" href="{{ asset('build/login.css') }}" />
{% endblock %}
// ... lines 10 - 72
See Code Block in Script
// ... lines 1 - 4
use Symfony\Component\Validator\Constraints as Assert;
class ApiToken
{
// ... lines 9 - 14
/**
* @Assert\NotBlank(message="Please add some notes about this token")
*/
public $notes;
// ... lines 19 - 32
}
See Code Block in Script
25 lines | app/config/security.yml
# To get started with security, check out the documentation:
# http://symfony.com/doc/current/book/security.html
security:
// ... lines 4 - 9
firewalls:
# disables authentication for assets and the profiler, adapt it according to your needs
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
anonymous: ~
# activate different ways to authenticate
# http_basic: ~
# http://symfony.com/doc/current/book/security.html#a-configuring-how-your-users-will-authenticate
# form_login: ~
# http://symfony.com/doc/current/cookbook/security/form_login_setup.html
See Code Block in Script
// ... 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