Skip to content

Instantly share code, notes, and snippets.

@isopen
Last active September 23, 2019 09:46
Show Gist options
  • Save isopen/e1d081ae6329f97dedecee559fecf85b to your computer and use it in GitHub Desktop.
Save isopen/e1d081ae6329f97dedecee559fecf85b to your computer and use it in GitHub Desktop.
<?php
use Symfony\Component\HttpFoundation\Session\SessionInterface;
class AppDefaultAuthenticator extends AbstractGuardAuthenticator implements AuthenticatorInterface
{
...
private $session;
...
public function __construct(SessionInterface $session) {
$this->session = $session;
}
...
public function getCredentials(Request $request)
{
$this->session->set(
Security::LAST_USERNAME,
);
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment