1 | <?php |
||
5 | class WsSecurity |
||
6 | { |
||
7 | /** |
||
8 | * @var Security |
||
9 | */ |
||
10 | protected $security; |
||
11 | /** |
||
12 | * @param string $username |
||
13 | * @param string $password |
||
14 | * @param bool $passwordDigest |
||
15 | * @param int $addCreated |
||
16 | * @param int $addExpires |
||
17 | * @param bool $mustunderstand |
||
18 | * @param string $actor |
||
19 | * @param string $usernameId |
||
20 | * @param bool $addNonce |
||
21 | */ |
||
22 | 48 | protected function __construct($username, $password, $passwordDigest = false, $addCreated = 0, $addExpires = 0, $mustunderstand = false, $actor = null, $usernameId = null, $addNonce = true) |
|
32 | /** |
||
33 | * @param bool $mustunderstand |
||
34 | * @param string $actor |
||
35 | * @return WsSecurity |
||
36 | */ |
||
37 | 48 | protected function initSecurity($mustunderstand = false, $actor = null) |
|
42 | /** |
||
43 | * @return Security |
||
44 | */ |
||
45 | 48 | public function getSecurity() |
|
49 | /** |
||
50 | * Create the SoapHeader object to send as SoapHeader in the SOAP request. |
||
51 | * @param string $username |
||
52 | * @param string $password |
||
53 | * @param bool $passwordDigest |
||
54 | * @param int $addCreated |
||
55 | * @param int $addExpires |
||
56 | * @param bool $mustunderstand |
||
57 | * @param string $actor |
||
58 | * @param string $usernameId |
||
59 | * @param bool $addNonce |
||
60 | * @return \SoapHeader|\SoapVar |
||
61 | */ |
||
62 | 48 | public static function createWsSecuritySoapHeader($username, $password, $passwordDigest = false, $addCreated = 0, $addExpires = 0, $returnSoapHeader = true, $mustunderstand = false, $actor = null, $usernameId = null, $addNonce = true) |
|
75 | /** |
||
76 | * @param string $username |
||
77 | * @param string $usernameId |
||
78 | * @return WsSecurity |
||
79 | */ |
||
80 | 48 | protected function setUsernameToken($username, $usernameId = null) |
|
87 | /** |
||
88 | * @param string $password |
||
89 | * @param bool $passwordDigest |
||
90 | * @param int $addCreated |
||
91 | * @return WsSecurity |
||
92 | */ |
||
93 | 48 | protected function setPassword($password, $passwordDigest = false, $addCreated = 0) |
|
98 | /** |
||
99 | * @param bool $addNonce |
||
100 | * @return WsSecurity |
||
101 | */ |
||
102 | 48 | protected function setNonce($addNonce) |
|
112 | /** |
||
113 | * @param int $addCreated |
||
114 | * @return WsSecurity |
||
115 | */ |
||
116 | 48 | protected function setCreated($addCreated) |
|
125 | /** |
||
126 | * @param int $addCreated |
||
127 | * @param int $addExpires |
||
128 | * @return WsSecurity |
||
129 | */ |
||
130 | 48 | protected function setTimestamp($addCreated = 0, $addExpires = 0) |
|
141 | /** |
||
142 | * @return UsernameToken |
||
143 | */ |
||
144 | 48 | protected function getUsernameToken() |
|
148 | /** |
||
149 | * @return Password |
||
150 | */ |
||
151 | 48 | protected function getPassword() |
|
155 | } |
||
156 |