Skip to content

Instantly share code, notes, and snippets.

@ThijsFeryn ThijsFeryn/start.php
Created Apr 20, 2018

Embed
What would you like to do?
public function start(Request $request, AuthenticationException $authException = null)
{
$jwtPayload = $this->getJwtPayload($request->cookies->get('token'));
if(isset($jwtPayload['sub'])) {
return new Response("Don't wanna to this, really. The actual protected page should show up instead");
}
return new RedirectResponse($this->router->generate('login'));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.