final public function requireBasicLogin($realm = 'Restricted')
	{
		if (! (
			array_key_exists('PHP_AUTH_USER', $_SERVER)
			and array_key_exists('PHP_AUTH_PW', $_SERVER)
		)) {
			$this->_basicAuthFailed($realm);
		} else {
			$this->loginWith([
				'user' => $_SERVER['PHP_AUTH_USER'],
				'password' => $_SERVER['PHP_AUTH_PW']
			]);

			if (! $this->logged_in) {
				$this->_basicAuthFailed($realm);
			}
		}
	}
final public function requireBasicLogin($realm = 'Restricted')
	{
		if (! (
			array_key_exists('PHP_AUTH_USER', $_SERVER)
			and array_key_exists('PHP_AUTH_PW', $_SERVER)
		)) {
			$this->_basicAuthFailed($realm);
		} else {
			$this->loginWith([
				'user' => $_SERVER['PHP_AUTH_USER'],
				'password' => $_SERVER['PHP_AUTH_PW']
			]);

			if (! $this->logged_in) {
				$this->_basicAuthFailed($realm);
			}
		}
	}
final public function requireBasicLogin ( $ realm = 'Restricted' ) { if ( ! ( array_key_exists ( 'PHP_AUTH_USER' , $ _SERVER ) and array_key_exists ( 'PHP_AUTH_PW' , $ _SERVER ) ) ) { $ this -> _basicAuthFailed ( $ realm ) ; } else { $ this -> loginWith ( [ 'user' => $ _SERVER [ 'PHP_AUTH_USER' ] , 'password' => $ _SERVER [ 'PHP_AUTH_PW' ] ] ) ; if ( ! $ this -> logged_in ) { $ this -> _basicAuthFailed ( $ realm ) ; } } }
Check for Basic Auth credentials and attempt to login if present

@param  string $realm The "realm" to pass along if asking for credentials
@return void
Check for Basic Auth credentials and attempt to login if present