1000 search results

<?php
// ... line 2
namespace AppBundle\Security;
// ... lines 4 - 19
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 22 - 101
}
See Code Block in Script
// ... lines 1 - 10
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
// ... lines 12 - 15
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 18 - 22
public function __construct(FormFactoryInterface $formFactory, EntityManager $em, RouterInterface $router, UserPasswordEncoderInterface $passwordEncoder)
{
// ... lines 25 - 28
}
// ... lines 30 - 78
}
See Code Block in Script
// ... lines 1 - 10
{% block javascripts %}
// ... lines 12 - 13
<script src="{{ asset('assets/js/login.js') }}"></script>
{% endblock %}
// ... lines 16 - 72
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 - 10
{% 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 16 - 61
</form>
</div>
</div>
{% endblock fos_user_content %}
See Code Block in Script
// ... lines 1 - 10
{% block stylesheets %}
{{ parent() }}
<link rel="stylesheet" href="{{ asset('build/login.css') }}">
{% endblock %}
// ... lines 16 - 72
See Code Block in Script
47 lines | src/AppBundle/Entity/Security.php
// ... lines 1 - 2
namespace AppBundle\Entity;
// ... line 4
use Doctrine\ORM\Mapping as ORM;
// ... line 6
/**
* @ORM\Entity
* @ORM\Table(name="securities")
*/
class Security
{
/**
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string")
*/
private $name;
/**
* @ORM\Column(type="boolean")
*/
private $isActive;
/**
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\Enclosure", inversedBy="securities")
*/
private $enclosure;
public function __construct(string $name, bool $isActive, Enclosure $enclosure)
{
$this->name = $name;
$this->isActive = $isActive;
$this->enclosure = $enclosure;
}
public function getIsActive(): bool
{
return $this->isActive;
}
}
See Code Block in Script
// ... lines 1 - 15
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
{
// ... lines 18 - 30
public function supports(Request $request)
{
return $request->getPathInfo() == '/login' && $request->isMethod('POST');
}
// ... line 35
public function getCredentials(Request $request)
{
// ... lines 38 - 47
}
// ... lines 49 - 77
}
See Code Block in Script
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