equal
deleted
inserted
replaced
12 * obtain it through the world-wide-web, please send an email |
12 * obtain it through the world-wide-web, please send an email |
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Amf |
16 * @package Zend_Amf |
17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
17 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @license http://framework.zend.com/license/new-bsd New BSD License |
18 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @version $Id: Auth.php 24593 2012-01-05 20:35:02Z matthew $ |
19 * @version $Id$ |
20 */ |
20 */ |
21 |
21 |
22 /** @see Zend_Amf_Auth_Abstract */ |
22 /** @see Zend_Amf_Auth_Abstract */ |
23 require_once 'Zend/Amf/Auth/Abstract.php'; |
23 require_once 'Zend/Amf/Auth/Abstract.php'; |
24 |
24 |
26 require_once 'Zend/Acl.php'; |
26 require_once 'Zend/Acl.php'; |
27 |
27 |
28 /** @see Zend_Auth_Result */ |
28 /** @see Zend_Auth_Result */ |
29 require_once 'Zend/Auth/Result.php'; |
29 require_once 'Zend/Auth/Result.php'; |
30 |
30 |
|
31 /** @see Zend_Xml_Security */ |
|
32 require_once 'Zend/Xml/Security.php'; |
|
33 |
31 /** |
34 /** |
32 * This class implements authentication against XML file with roles for Flex Builder. |
35 * This class implements authentication against XML file with roles for Flex Builder. |
33 * |
36 * |
34 * @package Zend_Amf |
37 * @package Zend_Amf |
35 * @subpackage Adobe |
38 * @subpackage Adobe |
36 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
39 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
37 * @license http://framework.zend.com/license/new-bsd New BSD License |
40 * @license http://framework.zend.com/license/new-bsd New BSD License |
38 */ |
41 */ |
39 class Zend_Amf_Adobe_Auth extends Zend_Amf_Auth_Abstract |
42 class Zend_Amf_Adobe_Auth extends Zend_Amf_Auth_Abstract |
40 { |
43 { |
41 |
44 |
59 * @param string $rolefile File containing XML with users and roles |
62 * @param string $rolefile File containing XML with users and roles |
60 */ |
63 */ |
61 public function __construct($rolefile) |
64 public function __construct($rolefile) |
62 { |
65 { |
63 $this->_acl = new Zend_Acl(); |
66 $this->_acl = new Zend_Acl(); |
64 $xml = simplexml_load_file($rolefile); |
67 $xml = Zend_Xml_Security::scanFile($rolefile); |
65 /* |
68 /* |
66 Roles file format: |
69 Roles file format: |
67 <roles> |
70 <roles> |
68 <role id=”admin”> |
71 <role id=”admin”> |
69 <user name=”user1” password=”pwd”/> |
72 <user name=”user1” password=”pwd”/> |