Skip to content

Instantly share code, notes, and snippets.

@ThijsFeryn
Created April 20, 2018 09:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThijsFeryn/ffee81b11f01577d444db2fb8a425289 to your computer and use it in GitHub Desktop.
Save ThijsFeryn/ffee81b11f01577d444db2fb8a425289 to your computer and use it in GitHub Desktop.
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