protected function transformAuthException(Exception $exception) { if ($exception instanceof AuthenticationException) { throw new UnauthenticatedException(); } if ($exception instanceof AuthorizationException) { throw new UnauthorizedException(); } }