Skip to content

Commit 5b401a6

Browse files
committed
Polish "Add support for configuring extra WSS4J options"
See gh-1093
1 parent 5f57898 commit 5b401a6

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

spring-ws-security/src/main/java/org/springframework/ws/soap/security/wss4j2/Wss4jSecurityInterceptor.java

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ public void setSecurementActions(String securementActions) {
237237
* @param value the value of the option
238238
* @since 4.1.0
239239
*/
240-
public void setOption(String key, String value) {
240+
public void setWsHandlerOption(String key, String value) {
241241
this.handler.setOption(key, value);
242242
}
243243

@@ -247,7 +247,7 @@ public void setOption(String key, String value) {
247247
* @param value whether the option is enabled
248248
* @since 4.1.0
249249
*/
250-
public void setOption(String key, boolean value) {
250+
public void setWsHandlerOption(String key, boolean value) {
251251
this.handler.setOption(key, value);
252252
}
253253

@@ -260,7 +260,7 @@ public void setOption(String key, boolean value) {
260260
* standard values.
261261
*/
262262
public void setSecurementActor(String securementActor) {
263-
setOption(WSHandlerConstants.ACTOR, securementActor);
263+
setWsHandlerOption(WSHandlerConstants.ACTOR, securementActor);
264264
}
265265

266266
public void setSecurementEncryptionCrypto(Crypto securementEncryptionCrypto) {
@@ -276,7 +276,7 @@ public void setSecurementEncryptionCrypto(Crypto securementEncryptionCrypto) {
276276
* only.
277277
*/
278278
public void setSecurementEncryptionKeyIdentifier(String securementEncryptionKeyIdentifier) {
279-
setOption(WSHandlerConstants.ENC_KEY_ID, securementEncryptionKeyIdentifier);
279+
setWsHandlerOption(WSHandlerConstants.ENC_KEY_ID, securementEncryptionKeyIdentifier);
280280
}
281281

282282
/**
@@ -285,7 +285,7 @@ public void setSecurementEncryptionKeyIdentifier(String securementEncryptionKeyI
285285
* {@link WSConstants#KEYTRANSPORT_RSAOAEP}.
286286
*/
287287
public void setSecurementEncryptionKeyTransportAlgorithm(String securementEncryptionKeyTransportAlgorithm) {
288-
setOption(WSHandlerConstants.ENC_KEY_TRANSPORT, securementEncryptionKeyTransportAlgorithm);
288+
setWsHandlerOption(WSHandlerConstants.ENC_KEY_TRANSPORT, securementEncryptionKeyTransportAlgorithm);
289289
}
290290

291291
/**
@@ -324,7 +324,7 @@ public void setSecurementEncryptionKeyTransportAlgorithm(String securementEncryp
324324
* by default.
325325
*/
326326
public void setSecurementEncryptionParts(String securementEncryptionParts) {
327-
setOption(WSHandlerConstants.ENCRYPTION_PARTS, securementEncryptionParts);
327+
setWsHandlerOption(WSHandlerConstants.ENCRYPTION_PARTS, securementEncryptionParts);
328328
}
329329

330330
/**
@@ -334,7 +334,7 @@ public void setSecurementEncryptionParts(String securementEncryptionParts) {
334334
* all of these algorithms are required by the XML Encryption specification.
335335
*/
336336
public void setSecurementEncryptionSymAlgorithm(String securementEncryptionSymAlgorithm) {
337-
setOption(WSHandlerConstants.ENC_SYM_ALGO, securementEncryptionSymAlgorithm);
337+
setWsHandlerOption(WSHandlerConstants.ENC_SYM_ALGO, securementEncryptionSymAlgorithm);
338338
}
339339

340340
/**
@@ -358,7 +358,7 @@ public void setSecurementEncryptionSymAlgorithm(String securementEncryptionSymAl
358358
* a security risk, because the public key of that certificate is used only.
359359
*/
360360
public void setSecurementEncryptionUser(String securementEncryptionUser) {
361-
setOption(WSHandlerConstants.ENCRYPTION_USER, securementEncryptionUser);
361+
setWsHandlerOption(WSHandlerConstants.ENCRYPTION_USER, securementEncryptionUser);
362362
}
363363

364364
public void setSecurementPassword(String securementPassword) {
@@ -374,7 +374,7 @@ public void setSecurementPassword(String securementPassword) {
374374
* The default setting is PW_DIGEST.
375375
*/
376376
public void setSecurementPasswordType(String securementUsernameTokenPasswordType) {
377-
setOption(WSHandlerConstants.PASSWORD_TYPE, securementUsernameTokenPasswordType);
377+
setWsHandlerOption(WSHandlerConstants.PASSWORD_TYPE, securementUsernameTokenPasswordType);
378378
}
379379

380380
/**
@@ -383,14 +383,14 @@ public void setSecurementPasswordType(String securementUsernameTokenPasswordType
383383
* @see WSConstants#DSA
384384
*/
385385
public void setSecurementSignatureAlgorithm(String securementSignatureAlgorithm) {
386-
setOption(WSHandlerConstants.SIG_ALGO, securementSignatureAlgorithm);
386+
setWsHandlerOption(WSHandlerConstants.SIG_ALGO, securementSignatureAlgorithm);
387387
}
388388

389389
/**
390390
* Defines which signature digest algorithm to use.
391391
*/
392392
public void setSecurementSignatureDigestAlgorithm(String digestAlgorithm) {
393-
setOption(WSHandlerConstants.SIG_DIGEST_ALGO, digestAlgorithm);
393+
setWsHandlerOption(WSHandlerConstants.SIG_DIGEST_ALGO, digestAlgorithm);
394394
}
395395

396396
public void setSecurementSignatureCrypto(Crypto securementSignatureCrypto) {
@@ -404,7 +404,7 @@ public void setSecurementSignatureCrypto(Crypto securementSignatureCrypto) {
404404
* {@code IssuerSerial} and {@code DirectReference} are valid only.
405405
*/
406406
public void setSecurementSignatureKeyIdentifier(String securementSignatureKeyIdentifier) {
407-
setOption(WSHandlerConstants.SIG_KEY_ID, securementSignatureKeyIdentifier);
407+
setWsHandlerOption(WSHandlerConstants.SIG_KEY_ID, securementSignatureKeyIdentifier);
408408
}
409409

410410
/**
@@ -434,7 +434,7 @@ public void setSecurementSignatureKeyIdentifier(String securementSignatureKeyIde
434434
* the SOAP namespace identifier can be empty ({@code {}}).
435435
*/
436436
public void setSecurementSignatureParts(String securementSignatureParts) {
437-
setOption(WSHandlerConstants.SIGNATURE_PARTS, securementSignatureParts);
437+
setWsHandlerOption(WSHandlerConstants.SIGNATURE_PARTS, securementSignatureParts);
438438
}
439439

440440
/**
@@ -447,7 +447,7 @@ public void setSecurementSignatureParts(String securementSignatureParts) {
447447
* specified by {@link #setSecurementUsername(String)}.
448448
*/
449449
public void setSecurementSignatureUser(String securementSignatureUser) {
450-
setOption(WSHandlerConstants.SIGNATURE_USER, securementSignatureUser);
450+
setWsHandlerOption(WSHandlerConstants.SIGNATURE_USER, securementSignatureUser);
451451
}
452452

453453
/**
@@ -568,15 +568,15 @@ public void setValidationSubjectDnConstraints(List<Pattern> patterns) {
568568
*/
569569
public void setEnableSignatureConfirmation(boolean enableSignatureConfirmation) {
570570

571-
setOption(WSHandlerConstants.ENABLE_SIGNATURE_CONFIRMATION, enableSignatureConfirmation);
571+
setWsHandlerOption(WSHandlerConstants.ENABLE_SIGNATURE_CONFIRMATION, enableSignatureConfirmation);
572572
this.enableSignatureConfirmation = enableSignatureConfirmation;
573573
}
574574

575575
/**
576576
* Sets if the generated timestamp header's precision is in milliseconds.
577577
*/
578578
public void setTimestampPrecisionInMilliseconds(boolean timestampPrecisionInMilliseconds) {
579-
setOption(WSHandlerConstants.TIMESTAMP_PRECISION, timestampPrecisionInMilliseconds);
579+
setWsHandlerOption(WSHandlerConstants.TIMESTAMP_PRECISION, timestampPrecisionInMilliseconds);
580580
}
581581

582582
/**
@@ -591,23 +591,23 @@ public void setTimestampStrict(boolean timestampStrict) {
591591
* messages. Default is {@code true}.
592592
*/
593593
public void setSecurementMustUnderstand(boolean securementMustUnderstand) {
594-
setOption(WSHandlerConstants.MUST_UNDERSTAND, securementMustUnderstand);
594+
setWsHandlerOption(WSHandlerConstants.MUST_UNDERSTAND, securementMustUnderstand);
595595
}
596596

597597
/**
598598
* Sets whether a {@code Nonce} element is added to the {@code UsernameToken}s.
599599
* Default is {@code false}.
600600
*/
601601
public void setSecurementUsernameTokenNonce(boolean securementUsernameTokenNonce) {
602-
setOption(ConfigurationConstants.ADD_USERNAMETOKEN_NONCE, securementUsernameTokenNonce);
602+
setWsHandlerOption(ConfigurationConstants.ADD_USERNAMETOKEN_NONCE, securementUsernameTokenNonce);
603603
}
604604

605605
/**
606606
* Sets whether a {@code Created} element is added to the {@code UsernameToken}s.
607607
* Default is {@code false}.
608608
*/
609609
public void setSecurementUsernameTokenCreated(boolean securementUsernameTokenCreated) {
610-
setOption(ConfigurationConstants.ADD_USERNAMETOKEN_CREATED, securementUsernameTokenCreated);
610+
setWsHandlerOption(ConfigurationConstants.ADD_USERNAMETOKEN_CREATED, securementUsernameTokenCreated);
611611
}
612612

613613
/**
@@ -636,7 +636,7 @@ public void setEnableRevocation(boolean enableRevocation) {
636636
*/
637637
public void setBspCompliant(boolean bspCompliant) {
638638

639-
setOption(WSHandlerConstants.IS_BSP_COMPLIANT, bspCompliant);
639+
setWsHandlerOption(WSHandlerConstants.IS_BSP_COMPLIANT, bspCompliant);
640640
this.bspCompliant = bspCompliant;
641641
}
642642

@@ -647,7 +647,7 @@ public void setBspCompliant(boolean bspCompliant) {
647647
*/
648648
public void setAddInclusivePrefixes(boolean addInclusivePrefixes) {
649649

650-
setOption(WSHandlerConstants.ADD_INCLUSIVE_PREFIXES, addInclusivePrefixes);
650+
setWsHandlerOption(WSHandlerConstants.ADD_INCLUSIVE_PREFIXES, addInclusivePrefixes);
651651
this.addInclusivePrefixes = addInclusivePrefixes;
652652
}
653653

@@ -660,7 +660,7 @@ public void setAddInclusivePrefixes(boolean addInclusivePrefixes) {
660660
* @see WSHandlerConstants#USE_SINGLE_CERTIFICATE
661661
*/
662662
public void setUseSingleCertificate(boolean useSingleCertificate) {
663-
setOption(WSHandlerConstants.USE_SINGLE_CERTIFICATE, useSingleCertificate);
663+
setWsHandlerOption(WSHandlerConstants.USE_SINGLE_CERTIFICATE, useSingleCertificate);
664664
}
665665

666666
/**

0 commit comments

Comments
 (0)