Summary | ActiveSync AutoDiscover : Extend Driver.php to store the request and response schema in the properties |
Queue | Horde Framework Packages |
Queue Version | Git develop |
Type | Enhancement |
State | Resolved |
Priority | 1. Low |
Owners | mrubinsk (at) horde (dot) org |
Requester | torben (at) dannhauer (dot) info |
Created | 11/04/2012 (4628 days ago) |
Due | |
Updated | 11/05/2012 (4627 days ago) |
Assigned | |
Resolved | 11/05/2012 (4627 days ago) |
Milestone | |
Patch | Yes |
_buildResponseString() method, but did not do it in the
Horde_Core_ActiveSync_Driver class. We should not be doing any
input stream parsing/manipulation outside of the ActiveSync request
handlers. Plus, we already have the data parsed, no need to parse it
again.
is not my primary profession and the horde internals are overwhelming.
Thanks for fixing it!
Assigned to Michael Rubinsky
State ⇒ Resolved
_buildResponseString() method, but did not do it in the
Horde_Core_ActiveSync_Driver class. We should not be doing any input
stream parsing/manipulation outside of the ActiveSync request
handlers. Plus, we already have the data parsed, no need to parse it
again.
commit 283c402499ed9c6d24df70c6913ab56fccb70b7d
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date: Mon Nov 5 10:20:00 2012 -0500
Pass the request_schema and response_schema to the autodiscover response.
Request: 11637.../lib/Horde/ActiveSync/Request/Autodiscover.php | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/283c402499ed9c6d24df70c6913ab56fccb70b7d
Priority ⇒ 1. Low
Priority ⇒ 2. Medium
Type ⇒ Enhancement
Summary ⇒ ActiveSync AutoDiscover : Extend Driver.php to store the request and response schema in the properties
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ Yes
State ⇒ New
autodiscover, it is neccessary to store the request-schema and
response schema in the properties array.
It will be used in a second ActiveSycnc Enhancement I will post as
tickets in some minutes.
Therefore please extend "/Horde/Core/ActiveSync/Driver.php :: autoDiscover()"
with the following lines:
xml_parse_into_struct(xml_parser_create(),
Horde_Rpc::getInput(), $values);
$results['request_schema'] = $values[0]['attributes']['XMLNS'];
$results['response_schema'] = $values[3]['value'];
The full function should look like this:
/**
* Attempt to autodiscover. Autodiscovery happens before the user is
* authenticated, and ALWAYS uses the user's email address. We have to
* do our best to translate email address to username. If this fails, the
* device simply falls back to requiring full user configuration.
*
* @return array
*/
public function autoDiscover()
{
$results = array();
// Attempt to get a username from the email address.
$ident = $GLOBALS['injector']
->getInstance('Horde_Core_Factory_Identity')
->create($GLOBALS['registry']->getAuth());
$results['display_name'] = $ident->getValue('fullname');
$results['email'] = $ident->getValue('from_addr');
$url = parse_url((string)Horde::url(null, true));
$results['url'] = $url['scheme'] . '://' . $url['host'] .
'/Microsoft-Server-ActiveSync';
xml_parse_into_struct(xml_parser_create(),
Horde_Rpc::getInput(), $values);
$results['request_schema'] = $values[0]['attributes']['XMLNS'];
$results['response_schema'] = $values[3]['value'];
// As of Exchange 2007, this always returns en:en
$results['culture'] = 'en:en';
return $results;
}