src/mako/gatekeeper/adapters/Session.php
public function basicAuth(bool $clearResponse = false): bool
	{
		if($this->isLoggedIn() || $this->login($this->request->getUsername(), $this->request->getPassword()) === true)
		{
			return true;
		}

		if($clearResponse)
		{
			$this->response->clear();
		}

		$this->response->getHeaders()->add('WWW-Authenticate', 'basic');

		$this->response->setStatus(401);

		return false;
	}
public function basicAuth(bool $clearResponse = false): bool
	{
		if($this->isLoggedIn() || $this->login($this->request->getUsername(), $this->request->getPassword()) === true)
		{
			return true;
		}

		if($clearResponse)
		{
			$this->response->clear();
		}

		$this->response->getHeaders()->add('WWW-Authenticate', 'basic');

		$this->response->setStatus(401);

		return false;
	}
public function basicAuth ( bool $ clearResponse = false ) : bool { if ( $ this -> isLoggedIn ( ) || $ this -> login ( $ this -> request -> getUsername ( ) , $ this -> request -> getPassword ( ) ) === true ) { return true ; } if ( $ clearResponse ) { $ this -> response -> clear ( ) ; } $ this -> response -> getHeaders ( ) -> add ( 'WWW-Authenticate' , 'basic' ) ; $ this -> response -> setStatus ( 401 ) ; return false ; }
Returns a basic authentication response if login is required and null if not.

@param  bool $clearResponse Clear all previously set headers and cookies from the response?
@return bool
Returns a basic authentication response if login is required and null if not .