protected function getAuth(array $config)
	{
		if (isset($config['key']) && trim($config['key']) != '')
		{
			return array('key' => $config['key'], 'keyphrase' => $config['keyphrase']);
		}
		elseif (isset($config['keytext']) && trim($config['keytext']) != '')
		{
			return array('keytext' => $config['keytext']);
		}
		elseif (isset($config['password']))
		{
			return array('password' => $config['password']);
		}

		throw new \InvalidArgumentException('Password / key is required.');
	}
protected function getAuth(array $config)
	{
		if (isset($config['key']) && trim($config['key']) != '')
		{
			return array('key' => $config['key'], 'keyphrase' => $config['keyphrase']);
		}
		elseif (isset($config['keytext']) && trim($config['keytext']) != '')
		{
			return array('keytext' => $config['keytext']);
		}
		elseif (isset($config['password']))
		{
			return array('password' => $config['password']);
		}

		throw new \InvalidArgumentException('Password / key is required.');
	}
protected function getAuth ( array $ config ) { if ( isset ( $ config [ 'key' ] ) && trim ( $ config [ 'key' ] ) != '' ) { return array ( 'key' => $ config [ 'key' ] , 'keyphrase' => $ config [ 'keyphrase' ] ) ; } elseif ( isset ( $ config [ 'keytext' ] ) && trim ( $ config [ 'keytext' ] ) != '' ) { return array ( 'keytext' => $ config [ 'keytext' ] ) ; } elseif ( isset ( $ config [ 'password' ] ) ) { return array ( 'password' => $ config [ 'password' ] ) ; } throw new \ InvalidArgumentException ( 'Password / key is required.' ) ; }
Format the appropriate authentication array payload.

@param  array  $config
@return array

@throws \InvalidArgumentException
Format the appropriate authentication array payload .