egroupware_official/soap.php

71 lines
2.1 KiB
PHP
Raw Normal View History

2001-08-10 02:31:21 +02:00
<?php
/**************************************************************************\
2004-01-01 16:38:15 +01:00
* eGroupWare - SOAP Server *
* http://www.egroupware.org *
* Written by Miles Lott <milos@groupwhere.org> *
2001-08-10 02:31:21 +02:00
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
$egw_info = array();
$GLOBALS['egw_info']['flags'] = array(
2001-08-10 02:31:21 +02:00
'disable_Template_class' => True,
'currentapp' => 'login',
'noheader' => True,
'disable_Template_class' => True
2001-08-10 02:31:21 +02:00
);
include('./header.inc.php');
$GLOBALS['server'] = CreateObject('phpgwapi.soap_server');
/* _debug_array($GLOBALS['server']);exit; */
/* include(EGW_API_INC . '/soaplib.soapinterop.php'); */
2004-01-01 16:38:15 +01:00
/* Note: this command only available under Apache */
$headers = getallheaders();
if(ereg('Basic',$headers['Authorization']))
{
$tmp = $headers['Authorization'];
2004-01-01 16:38:15 +01:00
$tmp = str_replace(' ','',$tmp);
$tmp = str_replace('Basic','',$tmp);
$auth = base64_decode(trim($tmp));
list($sessionid,$kp3) = split(':',$auth);
2001-08-10 02:31:21 +02:00
if($GLOBALS['egw']->session->verify($sessionid,$kp3))
{
$GLOBALS['server']->authed = True;
}
elseif($GLOBALS['egw']->session->verify_server($sessionid,$kp3))
{
$GLOBALS['server']->authed = True;
}
}
2001-08-10 02:31:21 +02:00
$GLOBALS['server']->add_to_map(
'system_login',
array('soapstruct'),
array('soapstruct')
);
$GLOBALS['server']->add_to_map(
'system_logout',
array('soapstruct'),
array('soapstruct')
);
if(function_exists('system_listapps'))
{
$GLOBALS['server']->add_to_map(
'system_listApps',
array(),
array('soapstruct')
);
}
$GLOBALS['server']->service($HTTP_RAW_POST_DATA);
2001-08-10 02:31:21 +02:00
?>