Created
April 20, 2018 09:53
-
-
Save ThijsFeryn/ffee81b11f01577d444db2fb8a425289 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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