Fixing javadoc

This commit is contained in:
Arjen Poutsma
2014-04-16 17:30:39 +02:00
parent 124675ba78
commit bbc6bf5f60
327 changed files with 2901 additions and 2292 deletions

View File

@@ -41,8 +41,8 @@ import org.springframework.ws.soap.soap11.Soap11Body;
* {@link org.springframework.ws.server.endpoint.mapping.AbstractEndpointMapping#setInterceptors(org.springframework.ws.server.EndpointInterceptor[])
* endpoint mapping}; or on the client side, on the {@link org.springframework.ws.client.core.WebServiceTemplate#setInterceptors(ClientInterceptor[])
* web service template}.
* <p/>
* Subclasses of this base class can be configured to secure incoming and secure outgoing messages. By default, both are
*
* <p>Subclasses of this base class can be configured to secure incoming and secure outgoing messages. By default, both are
* on.
*
* @author Arjen Poutsma
@@ -68,22 +68,22 @@ public abstract class AbstractWsSecurityInterceptor implements SoapEndpointInter
private EndpointExceptionResolver exceptionResolver;
/** Indicates whether server-side incoming request are to be validated. Defaults to <code>true</code>. */
/** Indicates whether server-side incoming request are to be validated. Defaults to {@code true}. */
public void setValidateRequest(boolean validateRequest) {
this.validateRequest = validateRequest;
}
/** Indicates whether server-side outgoing responses are to be secured. Defaults to <code>true</code>. */
/** Indicates whether server-side outgoing responses are to be secured. Defaults to {@code true}. */
public void setSecureResponse(boolean secureResponse) {
this.secureResponse = secureResponse;
}
/** Indicates whether client-side outgoing requests are to be secured. Defaults to <code>true</code>. */
/** Indicates whether client-side outgoing requests are to be secured. Defaults to {@code true}. */
public void setSecureRequest(boolean secureRequest) {
this.secureRequest = secureRequest;
}
/** Indicates whether client-side incoming responses are to be validated. Defaults to <code>true</code>. */
/** Indicates whether client-side incoming responses are to be validated. Defaults to {@code true}. */
public void setValidateResponse(boolean validateResponse) {
this.validateResponse = validateResponse;
}
@@ -105,11 +105,11 @@ public abstract class AbstractWsSecurityInterceptor implements SoapEndpointInter
/**
* Validates a server-side incoming request. Delegates to {@link #validateMessage(org.springframework.ws.soap.SoapMessage,org.springframework.ws.context.MessageContext)}
* if the {@link #setValidateRequest(boolean) validateRequest} property is <code>true</code>.
* if the {@link #setValidateRequest(boolean) validateRequest} property is {@code true}.
*
* @param messageContext the message context, containing the request to be validated
* @param endpoint chosen endpoint to invoke
* @return <code>true</code> if the request was valid; <code>false</code> otherwise.
* @return {@code true} if the request was valid; {@code false} otherwise.
* @throws Exception in case of errors
* @see #validateMessage(org.springframework.ws.soap.SoapMessage,org.springframework.ws.context.MessageContext)
*/
@@ -138,11 +138,11 @@ public abstract class AbstractWsSecurityInterceptor implements SoapEndpointInter
/**
* Secures a server-side outgoing response. Delegates to {@link #secureMessage(org.springframework.ws.soap.SoapMessage,org.springframework.ws.context.MessageContext)}
* if the {@link #setSecureResponse(boolean) secureResponse} property is <code>true</code>.
* if the {@link #setSecureResponse(boolean) secureResponse} property is {@code true}.
*
* @param messageContext the message context, containing the response to be secured
* @param endpoint chosen endpoint to invoke
* @return <code>true</code> if the response was secured; <code>false</code> otherwise.
* @return {@code true} if the response was secured; {@code false} otherwise.
* @throws Exception in case of errors
* @see #secureMessage(org.springframework.ws.soap.SoapMessage,org.springframework.ws.context.MessageContext)
*/
@@ -172,7 +172,7 @@ public abstract class AbstractWsSecurityInterceptor implements SoapEndpointInter
return result;
}
/** Returns <code>true</code>, i.e. fault responses are not secured. */
/** Returns {@code true}, i.e. fault responses are not secured. */
@Override
public boolean handleFault(MessageContext messageContext, Object endpoint) throws Exception {
return true;
@@ -195,10 +195,10 @@ public abstract class AbstractWsSecurityInterceptor implements SoapEndpointInter
/**
* Secures a client-side outgoing request. Delegates to {@link #secureMessage(org.springframework.ws.soap.SoapMessage,org.springframework.ws.context.MessageContext)}
* if the {@link #setSecureRequest(boolean) secureRequest} property is <code>true</code>.
* if the {@link #setSecureRequest(boolean) secureRequest} property is {@code true}.
*
* @param messageContext the message context, containing the request to be secured
* @return <code>true</code> if the response was secured; <code>false</code> otherwise.
* @return {@code true} if the response was secured; {@code false} otherwise.
* @throws Exception in case of errors
* @see #secureMessage(org.springframework.ws.soap.SoapMessage,org.springframework.ws.context.MessageContext)
*/
@@ -224,10 +224,10 @@ public abstract class AbstractWsSecurityInterceptor implements SoapEndpointInter
/**
* Validates a client-side incoming response. Delegates to {@link #validateMessage(org.springframework.ws.soap.SoapMessage,org.springframework.ws.context.MessageContext)}
* if the {@link #setValidateResponse(boolean) validateResponse} property is <code>true</code>.
* if the {@link #setValidateResponse(boolean) validateResponse} property is {@code true}.
*
* @param messageContext the message context, containing the response to be validated
* @return <code>true</code> if the request was valid; <code>false</code> otherwise.
* @return {@code true} if the request was valid; {@code false} otherwise.
* @throws Exception in case of errors
* @see #validateMessage(org.springframework.ws.soap.SoapMessage,org.springframework.ws.context.MessageContext)
*/
@@ -255,7 +255,7 @@ public abstract class AbstractWsSecurityInterceptor implements SoapEndpointInter
}
}
/** Returns <code>true</code>, i.e. fault responses are not validated. */
/** Returns {@code true}, i.e. fault responses are not validated. */
@Override
public boolean handleFault(MessageContext messageContext) throws WebServiceClientException {
return true;
@@ -269,11 +269,11 @@ public abstract class AbstractWsSecurityInterceptor implements SoapEndpointInter
/**
* Handles an securement exception. Default implementation logs the given exception, and returns
* <code>false</code>.
* {@code false}.
*
* @param ex the validation exception
* @param messageContext the message context
* @return <code>true</code> to continue processing the message, <code>false</code> (the default) otherwise
* @return {@code true} to continue processing the message, {@code false} (the default) otherwise
*/
protected boolean handleSecurementException(WsSecuritySecurementException ex, MessageContext messageContext) {
if (logger.isErrorEnabled()) {
@@ -285,11 +285,11 @@ public abstract class AbstractWsSecurityInterceptor implements SoapEndpointInter
/**
* Handles an invalid SOAP message. Default implementation logs the given exception, delegates to the set {@link
* #setExceptionResolver(EndpointExceptionResolver) exceptionResolver} if any, or creates a SOAP 1.1 Client or SOAP
* 1.2 Sender Fault with the exception message as fault string, and returns <code>false</code>.
* 1.2 Sender Fault with the exception message as fault string, and returns {@code false}.
*
* @param ex the validation exception
* @param messageContext the message context
* @return <code>true</code> to continue processing the message, <code>false</code> (the default) otherwise
* @return {@code true} to continue processing the message, {@code false} (the default) otherwise
*/
protected boolean handleValidationException(WsSecurityValidationException ex, MessageContext messageContext) {
if (logger.isWarnEnabled()) {
@@ -310,11 +310,11 @@ public abstract class AbstractWsSecurityInterceptor implements SoapEndpointInter
/**
* Handles a fault exception.Default implementation logs the given exception, and creates a SOAP Fault with the
* properties of the given exception, and returns <code>false</code>.
* properties of the given exception, and returns {@code false}.
*
* @param ex the validation exception
* @param messageContext the message context
* @return <code>true</code> to continue processing the message, <code>false</code> (the default) otherwise
* @return {@code true} to continue processing the message, {@code false} (the default) otherwise
*/
protected boolean handleFaultException(WsSecurityFaultException ex, MessageContext messageContext) {
if (logger.isWarnEnabled()) {

View File

@@ -32,7 +32,7 @@ public abstract class WsSecurityFaultException extends WsSecurityException {
private String faultActor;
/** Construct a new <code>WsSecurityFaultException</code> with the given fault code, string, and actor. */
/** Construct a new {@code WsSecurityFaultException} with the given fault code, string, and actor. */
public WsSecurityFaultException(QName faultCode, String faultString, String faultActor) {
super(faultString);
this.faultCode = faultCode;

View File

@@ -18,8 +18,8 @@ package org.springframework.ws.soap.security;
/**
* Exception indicating that something went wrong during the securement of a message.
* <p/>
* This is a checked exception since we want it to be caught, logged and handled rather than cause the application to
*
* <p>This is a checked exception since we want it to be caught, logged and handled rather than cause the application to
* fail. Failure to secure a message is usually not a fatal problem.
*
* @author Arjen Poutsma

View File

@@ -18,8 +18,8 @@ package org.springframework.ws.soap.security;
/**
* Exception indicating that something went wrong during the validation of a message.
* <p/>
* This is a checked exception since we want it to be caught, logged and handled rather than cause the application to
*
* <p>This is a checked exception since we want it to be caught, logged and handled rather than cause the application to
* fail. Failure to validate a message is usually not a fatal problem.
*
* @author Arjen Poutsma

View File

@@ -25,7 +25,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* Abstract implementation of a <code>CallbackHandler</code>.
* Abstract implementation of a {@code CallbackHandler}.
*
* @author Arjen Poutsma
* @since 1.0.0
@@ -39,7 +39,7 @@ public abstract class AbstractCallbackHandler implements CallbackHandler {
}
/**
* Iterates over the given callbacks, and calls <code>handleInternal</code> for each of them.
* Iterates over the given callbacks, and calls {@code handleInternal} for each of them.
*
* @param callbacks the callbacks
* @see #handleInternal(javax.security.auth.callback.Callback)

View File

@@ -22,8 +22,8 @@ import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
/**
* Represents a chain of <code>CallbackHandler</code>s. For each callback, each of the handlers is called in term. If a
* handler throws a <code>UnsupportedCallbackException</code>, the next handler is tried.
* Represents a chain of {@code CallbackHandler}s. For each callback, each of the handlers is called in term. If a
* handler throws a {@code UnsupportedCallbackException}, the next handler is tried.
*
* @author Arjen Poutsma
* @since 1.5.0

View File

@@ -20,8 +20,8 @@ import java.io.Serializable;
import javax.security.auth.callback.Callback;
/**
* Underlying security services instantiate and pass a <code>CleanupCallback</code> to the <code>handle</code> method of
* a <code>CallbackHandler</code> to clean up security state.
* Underlying security services instantiate and pass a {@code CleanupCallback} to the {@code handle} method of
* a {@code CallbackHandler} to clean up security state.
*
* @author Arjen Poutsma
* @since 1.0.4

View File

@@ -26,8 +26,8 @@ import org.springframework.util.StringUtils;
/**
* Spring factory bean for an array of {@link KeyManager}s.
* <p/>
* Uses the {@link KeyManagerFactory} to create the {@code KeyManager}s.
*
* <p>Uses the {@link KeyManagerFactory} to create the {@code KeyManager}s.
*
* @author Stephen More
* @author Arjen Poutsma

View File

@@ -31,8 +31,8 @@ import org.springframework.util.StringUtils;
/**
* Spring factory bean for a {@link KeyStore}.
* <p/>
* To load an existing key store, you must set the <code>location</code> property. If this property is not set, a new,
*
* <p>To load an existing key store, you must set the {@code location} property. If this property is not set, a new,
* empty key store is created, which is most likely not what you want.
*
* @author Arjen Poutsma
@@ -79,7 +79,7 @@ public class KeyStoreFactoryBean implements FactoryBean<KeyStore>, InitializingB
}
/**
* Sets the type of the <code>KeyStore</code> to use. If this is not set, the default is used.
* Sets the type of the {@code KeyStore} to use. If this is not set, the default is used.
*
* @see KeyStore#getDefaultType()
*/

View File

@@ -35,13 +35,13 @@ public abstract class KeyStoreUtils {
/**
* Loads the key store indicated by system properties. This method tries to load a key store by consulting the
* following system properties:<code>javax.net.ssl.keyStore</code>, <code>javax.net.ssl.keyStorePassword</code>, and
* <code>javax.net.ssl.keyStoreType</code>.
* <p/>
* If these properties specify a file with an appropriate password, the factory uses this file for the key store. If
* following system properties:{@code javax.net.ssl.keyStore}, {@code javax.net.ssl.keyStorePassword}, and
* {@code javax.net.ssl.keyStoreType}.
*
* <p>If these properties specify a file with an appropriate password, the factory uses this file for the key store. If
* that file does not exist, then a default, empty keystore is created.
* <p/>
* This behavior corresponds to the standard J2SDK behavior for SSL key stores.
*
* <p>This behavior corresponds to the standard J2SDK behavior for SSL key stores.
*
* @see <a href="http://java.sun.com/j2se/1.4.2/docs/guide/security/jsse/JSSERefGuide.html#X509KeyManager">The
* standard J2SDK SSL key store mechanism</a>
@@ -73,17 +73,17 @@ public abstract class KeyStoreUtils {
/**
* Loads a default trust store. This method uses the following algorithm: <ol> <li> If the system property
* <code>javax.net.ssl.trustStore</code> is defined, its value is loaded. If the
* <code>javax.net.ssl.trustStorePassword</code> system property is also defined, its value is used as a password.
* If the <code>javax.net.ssl.trustStoreType</code> system property is defined, its value is used as a key store
* {@code javax.net.ssl.trustStore} is defined, its value is loaded. If the
* {@code javax.net.ssl.trustStorePassword} system property is also defined, its value is used as a password.
* If the {@code javax.net.ssl.trustStoreType} system property is defined, its value is used as a key store
* type.
* <p/>
* If <code>javax.net.ssl.trustStore</code> is defined but the specified file does not exist, then a default, empty
* trust store is created. </li> <li> If the <code>javax.net.ssl.trustStore</code> system property was not
* specified, but if the file <code>$JAVA_HOME/lib/security/jssecacerts</code> exists, that file is used. </li>
* Otherwise, <li>If the file <code>$JAVA_HOME/lib/security/cacerts</code> exists, that file is used. </ol>
* <p/>
* This behavior corresponds to the standard J2SDK behavior for SSL trust stores.
*
* <p>If {@code javax.net.ssl.trustStore} is defined but the specified file does not exist, then a default, empty
* trust store is created. </li> <li> If the {@code javax.net.ssl.trustStore} system property was not
* specified, but if the file {@code $JAVA_HOME/lib/security/jssecacerts} exists, that file is used. </li>
* Otherwise, <li>If the file {@code $JAVA_HOME/lib/security/cacerts} exists, that file is used. </ol>
*
* <p>This behavior corresponds to the standard J2SDK behavior for SSL trust stores.
*
* @see <a href="http://java.sun.com/j2se/1.4.2/docs/guide/security/jsse/JSSERefGuide.html#X509TrustManager">The
* standard J2SDK SSL trust store mechanism</a>

View File

@@ -26,8 +26,8 @@ import org.springframework.util.StringUtils;
/**
* Spring factory bean for an array of {@link TrustManager}s.
* <p/>
* Uses the {@link TrustManagerFactory} to create the {@code TrustManager}s.
*
* <p>Uses the {@link TrustManagerFactory} to create the {@code TrustManager}s.
*
* @author Arjen Poutsma
* @see TrustManager

View File

@@ -58,25 +58,25 @@ import org.springframework.ws.soap.security.wss4j.callback.UsernameTokenPrincipa
/**
* A WS-Security endpoint interceptor based on Apache's WSS4J. This interceptor supports messages created by the {@link
* org.springframework.ws.soap.axiom.AxiomSoapMessageFactory} and the {@link org.springframework.ws.soap.saaj.SaajSoapMessageFactory}.
* <p/>
* The validation and securement actions executed by this interceptor are configured via <code>validationActions</code>
* and <code>securementActions</code> properties, respectively. Actions should be passed as a space-separated strings.
* <p/>
* Valid <strong>validation</strong> actions are:
* <p/>
* <blockquote><table> <tr><th>Validation action</th><th>Description</th></tr> <tr><td><code>UsernameToken</code></td><td>Validates
* username token</td></tr> <tr><td><code>Timestamp</code></td><td>Validates the timestamp</td></tr>
* <tr><td><code>Encrypt</code></td><td>Decrypts the message</td></tr> <tr><td><code>Signature</code></td><td>Validates
* the signature</td></tr> <tr><td><code>NoSecurity</code></td><td>No action performed</td></tr> </table></blockquote>
* <p/>
*
* <p>The validation and securement actions executed by this interceptor are configured via {@code validationActions}
* and {@code securementActions} properties, respectively. Actions should be passed as a space-separated strings.
*
* <p>Valid <strong>validation</strong> actions are:
*
* <blockquote><table> <tr><th>Validation action</th><th>Description</th></tr> <tr><td>{@code UsernameToken}</td><td>Validates
* username token</td></tr> <tr><td>{@code Timestamp}</td><td>Validates the timestamp</td></tr>
* <tr><td>{@code Encrypt}</td><td>Decrypts the message</td></tr> <tr><td>{@code Signature}</td><td>Validates
* the signature</td></tr> <tr><td>{@code NoSecurity}</td><td>No action performed</td></tr> </table></blockquote>
* <p>
* <strong>Securement</strong> actions are: <blockquote><table> <tr><th>Securement action</th><th>Description</th></tr>
* <tr><td><code>UsernameToken</td></code><td>Adds a username token</td></tr> <tr><td><code>UsernameTokenSignature</td></code><td>Adds
* a username token and a signature username token secret key</td></tr> <tr><td><code>Timestamp</td></code><td>Adds a
* timestamp</td></tr> <tr><td><code>Encrypt</td></code><td>Encrypts the response</td></tr>
* <tr><td><code>Signature</td></code><td>Signs the response</td></tr> <tr><td><code>NoSecurity</td></code><td>No action
* <tr><td>{@code UsernameToken</td>}<td>Adds a username token</td></tr> <tr><td>{@code UsernameTokenSignature</td>}<td>Adds
* a username token and a signature username token secret key</td></tr> <tr><td>{@code Timestamp</td>}<td>Adds a
* timestamp</td></tr> <tr><td>{@code Encrypt</td>}<td>Encrypts the response</td></tr>
* <tr><td>{@code Signature</td>}<td>Signs the response</td></tr> <tr><td>{@code NoSecurity</td>}<td>No action
* performed</td></tr> </table></blockquote>
* <p/>
* The order of the actions that the client performed to secure the messages is significant and is enforced by the
*
* <p>The order of the actions that the client performed to secure the messages is significant and is enforced by the
* interceptor.
*
* @author Tareq Abed Rabbo
@@ -144,11 +144,11 @@ public class Wss4jSecurityInterceptor extends AbstractWsSecurityInterceptor impl
}
/**
* The actor name of the <code>wsse:Security</code> header.
* <p/>
* If this parameter is omitted, the actor name is not set.
* <p/>
* The value of the actor or role has to match the receiver's setting or may contain standard values.
* The actor name of the {@code wsse:Security} header.
*
* <p>If this parameter is omitted, the actor name is not set.
*
* <p>The value of the actor or role has to match the receiver's setting or may contain standard values.
*/
public void setSecurementActor(String securementActor) {
handler.setOption(WSHandlerConstants.ACTOR, securementActor);
@@ -165,10 +165,10 @@ public class Wss4jSecurityInterceptor extends AbstractWsSecurityInterceptor impl
/**
* Defines which key identifier type to use. The WS-Security specifications recommends to use the identifier type
* <code>IssuerSerial</code>. For possible encryption key identifier types refer to {@link
* org.apache.ws.security.handler.WSHandlerConstants#keyIdentifier}. For encryption <code>IssuerSerial</code>,
* <code>X509KeyIdentifier</code>, <code>DirectReference</code>, <code>Thumbprint</code>,
* <code>SKIKeyIdentifier</code>, and <code>EmbeddedKeyName</code> are valid only.
* {@code IssuerSerial}. For possible encryption key identifier types refer to {@link
* org.apache.ws.security.handler.WSHandlerConstants#keyIdentifier}. For encryption {@code IssuerSerial},
* {@code X509KeyIdentifier}, {@code DirectReference}, {@code Thumbprint},
* {@code SKIKeyIdentifier}, and {@code EmbeddedKeyName} are valid only.
*/
public void setSecurementEncryptionKeyIdentifier(String securementEncryptionKeyIdentifier) {
handler.setOption(WSHandlerConstants.ENC_KEY_ID, securementEncryptionKeyIdentifier);
@@ -184,34 +184,34 @@ public class Wss4jSecurityInterceptor extends AbstractWsSecurityInterceptor impl
/**
* Property to define which parts of the request shall be encrypted.
* <p/>
* The value of this property is a list of semi-colon separated element names that identify the elements to encrypt.
*
* <p>The value of this property is a list of semi-colon separated element names that identify the elements to encrypt.
* An encryption mode specifier and a namespace identification, each inside a pair of curly brackets, may precede
* each element name.
* <p/>
* The encryption mode specifier is either <code>{Content}</code> or <code>{Element}</code>. Please refer to the W3C
*
* <p>The encryption mode specifier is either {@code{Content}} or {@code{Element}}. Please refer to the W3C
* XML Encryption specification about the differences between Element and Content encryption. The encryption mode
* defaults to <code>Content</code> if it is omitted. Example of a list:
* defaults to {@code Content} if it is omitted. Example of a list:
* <pre>
* &lt;property name="securementEncryptionParts"
* value="{Content}{http://example.org/paymentv2}CreditCard;
* {Element}{}UserName" />
* </pre>
* The the first entry of the list identifies the element <code>CreditCard</code> in the namespace
* <code>http://example.org/paymentv2</code>, and will encrypt its content. Be aware that the element name, the
* The the first entry of the list identifies the element {@code CreditCard} in the namespace
* {@code http://example.org/paymentv2}, and will encrypt its content. Be aware that the element name, the
* namespace identifier, and the encryption modifier are case sensitive.
* <p/>
* The encryption modifier and the namespace identifier can be omitted. In this case the encryption mode defaults to
* <code>Content</code> and the namespace is set to the SOAP namespace.
* <p/>
* An empty encryption mode defaults to <code>Content</code>, an empty namespace identifier defaults to the SOAP
* namespace. The second line of the example defines <code>Element</code> as encryption mode for an
* <code>UserName</code> element in the SOAP namespace.
* <p/>
* To specify an element without a namespace use the string <code>Null</code> as the namespace name (this is a case
*
* <p>The encryption modifier and the namespace identifier can be omitted. In this case the encryption mode defaults to
* {@code Content} and the namespace is set to the SOAP namespace.
*
* <p>An empty encryption mode defaults to {@code Content}, an empty namespace identifier defaults to the SOAP
* namespace. The second line of the example defines {@code Element} as encryption mode for an
* {@code UserName} element in the SOAP namespace.
*
* <p>To specify an element without a namespace use the string {@code Null} as the namespace name (this is a case
* sensitive string)
* <p/>
* If no list is specified, the handler encrypts the SOAP Body in <code>Content</code> mode by default.
*
* <p>If no list is specified, the handler encrypts the SOAP Body in {@code Content} mode by default.
*/
public void setSecurementEncryptionParts(String securementEncryptionParts) {
handler.setOption(WSHandlerConstants.ENCRYPTION_PARTS, securementEncryptionParts);
@@ -229,21 +229,20 @@ public class Wss4jSecurityInterceptor extends AbstractWsSecurityInterceptor impl
/**
* The user's name for encryption.
* <p/>
* The encryption functions uses the public key of this user's certificate to encrypt the generated symmetric key.
* <p/>
* If this parameter is not set, then the encryption function falls back to the {@link
*
* <p>The encryption functions uses the public key of this user's certificate to encrypt the generated symmetric key.
*
* <p>If this parameter is not set, then the encryption function falls back to the {@link
* org.apache.ws.security.handler.WSHandlerConstants#USER} parameter to get the certificate.
* <p/>
* If <b>only</b> encryption of the SOAP body data is requested, it is recommended to use this parameter to define
*
* <p>If <b>only</b> encryption of the SOAP body data is requested, it is recommended to use this parameter to define
* the username. The application can then use the standard user and password functions (see example at {@link
* org.apache.ws.security.handler.WSHandlerConstants#USER} to enable HTTP authentication functions.
* <p/>
* Encryption only does not authenticate a user / sender, therefore it does not need a password.
* <p/>
* Placing the username of the encryption certificate in the configuration file is not a security risk, because the
*
* <p>Encryption only does not authenticate a user / sender, therefore it does not need a password.
*
* <p>Placing the username of the encryption certificate in the configuration file is not a security risk, because the
* public key of that certificate is used only.
* <p/>
*/
public void setSecurementEncryptionUser(String securementEncryptionUser) {
handler.setOption(WSHandlerConstants.ENCRYPTION_USER, securementEncryptionUser);
@@ -255,10 +254,10 @@ public class Wss4jSecurityInterceptor extends AbstractWsSecurityInterceptor impl
/**
* Specific parameter for UsernameToken action to define the encoding of the passowrd.
* <p/>
* The parameter can be set to either {@link WSConstants#PW_DIGEST} or to {@link WSConstants#PW_TEXT}.
* <p/>
* The default setting is PW_DIGEST.
*
* <p>The parameter can be set to either {@link WSConstants#PW_DIGEST} or to {@link WSConstants#PW_TEXT}.
*
* <p>The default setting is PW_DIGEST.
*/
public void setSecurementPasswordType(String securementUsernameTokenPasswordType) {
handler.setOption(WSHandlerConstants.PASSWORD_TYPE, securementUsernameTokenPasswordType);
@@ -286,9 +285,9 @@ public class Wss4jSecurityInterceptor extends AbstractWsSecurityInterceptor impl
/**
* Defines which key identifier type to use. The WS-Security specifications recommends to use the identifier type
* <code>IssuerSerial</code>. For possible signature key identifier types refer to {@link
* org.apache.ws.security.handler.WSHandlerConstants#keyIdentifier}. For signature <code>IssuerSerial</code> and
* <code>DirectReference</code> are valid only.
* {@code IssuerSerial}. For possible signature key identifier types refer to {@link
* org.apache.ws.security.handler.WSHandlerConstants#keyIdentifier}. For signature {@code IssuerSerial} and
* {@code DirectReference} are valid only.
*/
public void setSecurementSignatureKeyIdentifier(String securementSignatureKeyIdentifier) {
handler.setOption(WSHandlerConstants.SIG_KEY_ID, securementSignatureKeyIdentifier);
@@ -296,26 +295,26 @@ public class Wss4jSecurityInterceptor extends AbstractWsSecurityInterceptor impl
/**
* Property to define which parts of the request shall be signed.
* <p/>
* Refer to {@link #setSecurementEncryptionParts(String)} for a detailed description of the format of the value
*
* <p>Refer to {@link #setSecurementEncryptionParts(String)} for a detailed description of the format of the value
* string.
* <p/>
* If this property is not specified the handler signs the SOAP Body by default.
* <p/>
* The WS Security specifications define several formats to transfer the signature tokens (certificates) or
* references to these tokens. Thus, the plain element name <code>Token</code> signs the token and takes care of the
*
* <p>If this property is not specified the handler signs the SOAP Body by default.
*
* <p>The WS Security specifications define several formats to transfer the signature tokens (certificates) or
* references to these tokens. Thus, the plain element name {@code Token} signs the token and takes care of the
* different formats.
* <p/>
* To sign the SOAP body <b>and</b> the signature token the value of this parameter must contain:
*
* <p>To sign the SOAP body <b>and</b> the signature token the value of this parameter must contain:
* <pre>
* &lt;property name="securementSignatureParts"
* value="{}{http://schemas.xmlsoap.org/soap/envelope/}Body; Token" />
* </pre>
* To specify an element without a namespace use the string <code>Null</code> as the namespace name (this is a case
* To specify an element without a namespace use the string {@code Null} as the namespace name (this is a case
* sensitive string)
* <p/>
* If there is no other element in the request with a local name of <code>Body</code> then the SOAP namespace
* identifier can be empty (<code>{}</code>).
*
* <p>If there is no other element in the request with a local name of {@code Body} then the SOAP namespace
* identifier can be empty ({@code{}}).
*/
public void setSecurementSignatureParts(String securementSignatureParts) {
handler.setOption(WSHandlerConstants.SIGNATURE_PARTS, securementSignatureParts);
@@ -323,13 +322,13 @@ public class Wss4jSecurityInterceptor extends AbstractWsSecurityInterceptor impl
/**
* The user's name for signature.
* <p/>
* This name is used as the alias name in the keystore to get user's
*
* <p>This name is used as the alias name in the keystore to get user's
* certificate and private key to perform signing.
* <p/>
* If this parameter is not set, then the signature
*
* <p>If this parameter is not set, then the signature
* function falls back to the alias specified by {@link #setSecurementUsername(String)}.
* <p/>
*
*/
public void setSecurementSignatureUser(String securementSignatureUser) {
handler.setOption(WSHandlerConstants.SIGNATURE_USER, securementSignatureUser);
@@ -424,22 +423,22 @@ public class Wss4jSecurityInterceptor extends AbstractWsSecurityInterceptor impl
}
/**
* Enables the <code>mustUnderstand</code> attribute on WS-Security headers on outgoing messages. Default is
* <code>true</code>.
* Enables the {@code mustUnderstand} attribute on WS-Security headers on outgoing messages. Default is
* {@code true}.
*/
public void setSecurementMustUnderstand(boolean securementMustUnderstand) {
handler.setOption(WSHandlerConstants.MUST_UNDERSTAND, securementMustUnderstand);
}
/**
* Sets the additional elements in <code>UsernameToken</code>s.
* <p/>
* The value of this parameter is a list of element names that are added to the UsernameToken. The names of the list
* Sets the additional elements in {@code UsernameToken}s.
*
* <p>The value of this parameter is a list of element names that are added to the UsernameToken. The names of the list
* a separated by spaces.
* <p/>
* The list may contain the names <code>Nonce</code> and <code>Created</code> only (case sensitive). Use this option
* if the password type is <code>passwordText</code> and the handler shall add the <code>Nonce</code> and/or
* <code>Created</code> elements.
*
* <p>The list may contain the names {@code Nonce} and {@code Created} only (case sensitive). Use this option
* if the password type is {@code passwordText} and the handler shall add the {@code Nonce} and/or
* {@code Created} elements.
*/
public void setSecurementUsernameTokenElements(String securementUsernameTokenElements) {
handler.setOption(WSHandlerConstants.ADD_UT_ELEMENTS, securementUsernameTokenElements);

View File

@@ -36,7 +36,7 @@ public abstract class AbstractWsPasswordCallbackHandler extends AbstractCallback
/**
* Handles {@link WSPasswordCallback} callbacks. Inspects the callback {@link WSPasswordCallback#getUsage() usage}
* code, and calls the various <code>handle*</code> template methods.
* code, and calls the various {@code handle*} template methods.
*
* @param callback the callback
* @throws IOException in case of I/O errors
@@ -83,13 +83,13 @@ public abstract class AbstractWsPasswordCallbackHandler extends AbstractCallback
/**
* Invoked when the callback has a {@link WSPasswordCallback#DECRYPT} usage.
* <p/>
* This method is invoked when WSS4J needs a password to get the private key of the {@link
*
* <p>This method is invoked when WSS4J needs a password to get the private key of the {@link
* WSPasswordCallback#getIdentifier() identifier} (username) from the keystore. WSS4J uses this private key to
* decrypt the session (symmetric) key. Because the encryption method uses the public key to encrypt the session key
* it needs no password (a public key is usually not protected by a password).
* <p/>
* Default implementation throws an {@link UnsupportedCallbackException}.
*
* <p>Default implementation throws an {@link UnsupportedCallbackException}.
*/
protected void handleDecrypt(WSPasswordCallback callback) throws IOException, UnsupportedCallbackException {
throw new UnsupportedCallbackException(callback);
@@ -97,10 +97,10 @@ public abstract class AbstractWsPasswordCallbackHandler extends AbstractCallback
/**
* Invoked when the callback has a {@link WSPasswordCallback#USERNAME_TOKEN} usage.
* <p/>
* This method is invoked when WSS4J needs the password to fill in or to verify a UsernameToken.
* <p/>
* Default implementation throws an {@link UnsupportedCallbackException}.
*
* <p>This method is invoked when WSS4J needs the password to fill in or to verify a UsernameToken.
*
* <p>Default implementation throws an {@link UnsupportedCallbackException}.
*/
protected void handleUsernameToken(WSPasswordCallback callback) throws IOException, UnsupportedCallbackException {
throw new UnsupportedCallbackException(callback);
@@ -108,12 +108,12 @@ public abstract class AbstractWsPasswordCallbackHandler extends AbstractCallback
/**
* Invoked when the callback has a {@link WSPasswordCallback#SIGNATURE} usage.
* <p/>
* This method is invoked when WSS4J needs the password to get the private key of the {@link
*
* <p>This method is invoked when WSS4J needs the password to get the private key of the {@link
* WSPasswordCallback#getIdentifier() identifier} (username) from the keystore. WSS4J uses this private key to
* produce a signature. The signature verfication uses the public key to verfiy the signature.
* <p/>
* Default implementation throws an {@link UnsupportedCallbackException}.
*
* <p>Default implementation throws an {@link UnsupportedCallbackException}.
*/
protected void handleSignature(WSPasswordCallback callback) throws IOException, UnsupportedCallbackException {
throw new UnsupportedCallbackException(callback);
@@ -121,10 +121,10 @@ public abstract class AbstractWsPasswordCallbackHandler extends AbstractCallback
/**
* Invoked when the callback has a {@link WSPasswordCallback#SECURITY_CONTEXT_TOKEN} usage.
* <p/>
* This method is invoked when WSS4J needs the key to to be associated with a SecurityContextToken.
* <p/>
* Default implementation throws an {@link UnsupportedCallbackException}.
*
* <p>This method is invoked when WSS4J needs the key to to be associated with a SecurityContextToken.
*
* <p>Default implementation throws an {@link UnsupportedCallbackException}.
*/
protected void handleSecurityContextToken(WSPasswordCallback callback)
throws IOException, UnsupportedCallbackException {
@@ -133,8 +133,8 @@ public abstract class AbstractWsPasswordCallbackHandler extends AbstractCallback
/**
* Invoked when the callback has a {@link WSPasswordCallback#CUSTOM_TOKEN} usage.
* <p/>
* Default implementation throws an {@link UnsupportedCallbackException}.
*
* <p>Default implementation throws an {@link UnsupportedCallbackException}.
*/
protected void handleCustomToken(WSPasswordCallback callback) throws IOException, UnsupportedCallbackException {
throw new UnsupportedCallbackException(callback);
@@ -142,8 +142,8 @@ public abstract class AbstractWsPasswordCallbackHandler extends AbstractCallback
/**
* Invoked when the callback has a {@link WSPasswordCallback#SECRET_KEY} usage.
* <p/>
* Default implementation throws an {@link UnsupportedCallbackException}.
*
* <p>Default implementation throws an {@link UnsupportedCallbackException}.
*/
protected void handleSecretKey(WSPasswordCallback callback) throws IOException, UnsupportedCallbackException {
throw new UnsupportedCallbackException(callback);
@@ -151,8 +151,8 @@ public abstract class AbstractWsPasswordCallbackHandler extends AbstractCallback
/**
* Invoked when a {@link CleanupCallback} is passed to {@link #handle(Callback[])}.
* <p/>
* Default implementation throws an {@link UnsupportedCallbackException}.
*
* <p>Default implementation throws an {@link UnsupportedCallbackException}.
*/
protected void handleCleanup(CleanupCallback callback) throws IOException, UnsupportedCallbackException {
throw new UnsupportedCallbackException(callback);
@@ -160,8 +160,8 @@ public abstract class AbstractWsPasswordCallbackHandler extends AbstractCallback
/**
* Invoked when a {@link UsernameTokenPrincipalCallback} is passed to {@link #handle(Callback[])}.
* <p/>
* Default implementation throws an {@link UnsupportedCallbackException}.
*
* <p>Default implementation throws an {@link UnsupportedCallbackException}.
*/
protected void handleUsernameTokenPrincipal(UsernameTokenPrincipalCallback callback)
throws IOException, UnsupportedCallbackException {

View File

@@ -29,7 +29,7 @@ import org.springframework.beans.factory.InitializingBean;
import org.springframework.ws.soap.security.support.KeyStoreUtils;
/**
* Callback handler that uses Java Security <code>KeyStore</code>s to handle cryptographic callbacks. Allows for
* Callback handler that uses Java Security {@code KeyStore}s to handle cryptographic callbacks. Allows for
* specific key stores to be set for various cryptographic operations.
*
* @author Tareq Abed Rabbo

View File

@@ -28,7 +28,7 @@ import org.springframework.beans.factory.InitializingBean;
import org.springframework.util.Assert;
/**
* Simple callback handler that validates passwords against a in-memory <code>Properties</code> object. Password
* Simple callback handler that validates passwords against a in-memory {@code Properties} object. Password
* validation is done on a case-sensitive basis.
*
* @author Tareq Abed Rabbo

View File

@@ -37,8 +37,8 @@ import org.springframework.ws.soap.security.support.SpringSecurityUtils;
/**
* Callback handler that validates a plain text or digest password using an Spring Security {@code UserDetailsService}.
* <p/>
* An Spring Security {@link UserDetailsService} is used to load {@link UserDetails} from. The digest of the
*
* <p>An Spring Security {@link UserDetailsService} is used to load {@link UserDetails} from. The digest of the
* password contained in this details object is then compared with the digest in the message.
*
* @author Arjen Poutsma

View File

@@ -22,9 +22,9 @@ import javax.security.auth.callback.Callback;
import org.apache.ws.security.WSUsernameTokenPrincipal;
/**
* Underlying security services instantiate and pass a <code>UsernameTokenPrincipalCallback</code> to the
* <code>handle</code> method of a <code>CallbackHandler</code> to pass a security
* <code>WSUsernameTokenPrincipal</code>.
* Underlying security services instantiate and pass a {@code UsernameTokenPrincipalCallback} to the
* {@code handle} method of a {@code CallbackHandler} to pass a security
* {@code WSUsernameTokenPrincipal}.
*
* @author Arjen Poutsma
* @see WSUsernameTokenPrincipal
@@ -36,12 +36,12 @@ public class UsernameTokenPrincipalCallback implements Callback, Serializable {
private final WSUsernameTokenPrincipal principal;
/** Construct a <code>UsernameTokenPrincipalCallback</code>. */
/** Construct a {@code UsernameTokenPrincipalCallback}. */
public UsernameTokenPrincipalCallback(WSUsernameTokenPrincipal principal) {
this.principal = principal;
}
/** Get the retrieved <code>Principal</code>. */
/** Get the retrieved {@code Principal}. */
public WSUsernameTokenPrincipal getPrincipal() {
return principal;
}

View File

@@ -33,8 +33,8 @@ import org.springframework.util.Assert;
/**
* Spring factory bean for a WSS4J {@link Crypto}. Allows for strong-typed property configuration, or configuration
* through {@link Properties}.
* <p/>
* Requires either individual properties, or the {@link #setConfiguration(java.util.Properties) configuration} property
*
* <p>Requires either individual properties, or the {@link #setConfiguration(java.util.Properties) configuration} property
* to be set.
*
* @author Tareq Abed Rabbo
@@ -66,8 +66,8 @@ public class CryptoFactoryBean implements FactoryBean<Crypto>, BeanClassLoaderAw
/**
* Sets the {@link org.apache.ws.security.components.crypto.Crypto} provider name. Defaults to {@link
* org.apache.ws.security.components.crypto.Merlin}.
* <p/>
* This property maps to the WSS4J {@code org.apache.ws.security.crypto.provider} property.
*
* <p>This property maps to the WSS4J {@code org.apache.ws.security.crypto.provider} property.
*
* @param cryptoProviderClass the crypto provider class
*/
@@ -78,8 +78,8 @@ public class CryptoFactoryBean implements FactoryBean<Crypto>, BeanClassLoaderAw
/**
* Sets the location of the key store to be loaded in the {@link org.apache.ws.security.components.crypto.Crypto}
* instance.
* <p/>
* This property maps to the WSS4J {@code org.apache.ws.security.crypto.merlin.file} property.
*
* <p>This property maps to the WSS4J {@code org.apache.ws.security.crypto.merlin.file} property.
*
* @param location the key store location
* @throws java.io.IOException when the resource cannot be opened
@@ -106,8 +106,8 @@ public class CryptoFactoryBean implements FactoryBean<Crypto>, BeanClassLoaderAw
/**
* Sets the key store provider.
* <p/>
* This property maps to the WSS4J {@code org.apache.ws.security.crypto.merlin.keystore.provider} property.
*
* <p>This property maps to the WSS4J {@code org.apache.ws.security.crypto.merlin.keystore.provider} property.
*
* @param provider the key store provider
*/
@@ -117,8 +117,8 @@ public class CryptoFactoryBean implements FactoryBean<Crypto>, BeanClassLoaderAw
/**
* Sets the key store password. Defaults to {@code security}.
* <p/>
* This property maps to the WSS4J {@code org.apache.ws.security.crypto.merlin.keystore.password} property.
*
* <p>This property maps to the WSS4J {@code org.apache.ws.security.crypto.merlin.keystore.password} property.
*
* @param password the key store password
*/
@@ -128,8 +128,8 @@ public class CryptoFactoryBean implements FactoryBean<Crypto>, BeanClassLoaderAw
/**
* Sets the key store type. Defaults to {@link java.security.KeyStore#getDefaultType()}.
* <p/>
* This property maps to the WSS4J {@code org.apache.ws.security.crypto.merlin.keystore.type} property.
*
* <p>This property maps to the WSS4J {@code org.apache.ws.security.crypto.merlin.keystore.type} property.
*
* @param type the key store type
*/
@@ -139,11 +139,10 @@ public class CryptoFactoryBean implements FactoryBean<Crypto>, BeanClassLoaderAw
/**
* Sets the trust store password. Defaults to {@code changeit}.
* <p/>
* WSS4J crypto uses the standard J2SE trust store, i.e. {@code $JAVA_HOME/lib/security/cacerts}.
* <p/>
* <p/>
* This property maps to the WSS4J {@code org.apache.ws.security.crypto.merlin.cacerts.password} property.
*
* <p>WSS4J crypto uses the standard J2SE trust store, i.e. {@code $JAVA_HOME/lib/security/cacerts}.
*
* <p>This property maps to the WSS4J {@code org.apache.ws.security.crypto.merlin.cacerts.password} property.
*
* @param password the trust store password
*/
@@ -155,8 +154,8 @@ public class CryptoFactoryBean implements FactoryBean<Crypto>, BeanClassLoaderAw
* Sets the alias name of the default certificate which has been specified as a property. This should be the
* certificate that is used for signature and encryption. This alias corresponds to the certificate that should be
* used whenever KeyInfo is not present in a signed or an encrypted message.
* <p/>
* This property maps to the WSS4J {@code org.apache.ws.security.crypto.merlin.keystore.alias} property.
*
* <p>This property maps to the WSS4J {@code org.apache.ws.security.crypto.merlin.keystore.alias} property.
*
* @param defaultX509Alias alias name of the default X509 certificate
*/

View File

@@ -24,7 +24,7 @@ import org.springframework.security.core.GrantedAuthority;
/**
* <code>Authentication</code> implementation for X.509 client-certificate authentication.
* {@code Authentication} implementation for X.509 client-certificate authentication.
* <p>Migrated from Spring Security 2 since it has been removed in Spring Security 3.</p>
*
* @author Luke Taylor
@@ -40,7 +40,7 @@ public class X509AuthenticationToken extends AbstractAuthenticationToken {
/**
* Used for an authentication request. The {@link org.springframework.security.core.Authentication#isAuthenticated()} will return
* <code>false</code>.
* {@code false}.
*
* @param credentials the certificate
*/
@@ -51,10 +51,10 @@ public class X509AuthenticationToken extends AbstractAuthenticationToken {
/**
* Used for an authentication response object. The {@link org.springframework.security.core.Authentication#isAuthenticated()}
* will return <code>true</code>.
* will return {@code true}.
*
* @param principal the principal, which is generally a
* <code>UserDetails</code>
* {@code UserDetails}
* @param credentials the certificate
* @param authorities the authorities
*/

View File

@@ -23,7 +23,7 @@ import org.springframework.security.core.userdetails.UserDetails;
/**
* Populates the <code>UserDetails</code> associated with the X.509
* Populates the {@code UserDetails} associated with the X.509
* certificate presented by a client.
* <p>
* Although the certificate will already have been validated by the web container,
@@ -40,7 +40,7 @@ public interface X509AuthoritiesPopulator {
/**
* Obtains the granted authorities for the specified user.<p>May throw any
* <code>AuthenticationException</code> or return <code>null</code> if the authorities are unavailable.</p>
* {@code AuthenticationException} or return {@code null} if the authorities are unavailable.</p>
*
* @param userCertificate the X.509 certificate supplied
*

View File

@@ -31,7 +31,7 @@ import org.springframework.util.Assert;
/**
* Caches <code>User</code> objects using a Spring IoC defined <a
* Caches {@code User} objects using a Spring IoC defined <a
* href="http://ehcache.sourceforge.net">EHCACHE</a>.
* <p>Migrated from Spring Security 2 since it has been removed in Spring Security 3.</p>
*

View File

@@ -44,17 +44,17 @@ import org.springframework.ws.soap.security.xwss.callback.XwssCallbackHandlerCha
/**
* WS-Security endpoint interceptor that is based on Sun's XML and Web Services Security package (XWSS). This
* WS-Security implementation is part of the Java Web Services Developer Pack (Java WSDP).
* <p/>
* This interceptor needs a <code>CallbackHandler</code> to operate. This handler is used to retrieve certificates,
*
* <p>This interceptor needs a {@code CallbackHandler} to operate. This handler is used to retrieve certificates,
* private keys, validate user credentials, etc. Refer to the XWSS Javadoc to learn more about the specific
* <code>Callback</code>s fired by XWSS. You can also set multiple handlers, each of which will be used in turn.
* <p/>
* Additionally, you must define a XWSS policy file by setting <code>policyConfiguration</code> property. The format of
* {@code Callback}s fired by XWSS. You can also set multiple handlers, each of which will be used in turn.
*
* <p>Additionally, you must define a XWSS policy file by setting {@code policyConfiguration} property. The format of
* the policy file is documented in the <a href="http://java.sun.com/webservices/docs/1.6/tutorial/doc/XWS-SecurityIntro4.html#wp529900">Java
* Web Services Tutorial</a>.
* <p/>
* <b>Note</b> that this interceptor depends on SAAJ, and thus requires <code>SaajSoapMessage</code>s to operate. This
* means that you must use a <code>SaajSoapMessageFactory</code> to create the SOAP messages.
*
* <p><b>Note</b> that this interceptor depends on SAAJ, and thus requires {@code SaajSoapMessage}s to operate. This
* means that you must use a {@code SaajSoapMessageFactory} to create the SOAP messages.
*
* @author Arjen Poutsma
* @see #setCallbackHandler(javax.security.auth.callback.CallbackHandler)
@@ -73,7 +73,7 @@ public class XwsSecurityInterceptor extends AbstractWsSecurityInterceptor implem
private Resource policyConfiguration;
/**
* Sets the handler to resolve XWSS callbacks. Setting either this propery, or <code>callbackHandlers</code>, is
* Sets the handler to resolve XWSS callbacks. Setting either this propery, or {@code callbackHandlers}, is
* required.
*
* @see com.sun.xml.wss.impl.callback.XWSSCallback
@@ -84,7 +84,7 @@ public class XwsSecurityInterceptor extends AbstractWsSecurityInterceptor implem
}
/**
* Sets the handlers to resolve XWSS callbacks. Setting either this propery, or <code>callbackHandlers</code>, is
* Sets the handlers to resolve XWSS callbacks. Setting either this propery, or {@code callbackHandlers}, is
* required.
*
* @see com.sun.xml.wss.impl.callback.XWSSCallback
@@ -125,7 +125,7 @@ public class XwsSecurityInterceptor extends AbstractWsSecurityInterceptor implem
*
* @param soapMessage the message to be secured
* @throws XwsSecuritySecurementException in case of errors
* @throws IllegalArgumentException when soapMessage is not a <code>SaajSoapMessage</code>
* @throws IllegalArgumentException when soapMessage is not a {@code SaajSoapMessage}
*/
@Override
protected void secureMessage(SoapMessage soapMessage, MessageContext messageContext)
@@ -151,7 +151,7 @@ public class XwsSecurityInterceptor extends AbstractWsSecurityInterceptor implem
*
* @param soapMessage the message to be validated
* @throws XwsSecurityValidationException in case of errors
* @throws IllegalArgumentException when soapMessage is not a <code>SaajSoapMessage</code>
* @throws IllegalArgumentException when soapMessage is not a {@code SaajSoapMessage}
*/
@Override
protected void validateMessage(SoapMessage soapMessage, MessageContext messageContext)

View File

@@ -30,7 +30,7 @@ import org.springframework.ws.soap.security.callback.AbstractCallbackHandler;
/**
* Default callback handler that handles cryptographic callback. This handler determines the exact callback passed, and
* calls a template method for it. By default, all template methods throw an <code>UnsupportedCallbackException</code>,
* calls a template method for it. By default, all template methods throw an {@code UnsupportedCallbackException},
* so you only need to override those you need.
*
* @author Arjen Poutsma
@@ -66,8 +66,8 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
//
/**
* Template method that handles <code>CertificateValidationCallback</code>s. Called from
* <code>handleInternal()</code>. Default implementation throws an <code>UnsupportedCallbackException</code>.
* Template method that handles {@code CertificateValidationCallback}s. Called from
* {@code handleInternal()}. Default implementation throws an {@code UnsupportedCallbackException}.
*/
protected void handleCertificateValidationCallback(CertificateValidationCallback callback)
throws IOException, UnsupportedCallbackException {
@@ -79,7 +79,7 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
//
/**
* Method that handles <code>DecryptionKeyCallback</code>s. Called from <code>handleInternal()</code>. Default
* Method that handles {@code DecryptionKeyCallback}s. Called from {@code handleInternal()}. Default
* implementation delegates to specific handling methods.
*
* @see #handlePrivateKeyRequest(com.sun.xml.wss.impl.callback.DecryptionKeyCallback,
@@ -101,8 +101,8 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
}
/**
* Method that handles <code>DecryptionKeyCallback</code>s with <code>PrivateKeyRequest</code> . Called from
* <code>handleDecryptionKeyCallback()</code>. Default implementation delegates to specific handling methods.
* Method that handles {@code DecryptionKeyCallback}s with {@code PrivateKeyRequest} . Called from
* {@code handleDecryptionKeyCallback()}. Default implementation delegates to specific handling methods.
*
* @see #handlePublicKeyBasedPrivKeyCertRequest(com.sun.xml.wss.impl.callback.SignatureKeyCallback,
* com.sun.xml.wss.impl.callback.SignatureKeyCallback.PublicKeyBasedPrivKeyCertRequest)
@@ -135,9 +135,9 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
}
/**
* Template method that handles <code>DecryptionKeyCallback</code>s with <code>PublicKeyBasedPrivKeyRequest</code>s.
* Called from <code>handlePrivateKeyRequest()</code>. Default implementation throws an
* <code>UnsupportedCallbackException</code>.
* Template method that handles {@code DecryptionKeyCallback}s with {@code PublicKeyBasedPrivKeyRequest}s.
* Called from {@code handlePrivateKeyRequest()}. Default implementation throws an
* {@code UnsupportedCallbackException}.
*/
protected void handlePublicKeyBasedPrivKeyRequest(DecryptionKeyCallback callback,
DecryptionKeyCallback.PublicKeyBasedPrivKeyRequest request)
@@ -146,9 +146,9 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
}
/**
* Template method that handles <code>DecryptionKeyCallback</code>s with <code>X509CertificateBasedRequest</code>s.
* Called from <code>handlePrivateKeyRequest()</code>. Default implementation throws an
* <code>UnsupportedCallbackException</code>.
* Template method that handles {@code DecryptionKeyCallback}s with {@code X509CertificateBasedRequest}s.
* Called from {@code handlePrivateKeyRequest()}. Default implementation throws an
* {@code UnsupportedCallbackException}.
*/
protected void handleX509CertificateBasedRequest(DecryptionKeyCallback callback,
DecryptionKeyCallback.X509CertificateBasedRequest request)
@@ -157,9 +157,9 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
}
/**
* Template method that handles <code>DecryptionKeyCallback</code>s with <code>X509IssuerSerialBasedRequest</code>s.
* Called from <code>handlePrivateKeyRequest()</code>. Default implementation throws an
* <code>UnsupportedCallbackException</code>.
* Template method that handles {@code DecryptionKeyCallback}s with {@code X509IssuerSerialBasedRequest}s.
* Called from {@code handlePrivateKeyRequest()}. Default implementation throws an
* {@code UnsupportedCallbackException}.
*/
protected void handleX509IssuerSerialBasedRequest(DecryptionKeyCallback callback,
DecryptionKeyCallback.X509IssuerSerialBasedRequest request)
@@ -168,9 +168,9 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
}
/**
* Template method that handles <code>DecryptionKeyCallback</code>s with <code>X509SubjectKeyIdentifierBasedRequest</code>s.
* Called from <code>handlePrivateKeyRequest()</code>. Default implementation throws an
* <code>UnsupportedCallbackException</code>.
* Template method that handles {@code DecryptionKeyCallback}s with {@code X509SubjectKeyIdentifierBasedRequest}s.
* Called from {@code handlePrivateKeyRequest()}. Default implementation throws an
* {@code UnsupportedCallbackException}.
*/
protected void handleX509SubjectKeyIdentifierBasedRequest(DecryptionKeyCallback callback,
DecryptionKeyCallback.X509SubjectKeyIdentifierBasedRequest request)
@@ -179,8 +179,8 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
}
/**
* Method that handles <code>DecryptionKeyCallback</code>s with <code>SymmetricKeyRequest</code> . Called from
* <code>handleDecryptionKeyCallback()</code>. Default implementation delegates to specific handling methods.
* Method that handles {@code DecryptionKeyCallback}s with {@code SymmetricKeyRequest} . Called from
* {@code handleDecryptionKeyCallback()}. Default implementation delegates to specific handling methods.
*
* @see #handleAliasSymmetricKeyRequest(com.sun.xml.wss.impl.callback.DecryptionKeyCallback,
* com.sun.xml.wss.impl.callback.DecryptionKeyCallback.AliasSymmetricKeyRequest)
@@ -199,9 +199,9 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
}
/**
* Template method that handles <code>DecryptionKeyCallback</code>s with <code>AliasSymmetricKeyRequest</code>s.
* Called from <code>handleSymmetricKeyRequest()</code>. Default implementation throws an
* <code>UnsupportedCallbackException</code>.
* Template method that handles {@code DecryptionKeyCallback}s with {@code AliasSymmetricKeyRequest}s.
* Called from {@code handleSymmetricKeyRequest()}. Default implementation throws an
* {@code UnsupportedCallbackException}.
*/
protected void handleAliasSymmetricKeyRequest(DecryptionKeyCallback callback,
DecryptionKeyCallback.AliasSymmetricKeyRequest request)
@@ -214,7 +214,7 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
//
/**
* Method that handles <code>EncryptionKeyCallback</code>s. Called from <code>handleInternal()</code>. Default
* Method that handles {@code EncryptionKeyCallback}s. Called from {@code handleInternal()}. Default
* implementation delegates to specific handling methods.
*
* @see #handleSymmetricKeyRequest(com.sun.xml.wss.impl.callback.EncryptionKeyCallback,
@@ -238,8 +238,8 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
}
/**
* Method that handles <code>EncryptionKeyCallback</code>s with <code>SymmetricKeyRequest</code> . Called from
* <code>handleEncryptionKeyCallback()</code>. Default implementation delegates to specific handling methods.
* Method that handles {@code EncryptionKeyCallback}s with {@code SymmetricKeyRequest} . Called from
* {@code handleEncryptionKeyCallback()}. Default implementation delegates to specific handling methods.
*
* @see #handleAliasSymmetricKeyRequest(com.sun.xml.wss.impl.callback.EncryptionKeyCallback,
* com.sun.xml.wss.impl.callback.EncryptionKeyCallback.AliasSymmetricKeyRequest)
@@ -253,9 +253,9 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
}
/**
* Template method that handles <code>EncryptionKeyCallback</code>s with <code>AliasSymmetricKeyRequest</code>s.
* Called from <code>handleSymmetricKeyRequest()</code>. Default implementation throws an
* <code>UnsupportedCallbackException</code>.
* Template method that handles {@code EncryptionKeyCallback}s with {@code AliasSymmetricKeyRequest}s.
* Called from {@code handleSymmetricKeyRequest()}. Default implementation throws an
* {@code UnsupportedCallbackException}.
*/
protected void handleAliasSymmetricKeyRequest(EncryptionKeyCallback callback,
EncryptionKeyCallback.AliasSymmetricKeyRequest request)
@@ -264,8 +264,8 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
}
/**
* Method that handles <code>EncryptionKeyCallback</code>s with <code>X509CertificateRequest</code> . Called from
* <code>handleEncryptionKeyCallback()</code>. Default implementation delegates to specific handling methods.
* Method that handles {@code EncryptionKeyCallback}s with {@code X509CertificateRequest} . Called from
* {@code handleEncryptionKeyCallback()}. Default implementation delegates to specific handling methods.
*
* @see #handleAliasX509CertificateRequest(com.sun.xml.wss.impl.callback.EncryptionKeyCallback,
* com.sun.xml.wss.impl.callback.EncryptionKeyCallback.AliasX509CertificateRequest)
@@ -293,9 +293,9 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
}
/**
* Template method that handles <code>EncryptionKeyCallback</code>s with <code>AliasX509CertificateRequest</code>s.
* Called from <code>handleX509CertificateRequest()</code>. Default implementation throws an
* <code>UnsupportedCallbackException</code>.
* Template method that handles {@code EncryptionKeyCallback}s with {@code AliasX509CertificateRequest}s.
* Called from {@code handleX509CertificateRequest()}. Default implementation throws an
* {@code UnsupportedCallbackException}.
*/
protected void handleAliasX509CertificateRequest(EncryptionKeyCallback callback,
EncryptionKeyCallback.AliasX509CertificateRequest request)
@@ -304,9 +304,9 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
}
/**
* Template method that handles <code>EncryptionKeyCallback</code>s with <code>DefaultX509CertificateRequest</code>s.
* Called from <code>handleX509CertificateRequest()</code>. Default implementation throws an
* <code>UnsupportedCallbackException</code>.
* Template method that handles {@code EncryptionKeyCallback}s with {@code DefaultX509CertificateRequest}s.
* Called from {@code handleX509CertificateRequest()}. Default implementation throws an
* {@code UnsupportedCallbackException}.
*/
protected void handleDefaultX509CertificateRequest(EncryptionKeyCallback callback,
EncryptionKeyCallback.DefaultX509CertificateRequest request)
@@ -315,9 +315,9 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
}
/**
* Template method that handles <code>EncryptionKeyCallback</code>s with <code>PublicKeyBasedRequest</code>s. Called
* from <code>handleX509CertificateRequest()</code>. Default implementation throws an
* <code>UnsupportedCallbackException</code>.
* Template method that handles {@code EncryptionKeyCallback}s with {@code PublicKeyBasedRequest}s. Called
* from {@code handleX509CertificateRequest()}. Default implementation throws an
* {@code UnsupportedCallbackException}.
*/
protected void handlePublicKeyBasedRequest(EncryptionKeyCallback callback,
EncryptionKeyCallback.PublicKeyBasedRequest request)
@@ -330,7 +330,7 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
//
/**
* Method that handles <code>SignatureKeyCallback</code>s. Called from <code>handleInternal()</code>. Default
* Method that handles {@code SignatureKeyCallback}s. Called from {@code handleInternal()}. Default
* implementation delegates to specific handling methods.
*
* @see #handlePrivKeyCertRequest(com.sun.xml.wss.impl.callback.SignatureKeyCallback,
@@ -347,8 +347,8 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
}
/**
* Method that handles <code>SignatureKeyCallback</code>s with <code>PrivKeyCertRequest</code>s. Called from
* <code>handleSignatureKeyCallback()</code>. Default implementation delegates to specific handling methods.
* Method that handles {@code SignatureKeyCallback}s with {@code PrivKeyCertRequest}s. Called from
* {@code handleSignatureKeyCallback()}. Default implementation delegates to specific handling methods.
*
* @see #handleDefaultPrivKeyCertRequest(com.sun.xml.wss.impl.callback.SignatureKeyCallback,
* com.sun.xml.wss.impl.callback.SignatureKeyCallback.DefaultPrivKeyCertRequest)
@@ -375,9 +375,9 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
}
/**
* Template method that handles <code>SignatureKeyCallback</code>s with <code>DefaultPrivKeyCertRequest</code>s.
* Called from <code>handlePrivKeyCertRequest()</code>. Default implementation throws an
* <code>UnsupportedCallbackException</code>.
* Template method that handles {@code SignatureKeyCallback}s with {@code DefaultPrivKeyCertRequest}s.
* Called from {@code handlePrivKeyCertRequest()}. Default implementation throws an
* {@code UnsupportedCallbackException}.
*/
protected void handleDefaultPrivKeyCertRequest(SignatureKeyCallback callback,
SignatureKeyCallback.DefaultPrivKeyCertRequest request)
@@ -386,9 +386,9 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
}
/**
* Template method that handles <code>SignatureKeyCallback</code>s with <code>AliasPrivKeyCertRequest</code>s.
* Called from <code>handlePrivKeyCertRequest()</code>. Default implementation throws an
* <code>UnsupportedCallbackException</code>.
* Template method that handles {@code SignatureKeyCallback}s with {@code AliasPrivKeyCertRequest}s.
* Called from {@code handlePrivKeyCertRequest()}. Default implementation throws an
* {@code UnsupportedCallbackException}.
*/
protected void handleAliasPrivKeyCertRequest(SignatureKeyCallback callback,
SignatureKeyCallback.AliasPrivKeyCertRequest request)
@@ -397,9 +397,9 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
}
/**
* Template method that handles <code>SignatureKeyCallback</code>s with <code>PublicKeyBasedPrivKeyCertRequest</code>s.
* Called from <code>handlePrivKeyCertRequest()</code>. Default implementation throws an
* <code>UnsupportedCallbackException</code>.
* Template method that handles {@code SignatureKeyCallback}s with {@code PublicKeyBasedPrivKeyCertRequest}s.
* Called from {@code handlePrivKeyCertRequest()}. Default implementation throws an
* {@code UnsupportedCallbackException}.
*/
protected void handlePublicKeyBasedPrivKeyCertRequest(SignatureKeyCallback callback,
SignatureKeyCallback.PublicKeyBasedPrivKeyCertRequest request)
@@ -412,7 +412,7 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
//
/**
* Method that handles <code>SignatureVerificationKeyCallback</code>s. Called from <code>handleInternal()</code>.
* Method that handles {@code SignatureVerificationKeyCallback}s. Called from {@code handleInternal()}.
* Default implementation delegates to specific handling methods.
*
* @see #handleX509CertificateRequest(com.sun.xml.wss.impl.callback.SignatureVerificationKeyCallback,
@@ -430,8 +430,8 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
}
/**
* Method that handles <code>SignatureVerificationKeyCallback</code>s with <code>X509CertificateRequest</code>s.
* Called from <code>handleSignatureVerificationKeyCallback()</code>. Default implementation delegates to specific
* Method that handles {@code SignatureVerificationKeyCallback}s with {@code X509CertificateRequest}s.
* Called from {@code handleSignatureVerificationKeyCallback()}. Default implementation delegates to specific
* handling methods.
*
* @see #handlePublicKeyBasedRequest(com.sun.xml.wss.impl.callback.SignatureVerificationKeyCallback,
@@ -461,9 +461,9 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
}
/**
* Template method that handles <code>SignatureKeyCallback</code>s with <code>PublicKeyBasedPrivKeyCertRequest</code>s.
* Called from <code>handlePrivKeyCertRequest()</code>. Default implementation throws an
* <code>UnsupportedCallbackException</code>.
* Template method that handles {@code SignatureKeyCallback}s with {@code PublicKeyBasedPrivKeyCertRequest}s.
* Called from {@code handlePrivKeyCertRequest()}. Default implementation throws an
* {@code UnsupportedCallbackException}.
*/
protected void handleX509SubjectKeyIdentifierBasedRequest(SignatureVerificationKeyCallback callback,
SignatureVerificationKeyCallback.X509SubjectKeyIdentifierBasedRequest request)
@@ -472,9 +472,9 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
}
/**
* Template method that handles <code>SignatureKeyCallback</code>s with <code>X509IssuerSerialBasedRequest</code>s.
* Called from <code>handlePrivKeyCertRequest()</code>. Default implementation throws an
* <code>UnsupportedCallbackException</code>.
* Template method that handles {@code SignatureKeyCallback}s with {@code X509IssuerSerialBasedRequest}s.
* Called from {@code handlePrivKeyCertRequest()}. Default implementation throws an
* {@code UnsupportedCallbackException}.
*/
protected void handleX509IssuerSerialBasedRequest(SignatureVerificationKeyCallback callback,
SignatureVerificationKeyCallback.X509IssuerSerialBasedRequest request)
@@ -483,9 +483,9 @@ public class CryptographyCallbackHandler extends AbstractCallbackHandler {
}
/**
* Template method that handles <code>SignatureKeyCallback</code>s with <code>PublicKeyBasedRequest</code>s. Called
* from <code>handlePrivKeyCertRequest()</code>. Default implementation throws an
* <code>UnsupportedCallbackException</code>.
* Template method that handles {@code SignatureKeyCallback}s with {@code PublicKeyBasedRequest}s. Called
* from {@code handlePrivKeyCertRequest()}. Default implementation throws an
* {@code UnsupportedCallbackException}.
*/
protected void handlePublicKeyBasedRequest(SignatureVerificationKeyCallback callback,
SignatureVerificationKeyCallback.PublicKeyBasedRequest request)

View File

@@ -25,7 +25,7 @@ import java.util.GregorianCalendar;
import com.sun.xml.wss.impl.callback.TimestampValidationCallback;
/**
* A default implementation of a <code>TimestampValidationCallback.TimestampValidator</code>. Based on a version found
* A default implementation of a {@code TimestampValidationCallback.TimestampValidator}. Based on a version found
* in the JWSDP samples.
*
* @author Arjen Poutsma

View File

@@ -46,31 +46,31 @@ import org.springframework.beans.factory.InitializingBean;
import org.springframework.ws.soap.security.support.KeyStoreUtils;
/**
* Callback handler that uses Java Security <code>KeyStore</code>s to handle cryptographic callbacks. Allows for
* Callback handler that uses Java Security {@code KeyStore}s to handle cryptographic callbacks. Allows for
* specific key stores to be set for various cryptographic operations.
* <p/>
* This handler requires one or more key stores to be set. You can configure them in your application context by using a
* <code>KeyStoreFactoryBean</code>. The exact stores to be set depends on the cryptographic operations that are to be
*
* <p>This handler requires one or more key stores to be set. You can configure them in your application context by using a
* {@code KeyStoreFactoryBean}. The exact stores to be set depends on the cryptographic operations that are to be
* performed by this handler. The table underneath show the key store to be used for each operation: <table border="1">
* <tr> <td><strong>Cryptographic operation</strong></td> <td><strong>Key store used</strong></td> </tr> <tr>
* <td>Certificate validation</td> <td>first <code>keyStore</code>, then <code>trustStore</code></td> </tr> <tr>
* <td>Decryption based on private key</td> <td><code>keyStore</code></td> </tr> <tr> <td>Decryption based on symmetric
* key</td> <td><code>symmetricStore</code></td> </tr> <tr> <td>Encryption based on certificate</td>
* <td><code>trustStore</code></td> </tr> <tr> <td>Encryption based on symmetric key</td>
* <td><code>symmetricStore</code></td> </tr> <tr> <td>Signing</td> <td><code>keyStore</code></td> </tr> <tr>
* <td>Signature verification</td> <td><code>trustStore</code></td> </tr> </table>
* <p/>
* <h3>Default key stores</h3> If the <code>symmetricStore</code> is not set, it will default to the
* <code>keyStore</code>. If the key or trust store is not set, this handler will use the standard Java mechanism to
* <td>Certificate validation</td> <td>first {@code keyStore}, then {@code trustStore}</td> </tr> <tr>
* <td>Decryption based on private key</td> <td>{@code keyStore}</td> </tr> <tr> <td>Decryption based on symmetric
* key</td> <td>{@code symmetricStore}</td> </tr> <tr> <td>Encryption based on certificate</td>
* <td>{@code trustStore}</td> </tr> <tr> <td>Encryption based on symmetric key</td>
* <td>{@code symmetricStore}</td> </tr> <tr> <td>Signing</td> <td>{@code keyStore}</td> </tr> <tr>
* <td>Signature verification</td> <td>{@code trustStore}</td> </tr> </table>
*
* <p><h3>Default key stores</h3> If the {@code symmetricStore} is not set, it will default to the
* {@code keyStore}. If the key or trust store is not set, this handler will use the standard Java mechanism to
* load or create it. See {@link #loadDefaultKeyStore()} and {@link #loadDefaultTrustStore()}.
* <p/>
* <h3>Examples</h3> For instance, if you want to use the <code>KeyStoreCallbackHandler</code> to validate incoming
*
* <p><h3>Examples</h3> For instance, if you want to use the {@code KeyStoreCallbackHandler} to validate incoming
* certificates or signatures, you would use a trust store, like so:
* <pre>
* &lt;bean id="keyStoreHandler" class="org.springframework.ws.soap.security.xwss.callback.KeyStoreCallbackHandler"&gt;
* &lt;property name="trustStore" ref="trustStore"/&gt;
* &lt;/bean&gt;
* <p/>
*
* &lt;bean id="trustStore" class="org.springframework.ws.soap.security.support.KeyStoreFactoryBean"&gt;
* &lt;property name="location" value="classpath:truststore.jks"/&gt;
* &lt;property name="password" value="changeit"/&gt;
@@ -83,16 +83,16 @@ import org.springframework.ws.soap.security.support.KeyStoreUtils;
* &lt;property name="keyStore" ref="keyStore"/&gt;
* &lt;property name="privateKeyPassword" value="changeit"/&gt;
* &lt;/bean&gt;
* <p/>
*
* &lt;bean id="keyStore" class="org.springframework.ws.soap.security.support.KeyStoreFactoryBean"&gt;
* &lt;property name="location" value="classpath:keystore.jks"/&gt;
* &lt;property name="password" value="changeit"/&gt;
* &lt;/bean&gt;
* </pre>
* <p/>
* <h3>Handled callbacks</h3> This class handles <code>CertificateValidationCallback</code>s,
* <code>DecryptionKeyCallback</code>s, <code>EncryptionKeyCallback</code>s, <code>SignatureKeyCallback</code>s, and
* <code>SignatureVerificationKeyCallback</code>s. It throws an <code>UnsupportedCallbackException</code> for others.
*
* <h3>Handled callbacks</h3> This class handles {@code CertificateValidationCallback}s,
* {@code DecryptionKeyCallback}s, {@code EncryptionKeyCallback}s, {@code SignatureKeyCallback}s, and
* {@code SignatureVerificationKeyCallback}s. It throws an {@code UnsupportedCallbackException} for others.
*
* @author Arjen Poutsma
* @see KeyStore
@@ -196,7 +196,7 @@ public class KeyStoreCallbackHandler extends CryptographyCallbackHandler impleme
/**
* Sets the key store used for encryption and decryption using symmetric keys. If this property is not set, it
* defaults to the <code>keyStore</code> property.
* defaults to the {@code keyStore} property.
*
* @see org.springframework.ws.soap.security.support.KeyStoreFactoryBean
* @see #setKeyStore(java.security.KeyStore)

View File

@@ -28,12 +28,12 @@ import org.springframework.ws.soap.security.callback.AbstractCallbackHandler;
/**
* Mock implementation of of callback handler that accepts all password and certificate validation callbacks.
* <p/>
* If the <code>valid</code> property is set to <code>true</code> (the default), this handler simply accepts and
*
* <p>If the {@code valid} property is set to {@code true} (the default), this handler simply accepts and
* validates every password or certificate validation callback that is passed to it.
* <p/>
* This class handles <code>CertificateValidationCallback</code>s and <code>PasswordValidationCallback</code>s, and
* throws an <code>UnsupportedCallbackException</code> for others
*
* <p>This class handles {@code CertificateValidationCallback}s and {@code PasswordValidationCallback}s, and
* throws an {@code UnsupportedCallbackException} for others
*
* @author Arjen Poutsma
* @since 1.0.0

View File

@@ -31,11 +31,11 @@ import org.springframework.util.Assert;
import org.springframework.ws.soap.security.callback.AbstractCallbackHandler;
/**
* Simple callback handler that validates passwords agains a in-memory <code>Properties</code> object. Password
* Simple callback handler that validates passwords agains a in-memory {@code Properties} object. Password
* validation is done on a case-sensitive basis.
* <p/>
* This class only handles <code>PasswordValidationCallback</code>s, and throws an
* <code>UnsupportedCallbackException</code> for others
*
* <p>This class only handles {@code PasswordValidationCallback}s, and throws an
* {@code UnsupportedCallbackException} for others
*
* @author Arjen Poutsma
* @see #setUsers(java.util.Properties)

View File

@@ -29,9 +29,9 @@ import org.springframework.ws.soap.security.callback.AbstractCallbackHandler;
/**
* Simple callback handler that supplies a username and password to a username token at runtime.
* <p/>
* This class handles <code>UsernameCallback</code>s and <code>PasswordCallback</code>s, and throws an
* <code>UnsupportedCallbackException</code> for others
*
* <p>This class handles {@code UsernameCallback}s and {@code PasswordCallback}s, and throws an
* {@code UnsupportedCallbackException} for others
*
* @author Arjen Poutsma
* @see #setUsername(String)

View File

@@ -34,14 +34,16 @@ import org.springframework.ws.soap.security.callback.CleanupCallback;
import org.springframework.ws.soap.security.x509.X509AuthenticationToken;
/**
* Callback handler that validates a certificate using an Spring Security <code>AuthenticationManager</code>. Logic
* based on Spring Security's <code>X509ProcessingFilter</code>. <p/> Spring Security
* <code>X509AuthenticationToken</code> is created with the certificate as the credentials. <p/> The configured
* authentication manager is expected to supply a provider which can handle this token (usually an instance of
* <code>X509AuthenticationProvider</code>).</p>
* <p/>
* This class only handles <code>CertificateValidationCallback</code>s, and throws an
* <code>UnsupportedCallbackException</code> for others.
* Callback handler that validates a certificate using an Spring Security {@code AuthenticationManager}. Logic
* based on Spring Security's {@code X509ProcessingFilter}.
*
* <p>Spring Security {@code X509AuthenticationToken} is created with the certificate as the credentials.
*
* <p>The configured authentication manager is expected to supply a provider which can handle this token (usually an instance of
* {@code X509AuthenticationProvider}).</p>
*
* <p>This class only handles {@code CertificateValidationCallback}s, and throws an
* {@code UnsupportedCallbackException} for others.
*
* @author Arjen Poutsma
* @see org.springframework.ws.soap.security.x509.X509AuthenticationToken
@@ -70,7 +72,7 @@ public class SpringCertificateValidationCallbackHandler extends AbstractCallback
}
/**
* Handles <code>CertificateValidationCallback</code>s, and throws an <code>UnsupportedCallbackException</code> for
* Handles {@code CertificateValidationCallback}s, and throws an {@code UnsupportedCallbackException} for
* others
*
* @throws javax.security.auth.callback.UnsupportedCallbackException

View File

@@ -38,14 +38,14 @@ import org.springframework.ws.soap.security.callback.CleanupCallback;
import org.springframework.ws.soap.security.support.SpringSecurityUtils;
/**
* Callback handler that validates a password digest using an Spring Security <code>UserDetailsService</code>. Logic
* based on Spring Security's <code>DigestProcessingFilter</code>.
* <p/>
* An Spring Security <code>UserDetailService</code> is used to load <code>UserDetails</code> from. The digest of the
* Callback handler that validates a password digest using an Spring Security {@code UserDetailsService}. Logic
* based on Spring Security's {@code DigestProcessingFilter}.
*
* <p>An Spring Security {@code UserDetailService} is used to load {@code UserDetails} from. The digest of the
* password contained in this details object is then compared with the digest in the message.
* <p/>
* This class only handles <code>PasswordValidationCallback</code>s that contain a <code>DigestPasswordRequest</code>,
* and throws an <code>UnsupportedCallbackException</code> for others.
*
* <p>This class only handles {@code PasswordValidationCallback}s that contain a {@code DigestPasswordRequest},
* and throws an {@code UnsupportedCallbackException} for others.
*
* @author Arjen Poutsma
* @see org.springframework.security.core.userdetails.UserDetailsService
@@ -75,8 +75,8 @@ public class SpringDigestPasswordValidationCallbackHandler extends AbstractCallb
}
/**
* Handles <code>PasswordValidationCallback</code>s that contain a <code>DigestPasswordRequest</code>, and throws an
* <code>UnsupportedCallbackException</code> for others
* Handles {@code PasswordValidationCallback}s that contain a {@code DigestPasswordRequest}, and throws an
* {@code UnsupportedCallbackException} for others
*
* @throws javax.security.auth.callback.UnsupportedCallbackException
* when the callback is not supported

View File

@@ -33,15 +33,15 @@ import org.springframework.ws.soap.security.callback.AbstractCallbackHandler;
import org.springframework.ws.soap.security.callback.CleanupCallback;
/**
* Callback handler that validates a certificate uses an Spring Security <code>AuthenticationManager</code>. Logic based
* on Spring Security's <code>BasicProcessingFilter</code>.
* <p/>
* This handler requires an Spring Security <code>AuthenticationManager</code> to operate. It can be set using the
* <code>authenticationManager</code> property. An Spring Security <code>UsernamePasswordAuthenticationToken</code> is
* Callback handler that validates a certificate uses an Spring Security {@code AuthenticationManager}. Logic based
* on Spring Security's {@code BasicProcessingFilter}.
*
* <p>This handler requires an Spring Security {@code AuthenticationManager} to operate. It can be set using the
* {@code authenticationManager} property. An Spring Security {@code UsernamePasswordAuthenticationToken} is
* created with the username as principal and password as credentials.
* <p/>
* This class only handles <code>PasswordValidationCallback</code>s that contain a
* <code>PlainTextPasswordRequest</code>, and throws an <code>UnsupportedCallbackException</code> for others.
*
* <p>This class only handles {@code PasswordValidationCallback}s that contain a
* {@code PlainTextPasswordRequest}, and throws an {@code UnsupportedCallbackException} for others.
*
* @author Arjen Poutsma
* @see org.springframework.security.authentication.UsernamePasswordAuthenticationToken
@@ -71,8 +71,8 @@ public class SpringPlainTextPasswordValidationCallbackHandler extends AbstractCa
}
/**
* Handles <code>PasswordValidationCallback</code>s that contain a <code>PlainTextPasswordRequest</code>, and throws
* an <code>UnsupportedCallbackException</code> for others.
* Handles {@code PasswordValidationCallback}s that contain a {@code PlainTextPasswordRequest}, and throws
* an {@code UnsupportedCallbackException} for others.
*
* @throws javax.security.auth.callback.UnsupportedCallbackException
* when the callback is not supported

View File

@@ -30,9 +30,9 @@ import org.springframework.ws.soap.security.callback.AbstractCallbackHandler;
/**
* Callback handler that adds username/password information to a mesage using an Spring Security {@link
* org.springframework.security.core.context.SecurityContext}.
* <p/>
* This class handles <code>UsernameCallback</code>s and <code>PasswordCallback</code>s, and throws an
* <code>UnsupportedCallbackException</code> for others
*
* <p>This class handles {@code UsernameCallback}s and {@code PasswordCallback}s, and throws an
* {@code UnsupportedCallbackException} for others
*
* @author Arjen Poutsma
* @since 1.5.0

View File

@@ -29,8 +29,8 @@ import com.sun.xml.wss.impl.callback.TimestampValidationCallback;
import org.springframework.ws.soap.security.callback.CallbackHandlerChain;
/**
* Represents a chain of <code>CallbackHandler</code>s. For each callback, each of the handlers is called in term. If a
* handler throws a <code>UnsupportedCallbackException</code>, the next handler is tried.
* Represents a chain of {@code CallbackHandler}s. For each callback, each of the handlers is called in term. If a
* handler throws a {@code UnsupportedCallbackException}, the next handler is tried.
*
* @author Arjen Poutsma
* @since 1.0.0

View File

@@ -26,11 +26,11 @@ import javax.security.auth.login.LoginException;
import com.sun.xml.wss.impl.callback.CertificateValidationCallback;
/**
* Provides basic support for integrating with JAAS and certificates. Requires the <code>loginContextName</code> to be
* set.Requires a <code>LoginContext</code> which handles <code>X500Principal</code>s.
* <p/>
* This class only handles <code>CertificateValidationCallback</code>s, and throws an
* <code>UnsupportedCallbackException</code> for others.
* Provides basic support for integrating with JAAS and certificates. Requires the {@code loginContextName} to be
* set.Requires a {@code LoginContext} which handles {@code X500Principal}s.
*
* <p>This class only handles {@code CertificateValidationCallback}s, and throws an
* {@code UnsupportedCallbackException} for others.
*
* @author Arjen Poutsma
* @see javax.security.auth.x500.X500Principal
@@ -40,7 +40,7 @@ import com.sun.xml.wss.impl.callback.CertificateValidationCallback;
public class JaasCertificateValidationCallbackHandler extends AbstractJaasValidationCallbackHandler {
/**
* Handles <code>CertificateValidationCallback</code>s, and throws an <code>UnsupportedCallbackException</code> for
* Handles {@code CertificateValidationCallback}s, and throws an {@code UnsupportedCallbackException} for
* others
*
* @throws UnsupportedCallbackException when the callback is not supported

View File

@@ -30,9 +30,9 @@ import org.springframework.ws.soap.security.callback.AbstractCallbackHandler;
/**
* Provides basic support for integrating with JAAS and plain text passwords.
* <p/>
* This class only handles <code>PasswordValidationCallback</code>s that contain a
* <code>PlainTextPasswordRequest</code>, and throws an <code>UnsupportedCallbackException</code> for others.
*
* <p>This class only handles {@code PasswordValidationCallback}s that contain a
* {@code PlainTextPasswordRequest}, and throws an {@code UnsupportedCallbackException} for others.
*
* @author Arjen Poutsma
* @see #getLoginContextName()
@@ -41,8 +41,8 @@ import org.springframework.ws.soap.security.callback.AbstractCallbackHandler;
public class JaasPlainTextPasswordValidationCallbackHandler extends AbstractJaasValidationCallbackHandler {
/**
* Handles <code>PasswordValidationCallback</code>s that contain a <code>PlainTextPasswordRequest</code>, and throws
* an <code>UnsupportedCallbackException</code> for others.
* Handles {@code PasswordValidationCallback}s that contain a {@code PlainTextPasswordRequest}, and throws
* an {@code UnsupportedCallbackException} for others.
*
* @throws UnsupportedCallbackException when the callback is not supported
*/