src/ItePHP/Action/AuthenticateEvent.php
private function createResponseRedirect($redirect,Request $request){
		$response=new Response();
		if($request->isAjax()){
			$response->setStatusCode(401);
			$response->setHeader('X-Location',$redirect);
		}
		else{
			$response->redirect($redirect);
		}
		return $response;
	}
private function createResponseRedirect($redirect,Request $request){
		$response=new Response();
		if($request->isAjax()){
			$response->setStatusCode(401);
			$response->setHeader('X-Location',$redirect);
		}
		else{
			$response->redirect($redirect);
		}
		return $response;
	}
private function createResponseRedirect ( $ redirect , Request $ request ) { $ response = new Response ( ) ; if ( $ request -> isAjax ( ) ) { $ response -> setStatusCode ( 401 ) ; $ response -> setHeader ( 'X-Location' , $ redirect ) ; } else { $ response -> redirect ( $ redirect ) ; } return $ response ; }
Check authenticate.

@param string $redirect
@param Request $request
@return Response
Check authenticate .