config.inc 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. // auth method: generic (auth/plugins/generic_conf.inc) or ldap (auth/plugins/ldap_conf.inc)
  3. $config['auth_method']='generic';
  4. // set to true for debugging XML response, otherwise set to false to avoid browser
  5. // to show http authentication window after unsuccessful authentication
  6. $config['auth_send_authenticate_header']=false;
  7. // successfull authentication XML specification (change the "http://www.server.com:80" to your protocol/server/port)
  8. $config['accounts']=array('resources'=>array());
  9. // note: if you want to use regex values, then use one of the following formats (the second example is with regex modifier): 're:.*someregex.*[0-9]$' or 're|i:.*someregex.*[0-9]$'
  10. // note: 'crossdomain' and 'withcredentials' are still available but there is NO REASON to use them (crossDomain is detected automatically, and I've never seen anyone who understand when to use withCredentials /there is NO REASON to set it to true!/)
  11. // note: 'syncinterval' was removed - use globalSyncResourcesInterval in config.js instead
  12. $config['accounts']['resources'][]=array(
  13. 'resource'=>array(
  14. 'type'=>array('addressbook'=>''),
  15. 'href'=>(empty($_SERVER['HTTPS']) ? 'http' : 'https').'://www.server.com:80/caldav.php/'.$_SERVER['PHP_AUTH_USER'].'/',
  16. 'hreflabel'=>'null', // if undefined or empty href value is used (see above)
  17. 'forcereadonly'=>'null', // see auth/doc/example_config_response.xml for proper use, for example: 'forcereadonly'=>array(array('collection'=>'/caldav.php/user/collection/'), array('collection'=>'re:^/caldav.php/user/collection[0-9]/$')),
  18. 'settingsaccount'=>'true', // client properties are saved here (note: set it to true only for ONE account)
  19. 'checkcontenttype'=>'true', // check content-type in the server response (if you cannot see data in the interface /buggy server response/ you may try to disable it)
  20. 'delegation'=>'true', // see auth/doc/example_config_response.xml for proper use, for example: 'delegation'=>array(array('resource'=>'/caldav.php/user%40domain.com/'), array('resource'=>'re|i:^/caldav.php/a[b-x].+/$')),
  21. 'userauth'=>array(
  22. 'username'=>$_SERVER['PHP_AUTH_USER'],
  23. 'password'=>$_SERVER['PHP_AUTH_PW']
  24. ),
  25. 'timeout'=>90000,
  26. 'locktimeout'=>10000
  27. )
  28. );
  29. /*
  30. // additional accounts
  31. $config['accounts']['resources'][]=array(
  32. 'resource'=>array(
  33. 'type'=>array('addressbook'=>''),
  34. 'href'=>'http://www.server.com:80/caldav.php/resource/',
  35. 'hreflabel'=>'null', // if undefined or empty href value is used (see above)
  36. 'forcereadonly'=>'null', // see auth/doc/example_config_response.xml for proper use, for example: 'forcereadonly'=>array(array('collection'=>'/caldav.php/user/collection/'), array('collection'=>'re:^/caldav.php/user/collection[0-9]/$')),
  37. 'settingsaccount'=>'false', // client properties are saved here (note: set it to true only for ONE account)
  38. 'checkcontenttype'=>'true', // check content-type in the server response (if you cannot see data in the interface /buggy server response/ you may try to disable it)
  39. 'delegation'=>'true', // see auth/doc/example_config_response.xml for proper use, for example: 'delegation'=>array(array('resource'=>'/caldav.php/user%40domain.com/'), array('resource'=>'re|i:^/caldav.php/a[b-x].+/$')),
  40. 'userauth'=>array(
  41. 'username'=>$_SERVER['PHP_AUTH_USER'],
  42. 'password'=>$_SERVER['PHP_AUTH_PW']
  43. ),
  44. 'timeout'=>90000,
  45. 'locktimeout'=>10000
  46. )
  47. );
  48. */
  49. ?>