|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace SimpleSAML\Module\adfs; |
|
6
|
|
|
|
|
7
|
|
|
use SimpleSAML\Module; |
|
8
|
|
|
use SimpleSAML\Module\adfs\Trust; |
|
9
|
|
|
use SimpleSAML\WSDL\XML\soap12\Address as Soap12Address; |
|
10
|
|
|
use SimpleSAML\WSDL\XML\soap12\Binding as Soap12Binding; |
|
11
|
|
|
use SimpleSAML\WSDL\XML\soap12\Body as Soap12Body; |
|
12
|
|
|
use SimpleSAML\WSDL\XML\soap12\Operation as Soap12Operation; |
|
13
|
|
|
use SimpleSAML\WSDL\XML\wsdl\Binding; |
|
14
|
|
|
use SimpleSAML\WSDL\XML\wsdl\BindingOperation; |
|
15
|
|
|
use SimpleSAML\WSDL\XML\wsdl\BindingOperationInput; |
|
16
|
|
|
use SimpleSAML\WSDL\XML\wsdl\BindingOperationOutput; |
|
17
|
|
|
use SimpleSAML\WSDL\XML\wsdl\Definitions; |
|
18
|
|
|
use SimpleSAML\WSDL\XML\wsdl\Input; |
|
19
|
|
|
use SimpleSAML\WSDL\XML\wsdl\Message; |
|
20
|
|
|
use SimpleSAML\WSDL\XML\wsdl\Output; |
|
21
|
|
|
use SimpleSAML\WSDL\XML\wsdl\Part; |
|
22
|
|
|
use SimpleSAML\WSDL\XML\wsdl\Port; |
|
23
|
|
|
use SimpleSAML\WSDL\XML\wsdl\PortType; |
|
24
|
|
|
use SimpleSAML\WSDL\XML\wsdl\PortTypeOperation; |
|
25
|
|
|
use SimpleSAML\WSDL\XML\wsdl\Service; |
|
26
|
|
|
use SimpleSAML\WSSecurity\Constants as C; |
|
27
|
|
|
use SimpleSAML\WSSecurity\XML\wsa_200508\Address; |
|
28
|
|
|
use SimpleSAML\WSSecurity\XML\wsa_200508\EndpointReference; |
|
29
|
|
|
use SimpleSAML\WSSecurity\XML\wsp\PolicyReference; |
|
30
|
|
|
use SimpleSAML\WSSecurity\XML\wst_200502\RequestSecurityToken as RequestSecurityToken2005; |
|
31
|
|
|
use SimpleSAML\WSSecurity\XML\wst_200502\RequestSecurityTokenResponse as RequestSecurityTokenResponse2005; |
|
32
|
|
|
//use SimpleSAML\WSSecurity\XML\wst_200512\RequestSecurityToken as RequestSecurityToken13; |
|
33
|
|
|
//use SimpleSAML\WSSecurity\XML\wst_200512\RequestSecurityTokenResponseCollection as RequestSecurityTokenResponseCollection13; |
|
34
|
|
|
use SimpleSAML\XML\Attribute as XMLAttribute; |
|
35
|
|
|
|
|
36
|
|
|
//use SimpleSAML\XML\Chunk; |
|
37
|
|
|
//use SimpleSAML\XML\DOMDocumentFactory; |
|
38
|
|
|
use function array_merge; |
|
39
|
|
|
use function sprintf; |
|
40
|
|
|
|
|
41
|
|
|
/** |
|
42
|
|
|
* Common code for building MetaExchange (mex) documents based on the available configuration. |
|
43
|
|
|
* |
|
44
|
|
|
* @package simplesamlphp/simplesamlphp-module-adfs |
|
45
|
|
|
*/ |
|
46
|
|
|
class MetadataExchange |
|
47
|
|
|
{ |
|
48
|
|
|
/** |
|
49
|
|
|
* Constructor. |
|
50
|
|
|
*/ |
|
51
|
|
|
public function __construct() |
|
52
|
|
|
{ |
|
53
|
|
|
} |
|
54
|
|
|
|
|
55
|
|
|
|
|
56
|
|
|
/** |
|
57
|
|
|
* Build a mex document |
|
58
|
|
|
* |
|
59
|
|
|
* @return \SimpleSAML\WSDL\XML\wsdl\Definitions |
|
60
|
|
|
*/ |
|
61
|
|
|
public function buildDocument(): Definitions |
|
62
|
|
|
{ |
|
63
|
|
|
return new Definitions( |
|
64
|
|
|
targetNamespace: 'http://schemas.microsoft.com/ws/2008/06/identity/securitytokenservice', |
|
65
|
|
|
name: 'SecurityTokenService', |
|
66
|
|
|
//import: [], |
|
67
|
|
|
//types: $this->getTypes(), |
|
68
|
|
|
message: $this->getMessages(), |
|
69
|
|
|
portType: $this->getPortTypes(), |
|
70
|
|
|
binding: $this->getBindings(), |
|
71
|
|
|
service: $this->getServices(), |
|
72
|
|
|
elements: $this->getPolicies(), |
|
73
|
|
|
); |
|
74
|
|
|
} |
|
75
|
|
|
|
|
76
|
|
|
|
|
77
|
|
|
/** |
|
78
|
|
|
* This method builds the wsp:Policy elements |
|
79
|
|
|
* |
|
80
|
|
|
* @return \SimpleSAML\WSSecurity\XML\wsp\Policy[] |
|
81
|
|
|
*/ |
|
82
|
|
|
private function getPolicies(): array |
|
83
|
|
|
{ |
|
84
|
|
|
$policy2005 = new Trust\Policy2005(); |
|
85
|
|
|
$policy13 = new Trust\Policy13(); |
|
|
|
|
|
|
86
|
|
|
|
|
87
|
|
|
return array_merge( |
|
88
|
|
|
$policy2005->getPolicies(), |
|
89
|
|
|
//$policy13->getPolicies(), |
|
90
|
|
|
); |
|
91
|
|
|
} |
|
92
|
|
|
|
|
93
|
|
|
|
|
94
|
|
|
/** |
|
95
|
|
|
* This method builds the wsdl:types elements |
|
96
|
|
|
* |
|
97
|
|
|
* @return \SimpleSAML\WSSL\XML\wsdl\Types[] |
|
98
|
|
|
private function getTypes(): array |
|
99
|
|
|
{ |
|
100
|
|
|
$defaultEndpoint = Module::getModuleURL('adfs/services/trust/mex'); |
|
101
|
|
|
$xml = <<<IMPORT |
|
102
|
|
|
<xsd:schema |
|
103
|
|
|
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|
104
|
|
|
targetNamespace="http://schemas.microsoft.com/ws/2008/06/identity/securitytokenservice/Imports"> |
|
105
|
|
|
<xsd:import schemaLocation="$defaultEndpoint?xsd=xsd0" namespace="http://schemas.microsoft.com/Message"/> |
|
106
|
|
|
<xsd:import schemaLocation="$defaultEndpoint?xsd=xsd1" namespace="http://schemas.xmlsoap.org/ws/2005/02/trust"/> |
|
107
|
|
|
<xsd:import schemaLocation="$defaultEndpoint?xsd=xsd2" namespace="http://docs.oasis-open.org/ws-sx/ws-trust/200512"/> |
|
108
|
|
|
</xsd:schema> |
|
109
|
|
|
IMPORT; |
|
110
|
|
|
|
|
111
|
|
|
return [ |
|
112
|
|
|
new Types([ |
|
113
|
|
|
new Chunk(DOMDocumentFactory::fromString($xml)->documentElement), |
|
114
|
|
|
]), |
|
115
|
|
|
]; |
|
116
|
|
|
} |
|
117
|
|
|
*/ |
|
118
|
|
|
|
|
119
|
|
|
|
|
120
|
|
|
/** |
|
121
|
|
|
* This method builds the wsdl:message elements |
|
122
|
|
|
* |
|
123
|
|
|
* @return \SimpleSAML\WSDL\XML\wsdl\Message[] |
|
124
|
|
|
*/ |
|
125
|
|
|
private function getMessages(): array |
|
126
|
|
|
{ |
|
127
|
|
|
return [ |
|
128
|
|
|
new Message( |
|
129
|
|
|
'IWSTrustFeb2005Async_TrustFeb2005IssueAsync_InputMessage', |
|
130
|
|
|
[new Part( |
|
131
|
|
|
'request', |
|
132
|
|
|
sprintf( |
|
133
|
|
|
"%s:%s", |
|
134
|
|
|
RequestSecurityToken2005::getNamespacePrefix(), |
|
135
|
|
|
RequestSecurityToken2005::getLocalName(), |
|
136
|
|
|
), |
|
137
|
|
|
)], |
|
138
|
|
|
), |
|
139
|
|
|
new Message( |
|
140
|
|
|
'IWSTrustFeb2005Async_TrustFeb2005IssueAsync_OutputMessage', |
|
141
|
|
|
[new Part( |
|
142
|
|
|
'TrustFeb2005IssueAsyncResult', |
|
143
|
|
|
sprintf( |
|
144
|
|
|
"%s:%s", |
|
145
|
|
|
RequestSecurityTokenResponse2005::getNamespacePrefix(), |
|
146
|
|
|
RequestSecurityTokenResponse2005::getLocalName(), |
|
147
|
|
|
), |
|
148
|
|
|
)], |
|
149
|
|
|
), |
|
150
|
|
|
/* |
|
151
|
|
|
new Message( |
|
152
|
|
|
'IWSTrust13Async_Trust13IssueAsync_InputMessage', |
|
153
|
|
|
[new Part( |
|
154
|
|
|
'request', |
|
155
|
|
|
sprintf( |
|
156
|
|
|
"%s:%s", |
|
157
|
|
|
RequestSecurityToken13::getNamespacePrefix(), |
|
158
|
|
|
RequestSecurityToken13::getLocalName(), |
|
159
|
|
|
), |
|
160
|
|
|
)], |
|
161
|
|
|
), |
|
162
|
|
|
new Message( |
|
163
|
|
|
'IWSTrust13Async_Trust13IssueAsync_OutputMessage', |
|
164
|
|
|
[new Part( |
|
165
|
|
|
'Trust13IssueAsyncResult', |
|
166
|
|
|
sprintf( |
|
167
|
|
|
"%s:%s", |
|
168
|
|
|
RequestSecurityTokenResponseCollection13::getNamespacePrefix(), |
|
169
|
|
|
RequestSecurityTokenResponseCollection13::getLocalName(), |
|
170
|
|
|
), |
|
171
|
|
|
)], |
|
172
|
|
|
), |
|
173
|
|
|
*/ |
|
174
|
|
|
]; |
|
175
|
|
|
} |
|
176
|
|
|
|
|
177
|
|
|
|
|
178
|
|
|
/** |
|
179
|
|
|
* This method builds the wsdl:portType elements |
|
180
|
|
|
* |
|
181
|
|
|
* @return \SimpleSAML\WSDL\XML\wsdl\PortType[] |
|
182
|
|
|
*/ |
|
183
|
|
|
private function getPortTypes(): array |
|
184
|
|
|
{ |
|
185
|
|
|
return [ |
|
186
|
|
|
new PortType('IWSTrustFeb2005Async', [ |
|
187
|
|
|
new PortTypeOperation( |
|
188
|
|
|
name: 'TrustFeb2005IssueAsync', |
|
189
|
|
|
input: new Input( |
|
190
|
|
|
message: 'tns:IWSTrustFeb2005Async_TrustFeb2005IssueAsync_InputMessage', |
|
191
|
|
|
attributes: [ |
|
192
|
|
|
new XMLAttribute( |
|
193
|
|
|
C::NS_WSDL_ADDR, |
|
194
|
|
|
'wsaw', |
|
195
|
|
|
'Action', |
|
196
|
|
|
'http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue', |
|
197
|
|
|
), |
|
198
|
|
|
], |
|
199
|
|
|
), |
|
200
|
|
|
output: new Output( |
|
201
|
|
|
message: 'tns:IWSTrustFeb2005Async_TrustFeb2005IssueAsync_OutputMessage', |
|
202
|
|
|
attributes: [ |
|
203
|
|
|
new XMLAttribute( |
|
204
|
|
|
C::NS_WSDL_ADDR, |
|
205
|
|
|
'wsaw', |
|
206
|
|
|
'Action', |
|
207
|
|
|
'http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Issue', |
|
208
|
|
|
), |
|
209
|
|
|
], |
|
210
|
|
|
), |
|
211
|
|
|
), |
|
212
|
|
|
]), |
|
213
|
|
|
/* |
|
214
|
|
|
new PortType('IWSTrust13Async', [ |
|
215
|
|
|
new PortTypeOperation( |
|
216
|
|
|
name: 'Trust13IssueAsync', |
|
217
|
|
|
input: new Input( |
|
218
|
|
|
message: 'tns:IWSTrust13Async_Trust13IssueAsync_InputMessage', |
|
219
|
|
|
attributes: [ |
|
220
|
|
|
new XMLAttribute( |
|
221
|
|
|
C::NS_WSDL_ADDR, |
|
222
|
|
|
'wsaw', |
|
223
|
|
|
'Action', |
|
224
|
|
|
'http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue', |
|
225
|
|
|
), |
|
226
|
|
|
], |
|
227
|
|
|
), |
|
228
|
|
|
output: new Output( |
|
229
|
|
|
message: 'tns:IWSTrust13Async_Trust13IssueAsync_OutputMessage', |
|
230
|
|
|
attributes: [ |
|
231
|
|
|
new XMLAttribute( |
|
232
|
|
|
C::NS_WSDL_ADDR, |
|
233
|
|
|
'wsaw', |
|
234
|
|
|
'Action', |
|
235
|
|
|
'http://docs.oasis-open.org/ws-sx/ws-trust/200512/RSTRC/IssueFinal', |
|
236
|
|
|
), |
|
237
|
|
|
], |
|
238
|
|
|
), |
|
239
|
|
|
), |
|
240
|
|
|
]), |
|
241
|
|
|
*/ |
|
242
|
|
|
]; |
|
243
|
|
|
} |
|
244
|
|
|
|
|
245
|
|
|
|
|
246
|
|
|
/** |
|
247
|
|
|
* This method builds the wsdl:binding elements |
|
248
|
|
|
* |
|
249
|
|
|
* @return \SimpleSAML\WSDL\XML\wsdl\Binding[] |
|
250
|
|
|
*/ |
|
251
|
|
|
private function getBindings(): array |
|
252
|
|
|
{ |
|
253
|
|
|
return [ |
|
254
|
|
|
new Binding( |
|
255
|
|
|
name: 'CertificateWSTrustBinding_IWSTrustFeb2005Async', |
|
256
|
|
|
type: 'tns:IWSTrustFeb2005Async', |
|
257
|
|
|
operation: [ |
|
258
|
|
|
new BindingOperation( |
|
259
|
|
|
name: 'TrustFeb2005IssueAsync', |
|
260
|
|
|
input: new BindingOperationInput( |
|
261
|
|
|
elements: [ |
|
262
|
|
|
new Soap12Body(null, null, 'literal'), |
|
263
|
|
|
], |
|
264
|
|
|
), |
|
265
|
|
|
output: new BindingOperationOutput( |
|
266
|
|
|
elements: [ |
|
267
|
|
|
new Soap12Body(null, null, 'literal'), |
|
268
|
|
|
], |
|
269
|
|
|
), |
|
270
|
|
|
elements: [ |
|
271
|
|
|
new Soap12Operation( |
|
272
|
|
|
'http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue', |
|
273
|
|
|
null, |
|
274
|
|
|
'document', |
|
275
|
|
|
), |
|
276
|
|
|
], |
|
277
|
|
|
), |
|
278
|
|
|
], |
|
279
|
|
|
elements: [ |
|
280
|
|
|
new PolicyReference( |
|
281
|
|
|
URI: '#CertificateWSTrustBinding_IWSTrustFeb2005Async_policy', |
|
282
|
|
|
DigestAlgorithm: null, |
|
283
|
|
|
), |
|
284
|
|
|
new Soap12Binding('http://schemas.xmlsoap.org/soap/http'), |
|
285
|
|
|
], |
|
286
|
|
|
), |
|
287
|
|
|
new Binding( |
|
288
|
|
|
name: 'CertificateWSTrustBinding_IWSTrustFeb2005Async1', |
|
289
|
|
|
type: 'tns:IWSTrustFeb2005Async', |
|
290
|
|
|
operation: [ |
|
291
|
|
|
new BindingOperation( |
|
292
|
|
|
name: 'TrustFeb2005IssueAsync', |
|
293
|
|
|
input: new BindingOperationInput( |
|
294
|
|
|
elements: [ |
|
295
|
|
|
new Soap12Body(null, null, 'literal'), |
|
296
|
|
|
], |
|
297
|
|
|
), |
|
298
|
|
|
output: new BindingOperationOutput( |
|
299
|
|
|
elements: [ |
|
300
|
|
|
new Soap12Body(null, null, 'literal'), |
|
301
|
|
|
], |
|
302
|
|
|
), |
|
303
|
|
|
elements: [ |
|
304
|
|
|
new Soap12Operation( |
|
305
|
|
|
'http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue', |
|
306
|
|
|
null, |
|
307
|
|
|
'document', |
|
308
|
|
|
), |
|
309
|
|
|
], |
|
310
|
|
|
), |
|
311
|
|
|
], |
|
312
|
|
|
elements: [ |
|
313
|
|
|
new PolicyReference( |
|
314
|
|
|
URI: '#CertificateWSTrustBinding_IWSTrustFeb2005Async1_policy', |
|
315
|
|
|
DigestAlgorithm: null, |
|
316
|
|
|
), |
|
317
|
|
|
new Soap12Binding('http://schemas.xmlsoap.org/soap/http'), |
|
318
|
|
|
], |
|
319
|
|
|
), |
|
320
|
|
|
new Binding( |
|
321
|
|
|
name: 'UserNameWSTrustBinding_IWSTrustFeb2005Async', |
|
322
|
|
|
type: 'tns:IWSTrustFeb2005Async', |
|
323
|
|
|
operation: [ |
|
324
|
|
|
new BindingOperation( |
|
325
|
|
|
name: 'TrustFeb2005IssueAsync', |
|
326
|
|
|
input: new BindingOperationInput( |
|
327
|
|
|
elements: [ |
|
328
|
|
|
new Soap12Body(null, null, 'literal'), |
|
329
|
|
|
], |
|
330
|
|
|
), |
|
331
|
|
|
output: new BindingOperationOutput( |
|
332
|
|
|
elements: [ |
|
333
|
|
|
new Soap12Body(null, null, 'literal'), |
|
334
|
|
|
], |
|
335
|
|
|
), |
|
336
|
|
|
elements: [ |
|
337
|
|
|
new Soap12Operation( |
|
338
|
|
|
'http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue', |
|
339
|
|
|
null, |
|
340
|
|
|
'document', |
|
341
|
|
|
), |
|
342
|
|
|
], |
|
343
|
|
|
), |
|
344
|
|
|
], |
|
345
|
|
|
elements: [ |
|
346
|
|
|
new PolicyReference( |
|
347
|
|
|
URI: '#UserNameWSTrustBinding_IWSTrustFeb2005Async_policy', |
|
348
|
|
|
DigestAlgorithm: null, |
|
349
|
|
|
), |
|
350
|
|
|
new Soap12Binding('http://schemas.xmlsoap.org/soap/http'), |
|
351
|
|
|
], |
|
352
|
|
|
), |
|
353
|
|
|
new Binding( |
|
354
|
|
|
name: 'IssuedTokenWSTrustBinding_IWSTrustFeb2005Async', |
|
355
|
|
|
type: 'tns:IWSTrustFeb2005Async', |
|
356
|
|
|
operation: [ |
|
357
|
|
|
new BindingOperation( |
|
358
|
|
|
name: 'TrustFeb2005IssueAsync', |
|
359
|
|
|
input: new BindingOperationInput( |
|
360
|
|
|
elements: [ |
|
361
|
|
|
new Soap12Body(null, null, 'literal'), |
|
362
|
|
|
], |
|
363
|
|
|
), |
|
364
|
|
|
output: new BindingOperationOutput( |
|
365
|
|
|
elements: [ |
|
366
|
|
|
new Soap12Body(null, null, 'literal'), |
|
367
|
|
|
], |
|
368
|
|
|
), |
|
369
|
|
|
elements: [ |
|
370
|
|
|
new Soap12Operation( |
|
371
|
|
|
'http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue', |
|
372
|
|
|
null, |
|
373
|
|
|
'document', |
|
374
|
|
|
), |
|
375
|
|
|
], |
|
376
|
|
|
), |
|
377
|
|
|
], |
|
378
|
|
|
elements: [ |
|
379
|
|
|
new PolicyReference( |
|
380
|
|
|
URI: '#IssuedTokenWSTrustBinding_IWSTrustFeb2005Async_policy', |
|
381
|
|
|
DigestAlgorithm: null, |
|
382
|
|
|
), |
|
383
|
|
|
new Soap12Binding('http://schemas.xmlsoap.org/soap/http'), |
|
384
|
|
|
], |
|
385
|
|
|
), |
|
386
|
|
|
new Binding( |
|
387
|
|
|
name: 'IssuedTokenWSTrustBinding_IWSTrustFeb2005Async1', |
|
388
|
|
|
type: 'tns:IWSTrustFeb2005Async', |
|
389
|
|
|
operation: [ |
|
390
|
|
|
new BindingOperation( |
|
391
|
|
|
name: 'TrustFeb2005IssueAsync', |
|
392
|
|
|
input: new BindingOperationInput( |
|
393
|
|
|
elements: [ |
|
394
|
|
|
new Soap12Body(null, null, 'literal'), |
|
395
|
|
|
], |
|
396
|
|
|
), |
|
397
|
|
|
output: new BindingOperationOutput( |
|
398
|
|
|
elements: [ |
|
399
|
|
|
new Soap12Body(null, null, 'literal'), |
|
400
|
|
|
], |
|
401
|
|
|
), |
|
402
|
|
|
elements: [ |
|
403
|
|
|
new Soap12Operation( |
|
404
|
|
|
'http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue', |
|
405
|
|
|
null, |
|
406
|
|
|
'document', |
|
407
|
|
|
), |
|
408
|
|
|
], |
|
409
|
|
|
), |
|
410
|
|
|
], |
|
411
|
|
|
elements: [ |
|
412
|
|
|
new PolicyReference( |
|
413
|
|
|
URI: '#IssuedTokenWSTrustBinding_IWSTrustFeb2005Async1_policy', |
|
414
|
|
|
DigestAlgorithm: null, |
|
415
|
|
|
), |
|
416
|
|
|
new Soap12Binding('http://schemas.xmlsoap.org/soap/http'), |
|
417
|
|
|
], |
|
418
|
|
|
), |
|
419
|
|
|
/* |
|
420
|
|
|
new Binding( |
|
421
|
|
|
name: 'CertificateWSTrustBinding_IWSTrust13Async', |
|
422
|
|
|
type: 'tns:IWSTrust13Async', |
|
423
|
|
|
operation: [ |
|
424
|
|
|
new BindingOperation( |
|
425
|
|
|
name: 'Trust13IssueAsync', |
|
426
|
|
|
input: new BindingOperationInput( |
|
427
|
|
|
elements: [ |
|
428
|
|
|
new Soap12Body(null, null, 'literal'), |
|
429
|
|
|
], |
|
430
|
|
|
), |
|
431
|
|
|
output: new BindingOperationOutput( |
|
432
|
|
|
elements: [ |
|
433
|
|
|
new Soap12Body(null, null, 'literal'), |
|
434
|
|
|
], |
|
435
|
|
|
), |
|
436
|
|
|
elements: [ |
|
437
|
|
|
new Soap12Operation( |
|
438
|
|
|
'http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue', |
|
439
|
|
|
null, |
|
440
|
|
|
'document', |
|
441
|
|
|
), |
|
442
|
|
|
], |
|
443
|
|
|
), |
|
444
|
|
|
], |
|
445
|
|
|
elements: [ |
|
446
|
|
|
new PolicyReference( |
|
447
|
|
|
URI: '#CertificateWSTrustBinding_IWSTrust13Async_policy', |
|
448
|
|
|
DigestAlgorithm: null, |
|
449
|
|
|
), |
|
450
|
|
|
new Soap12Binding('http://schemas.xmlsoap.org/soap/http'), |
|
451
|
|
|
], |
|
452
|
|
|
), |
|
453
|
|
|
new Binding( |
|
454
|
|
|
name: 'UserNameWSTrustBinding_IWSTrust13Async', |
|
455
|
|
|
type: 'tns:IWSTrust13Async', |
|
456
|
|
|
operation: [ |
|
457
|
|
|
new BindingOperation( |
|
458
|
|
|
name: 'Trust13IssueAsync', |
|
459
|
|
|
input: new BindingOperationInput( |
|
460
|
|
|
elements: [ |
|
461
|
|
|
new Soap12Body(null, null, 'literal'), |
|
462
|
|
|
], |
|
463
|
|
|
), |
|
464
|
|
|
output: new BindingOperationOutput( |
|
465
|
|
|
elements: [ |
|
466
|
|
|
new Soap12Body(null, null, 'literal'), |
|
467
|
|
|
], |
|
468
|
|
|
), |
|
469
|
|
|
elements: [ |
|
470
|
|
|
new Soap12Operation( |
|
471
|
|
|
'http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue', |
|
472
|
|
|
null, |
|
473
|
|
|
'document', |
|
474
|
|
|
), |
|
475
|
|
|
], |
|
476
|
|
|
), |
|
477
|
|
|
], |
|
478
|
|
|
elements: [ |
|
479
|
|
|
new PolicyReference( |
|
480
|
|
|
URI: '#UserNameWSTrustBinding_IWSTrust13Async_policy', |
|
481
|
|
|
DigestAlgorithm: null, |
|
482
|
|
|
), |
|
483
|
|
|
new Soap12Binding('http://schemas.xmlsoap.org/soap/http'), |
|
484
|
|
|
], |
|
485
|
|
|
), |
|
486
|
|
|
new Binding( |
|
487
|
|
|
name: 'IssuedTokenWSTrustBinding_IWSTrust13Async', |
|
488
|
|
|
type: 'tns:IWSTrust13Async', |
|
489
|
|
|
operation: [ |
|
490
|
|
|
new BindingOperation( |
|
491
|
|
|
name: 'Trust13IssueAsync', |
|
492
|
|
|
input: new BindingOperationInput( |
|
493
|
|
|
elements: [ |
|
494
|
|
|
new Soap12Body(null, null, 'literal'), |
|
495
|
|
|
], |
|
496
|
|
|
), |
|
497
|
|
|
output: new BindingOperationOutput( |
|
498
|
|
|
elements: [ |
|
499
|
|
|
new Soap12Body(null, null, 'literal'), |
|
500
|
|
|
], |
|
501
|
|
|
), |
|
502
|
|
|
elements: [ |
|
503
|
|
|
new Soap12Operation( |
|
504
|
|
|
'http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue', |
|
505
|
|
|
null, |
|
506
|
|
|
'document', |
|
507
|
|
|
), |
|
508
|
|
|
], |
|
509
|
|
|
), |
|
510
|
|
|
], |
|
511
|
|
|
elements: [ |
|
512
|
|
|
new PolicyReference( |
|
513
|
|
|
URI: '#IssuedTokenWSTrustBinding_IWSTrust13Async_policy', |
|
514
|
|
|
DigestAlgorithm: null, |
|
515
|
|
|
), |
|
516
|
|
|
new Soap12Binding('http://schemas.xmlsoap.org/soap/http'), |
|
517
|
|
|
], |
|
518
|
|
|
), |
|
519
|
|
|
new Binding( |
|
520
|
|
|
name: 'IssuedTokenWSTrustBinding_IWSTrust13Async1', |
|
521
|
|
|
type: 'tns:IWSTrust13Async', |
|
522
|
|
|
operation: [ |
|
523
|
|
|
new BindingOperation( |
|
524
|
|
|
name: 'Trust13IssueAsync', |
|
525
|
|
|
input: new BindingOperationInput( |
|
526
|
|
|
elements: [ |
|
527
|
|
|
new Soap12Body(null, null, 'literal'), |
|
528
|
|
|
], |
|
529
|
|
|
), |
|
530
|
|
|
output: new BindingOperationOutput( |
|
531
|
|
|
elements: [ |
|
532
|
|
|
new Soap12Body(null, null, 'literal'), |
|
533
|
|
|
], |
|
534
|
|
|
), |
|
535
|
|
|
elements: [ |
|
536
|
|
|
new Soap12Operation( |
|
537
|
|
|
'http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue', |
|
538
|
|
|
null, |
|
539
|
|
|
'document', |
|
540
|
|
|
), |
|
541
|
|
|
], |
|
542
|
|
|
), |
|
543
|
|
|
], |
|
544
|
|
|
elements: [ |
|
545
|
|
|
new PolicyReference( |
|
546
|
|
|
URI: '#IssuedTokenWSTrustBinding_IWSTrust13Async1_policy', |
|
547
|
|
|
DigestAlgorithm: null, |
|
548
|
|
|
), |
|
549
|
|
|
new Soap12Binding('http://schemas.xmlsoap.org/soap/http'), |
|
550
|
|
|
], |
|
551
|
|
|
), |
|
552
|
|
|
*/ |
|
553
|
|
|
]; |
|
554
|
|
|
} |
|
555
|
|
|
|
|
556
|
|
|
|
|
557
|
|
|
/** |
|
558
|
|
|
* This method builds the wsdl:service elements |
|
559
|
|
|
* |
|
560
|
|
|
* @return \SimpleSAML\WSDL\XML\wsdl\Service[] |
|
561
|
|
|
*/ |
|
562
|
|
|
private function getServices(): array |
|
563
|
|
|
{ |
|
564
|
|
|
$defaultEndpoint = Module::getModuleURL('adfs/ws-trust/2005/services/'); |
|
565
|
|
|
|
|
566
|
|
|
return [ |
|
567
|
|
|
new Service( |
|
568
|
|
|
name: 'SecurityTokenService', |
|
569
|
|
|
ports: [ |
|
570
|
|
|
new Port( |
|
571
|
|
|
name: 'CertificateWSTrustBinding_IWSTrustFeb2005Async', |
|
572
|
|
|
binding: 'tns:CertificateWSTrustBinding_IWSTrustFeb2005Async', |
|
573
|
|
|
elements: [ |
|
574
|
|
|
new Soap12Address($defaultEndpoint . 'certificatemixed'), |
|
575
|
|
|
new EndpointReference( |
|
576
|
|
|
new Address($defaultEndpoint . 'certificatemixed'), |
|
577
|
|
|
), |
|
578
|
|
|
], |
|
579
|
|
|
), |
|
580
|
|
|
new Port( |
|
581
|
|
|
name: 'CertificateWSTrustBinding_IWSTrustFeb2005Async1', |
|
582
|
|
|
binding: 'tns:CertificateWSTrustBinding_IWSTrustFeb2005Async1', |
|
583
|
|
|
elements: [ |
|
584
|
|
|
new Soap12Address($defaultEndpoint . 'certificatetransport'), |
|
585
|
|
|
new EndpointReference( |
|
586
|
|
|
new Address($defaultEndpoint . 'certificatetransport'), |
|
587
|
|
|
), |
|
588
|
|
|
], |
|
589
|
|
|
), |
|
590
|
|
|
new Port( |
|
591
|
|
|
name: 'UserNameWSTrustBinding_IWSTrustFeb2005Async', |
|
592
|
|
|
binding: 'tns:UserNameWSTrustBinding_IWSTrustFeb2005Async', |
|
593
|
|
|
elements: [ |
|
594
|
|
|
new Soap12Address($defaultEndpoint . 'usernamemixed'), |
|
595
|
|
|
new EndpointReference( |
|
596
|
|
|
new Address($defaultEndpoint . 'usernamemixed'), |
|
597
|
|
|
), |
|
598
|
|
|
], |
|
599
|
|
|
), |
|
600
|
|
|
new Port( |
|
601
|
|
|
name: 'IssuedTokenWSTrustBinding_IWSTrustFeb2005Async', |
|
602
|
|
|
binding: 'tns:IssuedTokenWSTrustBinding_IWSTrustFeb2005Async', |
|
603
|
|
|
elements: [ |
|
604
|
|
|
new Soap12Address($defaultEndpoint . 'issuedtokenmixedasymmetricbasic256'), |
|
605
|
|
|
new EndpointReference( |
|
606
|
|
|
new Address($defaultEndpoint . 'issuedtokenmixedasymmetricbasic256'), |
|
607
|
|
|
), |
|
608
|
|
|
], |
|
609
|
|
|
), |
|
610
|
|
|
new Port( |
|
611
|
|
|
name: 'IssuedTokenWSTrustBinding_IWSTrustFeb2005Async1', |
|
612
|
|
|
binding: 'tns:IssuedTokenWSTrustBinding_IWSTrustFeb2005Async1', |
|
613
|
|
|
elements: [ |
|
614
|
|
|
new Soap12Address($defaultEndpoint . 'issuedtokenmixedsymmetricbasic256'), |
|
615
|
|
|
new EndpointReference( |
|
616
|
|
|
new Address($defaultEndpoint . 'issuedtokenmixedsymmetricbasic256'), |
|
617
|
|
|
), |
|
618
|
|
|
], |
|
619
|
|
|
), |
|
620
|
|
|
/* |
|
621
|
|
|
new Port( |
|
622
|
|
|
name: 'CertificateWSTrustBinding_IWSTrust13Async', |
|
623
|
|
|
binding: 'tns:CertificateWSTrustBinding_IWSTrust13Async', |
|
624
|
|
|
elements: [ |
|
625
|
|
|
new Soap12Address($defaultEndpoint . '13/certificatemixed'), |
|
626
|
|
|
new EndpointReference( |
|
627
|
|
|
new Address($defaultEndpoint . '13/certificatemixed'), |
|
628
|
|
|
), |
|
629
|
|
|
], |
|
630
|
|
|
), |
|
631
|
|
|
new Port( |
|
632
|
|
|
name: 'UserNameWSTrustBinding_IWSTrust13Async', |
|
633
|
|
|
binding: 'tns:UserNameWSTrustBinding_IWSTrust13Async', |
|
634
|
|
|
elements: [ |
|
635
|
|
|
new Soap12Address($defaultEndpoint . '13/usernamemixed'), |
|
636
|
|
|
new EndpointReference( |
|
637
|
|
|
new Address($defaultEndpoint . '13/usernamemixed'), |
|
638
|
|
|
), |
|
639
|
|
|
], |
|
640
|
|
|
), |
|
641
|
|
|
new Port( |
|
642
|
|
|
name: 'IssuedTokenWSTrustBinding_IWSTrust13Async', |
|
643
|
|
|
binding: 'tns:IssuedTokenWSTrustBinding_IWSTrust13Async', |
|
644
|
|
|
elements: [ |
|
645
|
|
|
new Soap12Address($defaultEndpoint . '13/issuedtokenmixedasymmetricbasic256'), |
|
646
|
|
|
new EndpointReference( |
|
647
|
|
|
new Address($defaultEndpoint . '13/issuedtokenmixedasymmetricbasic256'), |
|
648
|
|
|
), |
|
649
|
|
|
], |
|
650
|
|
|
), |
|
651
|
|
|
new Port( |
|
652
|
|
|
name: 'IssuedTokenWSTrustBinding_IWSTrust13Async1', |
|
653
|
|
|
binding: 'tns:IssuedTokenWSTrustBinding_IWSTrust13Async1', |
|
654
|
|
|
elements: [ |
|
655
|
|
|
new Soap12Address($defaultEndpoint . '13/issuedtokenmixedsymmetricbasic256'), |
|
656
|
|
|
new EndpointReference( |
|
657
|
|
|
new Address($defaultEndpoint . '13/issuedtokenmixedsymmetricbasic256'), |
|
658
|
|
|
), |
|
659
|
|
|
], |
|
660
|
|
|
), |
|
661
|
|
|
*/ |
|
662
|
|
|
], |
|
663
|
|
|
), |
|
664
|
|
|
]; |
|
665
|
|
|
} |
|
666
|
|
|
} |
|
667
|
|
|
|