Interface SecureFormSigner


  • public interface SecureFormSigner
    • Method Detail

      • getSignatureParameterName

        String getSignatureParameterName()
        Gets the name of the signature parameter. This is the name of the signature parameter which is placed in HTML forms.
        Returns:
        Signature parameter name.
      • getSignatureForFragment

        String getSignatureForFragment​(String htmlCode,
                                       javax.servlet.http.HttpSession session)
                                throws SignException
        Creates a signature for the input names in an html fragment.
        Parameters:
        htmlCode - The html fragment.
        session - HttpSession, may be null.
        Returns:
        The signature for the set of inputs.
        Throws:
        SignException - If the signature could not be created.
      • getSignature

        String getSignature​(Set<String> names,
                            javax.servlet.http.HttpSession session)
                     throws SignException
        Creates a signature for a set of input names.
        Parameters:
        names - The set of allowed inputs for which the signature should be created.
        session - HttpSession, may be null.
        Returns:
        The signature for the set of inputs.
        Throws:
        SignException - If the signature could not be created.
      • addSignature

        String addSignature​(String originalForm,
                            javax.servlet.http.HttpSession session)
                     throws SignException
        Adds the signature to a form.
        Parameters:
        originalForm - The form that should be signed.
        Returns:
        The original form to which the signature has been added in a hidden field.
        Throws:
        SignException - If the form could not be signed.