Skip to content

Instantly share code, notes, and snippets.

Wouter J wouterj

Block or report user

Report or block wouterj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View RememberMeAuthenticator.php
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
View security.yml
security:
encoders:
AppBundle\Entity\User:
algorithm: pbkdf2
hash_algorithm: sha512
encode_as_base64: true
iterations: 1000
# http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers
providers:
our_db_provider:
@wouterj
wouterj / README.md
Last active May 21, 2016 — forked from weaverryan/README.md
Welcome to Symfony Documentation Hack Day May 21st, 2016
View README.md

It's a Doc Hack Day!

Welcome! No matter what you're level of Symfony or how you feel about your English (I'm sure it's just fine), we have plenty of things we need help with! This document will guide you through everything:

Where are we meeting?

We're meeting on Freenode in the #symfony-docs

View 1-the-unit.php
<?php
// ...
class MyUnit
{
private $authChecker;
public function __construct(AuthorizationCheckerInterface $authChecker)
{
View examples.md
View gist:cf14f45f8e55170c5fcc
firewalls:
# disables authentication for assets and the profiler, adapt it according to your needs
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
pattern: ^/
provider: db_provider
anonymous: ~
View PostController.php
<?php
class PostController extends Controller
{
public function showAction($slug, $_template)
{
$post = $this->someBackend->findBySlug($slug);
return $this->render($_template, ['post' => $post]);
}
View 0-the-case.md

Every request, get the current logged in user (on the PC, no idea how they plan to implement this) and authenticate this user in the app (creating a new user if it doesn't exists yet).

View MailLogger.php
<?php
// ...
class MailLogger implements LoggerInterface
{
private $mailer;
public function __construct(MailerInterface $mailer)
{
$this->mailer = $mailer;
You can’t perform that action at this time.