@@ -180,32 +180,32 @@ public void setSecurementEncryptionKeyIdentifier(String securementEncryptionKeyI
180
180
181
181
/**
182
182
* Defines which algorithm to use to encrypt the generated symmetric key. Currently WSS4J supports {@link
183
- * WSConstants#KEYTRANSPORT_RSA15} only .
183
+ * WSConstants#KEYTRANSPORT_RSA15} and {@link WSConstants#KEYTRANSPORT_RSAOEP} .
184
184
*/
185
185
public void setSecurementEncryptionKeyTransportAlgorithm (String securementEncryptionKeyTransportAlgorithm ) {
186
186
handler .setOption (WSHandlerConstants .ENC_KEY_TRANSPORT , securementEncryptionKeyTransportAlgorithm );
187
187
}
188
188
189
189
/**
190
- * Parameter to define which parts of the request shall be encrypted.
190
+ * Property to define which parts of the request shall be encrypted.
191
191
* <p/>
192
- * The value of this parameter is a list of semi-colon separated element names that identify the elements to
193
- * encrypt. An encryption mode specifier and a namespace identification, each inside a pair of curly brackets, may
194
- * preceed each element name.
192
+ * The value of this property is a list of semi-colon separated element names that identify the elements to encrypt.
193
+ * An encryption mode specifier and a namespace identification, each inside a pair of curly brackets, may precede
194
+ * each element name.
195
195
* <p/>
196
196
* The encryption mode specifier is either <code>{Content}</code> or <code>{Element}</code>. Please refer to the W3C
197
197
* XML Encryption specification about the differences between Element and Content encryption. The encryption mode
198
198
* defaults to <code>Content</code> if it is omitted. Example of a list:
199
199
* <pre>
200
- * <parameter name="encryptionParts "
200
+ * <property name="securementEncryptionParts "
201
201
* value="{Content}{http://example.org/paymentv2}CreditCard;
202
202
* {Element}{}UserName" />
203
203
* </pre>
204
204
* The the first entry of the list identifies the element <code>CreditCard</code> in the namespace
205
205
* <code>http://example.org/paymentv2</code>, and will encrypt its content. Be aware that the element name, the
206
206
* namespace identifier, and the encryption modifier are case sensitive.
207
207
* <p/>
208
- * The encryption modifier and the namespace identifier can be ommited . In this case the encryption mode defaults to
208
+ * The encryption modifier and the namespace identifier can be omitted . In this case the encryption mode defaults to
209
209
* <code>Content</code> and the namespace is set to the SOAP namespace.
210
210
* <p/>
211
211
* An empty encryption mode defaults to <code>Content</code>, an empty namespace identifier defaults to the SOAP
@@ -245,15 +245,9 @@ public void setSecurementEncryptionSymAlgorithm(String securementEncryptionSymAl
245
245
* <p/>
246
246
* Encryption only does not authenticate a user / sender, therefore it does not need a password.
247
247
* <p/>
248
- * Placing the username of the encryption certficate in the WSDD is not a security risk, because the public key of
249
- * that certificate is used only.
248
+ * Placing the username of the encryption certificate in the configuration file is not a security risk, because the
249
+ * public key of that certificate is used only.
250
250
* <p/>
251
- * The application may set this parameter using the following method:
252
- * <pre>
253
- * call.setProperty(WSHandlerConstants.ENCYRPTION_USER, "encryptionuser");
254
- * </pre>
255
- * However, the parameter in the WSDD deployment file overwrites the property setting (deployment setting overwrites
256
- * application setting).
257
251
*/
258
252
public void setSecurementEncryptionUser (String securementEncryptionUser ) {
259
253
handler .setOption (WSHandlerConstants .ENCRYPTION_USER , securementEncryptionUser );
@@ -297,20 +291,20 @@ public void setSecurementSignatureKeyIdentifier(String securementSignatureKeyIde
297
291
}
298
292
299
293
/**
300
- * Parameter to define which parts of the request shall be signed.
294
+ * Property to define which parts of the request shall be signed.
301
295
* <p/>
302
296
* Refer to {@link #setSecurementEncryptionParts(String)} for a detailed description of the format of the value
303
297
* string.
304
298
* <p/>
305
- * If this parameter is not specified the handler signs the SOAP Body by default.
299
+ * If this property is not specified the handler signs the SOAP Body by default.
306
300
* <p/>
307
301
* The WS Security specifications define several formats to transfer the signature tokens (certificates) or
308
302
* references to these tokens. Thus, the plain element name <code>Token</code> signs the token and takes care of the
309
- * different format .
303
+ * different formats .
310
304
* <p/>
311
305
* To sign the SOAP body <b>and</b> the signature token the value of this parameter must contain:
312
306
* <pre>
313
- * <parameter name="signatureParts "
307
+ * <property name="securementSignatureParts "
314
308
* value="{}{http://schemas.xmlsoap.org/soap/envelope/}Body; Token" />
315
309
* </pre>
316
310
* To specify an element without a namespace use the string <code>Null</code> as the namespace name (this is a case
@@ -323,6 +317,7 @@ public void setSecurementSignatureParts(String securementSignatureParts) {
323
317
handler .setOption (WSHandlerConstants .SIGNATURE_PARTS , securementSignatureParts );
324
318
}
325
319
320
+ /** Sets the username for securement username token or/and the alias of the private key for securement signature */
326
321
public void setSecurementUsername (String securementUsername ) {
327
322
this .securementUsername = securementUsername ;
328
323
}
@@ -409,9 +404,9 @@ public void setSecurementMustUnderstand(boolean securementMustUnderstand) {
409
404
* The value of this parameter is a list of element names that are added to the UsernameToken. The names of the list
410
405
* a separated by spaces.
411
406
* <p/>
412
- * The list may containe the names <code>nonce </code> and <code>created </code> only. Use this option if the password
413
- * type is <code>passwordText</code> and the handler shall add the <code>Nonce</code> and/or <code>Created</code>
414
- * elements.
407
+ * The list may contain the names <code>Nonce </code> and <code>Created </code> only (case sensitive) . Use this option
408
+ * if the password type is <code>passwordText</code> and the handler shall add the <code>Nonce</code> and/or
409
+ * <code>Created</code> elements.
415
410
*/
416
411
public void setSecurementUsernameTokenElements (String securementUsernameTokenElements ) {
417
412
handler .setOption (WSHandlerConstants .ADD_UT_ELEMENTS , securementUsernameTokenElements );
@@ -640,4 +635,4 @@ protected void cleanUp() {
640
635
}
641
636
}
642
637
}
643
- }
638
+ }
0 commit comments