All Superinterfaces:
org.opensaml.core.xml.AttributeExtensibleXMLObject, org.opensaml.saml.common.SAMLObject, org.opensaml.core.xml.XMLObject
All Known Implementing Classes:
SignMessageImpl

public interface SignMessage extends org.opensaml.saml.common.SAMLObject, org.opensaml.core.xml.AttributeExtensibleXMLObject
Definition of the SignMessage type.

The <SignMessage> element holds a message to the signer with information about what is being signed. The sign message is provided either in plain text using the <Message> child element or as an encrypted message using the <EncryptedMessage> child element. This element's SignMessageType complex type includes the following attributes and elements:

MustShow [Optional] (Default "false")
When this attribute is set to true then the requested signature MUST NOT be created unless this message has been displayed and accepted by the signer. The default is false.
DisplayEntity [Optional]
The EntityID of the entity responsible for displaying the sign message to the signer. When the sign message is encrypted, then this entity is also the holder of the private decryption key necessary to decrypt the sign message.
MimeType [Optional] (Default "text")
The mime type defining the message format. This is an enumeration of the valid attribute values text (plain text), text/html (html) or text/markdown (markdown). This specification does not specify any particular restrictions on the provided message but it is RECOMMENDED that sign message content is restricted to a limited set of valid tags and attributes, and that the display entity performs filtering to enforce these restrictions before displaying the message. The means through which parties agree on such restrictions are outside the scope of this specification, but one valid option to communicate such restrictions could be through federation metadata.
<Message> [Choice]
The base64 encoded sign message in unencrypted form. The message MUST be encoded using UTF-8.
<EncryptedMessage> [Choice]
An encrypted <Message> element. Either a <Message> or an <EncryptedMessage> element MUST be present.
The following schema fragment defines the <SignMessage> element and the SignMessageType complex type:

 <xs:complexType name="SignMessageType">
   <xs:choice>
     <xs:element ref="csig:Message"/>
     <xs:element ref="csig:EncryptedMessage"/>
   </xs:choice>
   <xs:attribute name="MustShow" type="xs:boolean" default="false"/>
   <xs:attribute name="DisplayEntity" type="xs:anyURI"/>
   <xs:attribute name="MimeType" default="text">
     <xs:simpleType>
       <xs:restriction base="xs:string">
         <xs:enumeration value="text/html"/>
         <xs:enumeration value="text"/>
         <xs:enumeration value="text/markdown"/>
       </xs:restriction>
     </xs:simpleType>
   </xs:attribute>
   <xs:anyAttribute namespace="##other" processContents="lax"/>
 </xs:complexType>

 <xs:element name="Message" type="xs:base64Binary"/>
 <xs:element name="EncryptedMessage" type="saml:EncryptedElementType"/>
 

See "DSS Extension for Federated Central Signing Services".

Author:
Martin Lindström (martin@idsec.se)
  • Field Details

    • DEFAULT_ELEMENT_LOCAL_NAME

      static final String DEFAULT_ELEMENT_LOCAL_NAME
      Name of the element.
      See Also:
    • DEFAULT_ELEMENT_NAME

      static final QName DEFAULT_ELEMENT_NAME
      Default element name.
    • TYPE_LOCAL_NAME

      static final String TYPE_LOCAL_NAME
      Local name of the type
      See Also:
    • TYPE_NAME

      static final QName TYPE_NAME
      QName of the XSI type.
    • MUST_SHOW_ATTR_NAME

      static final String MUST_SHOW_ATTR_NAME
      Attribute label for the MustShow attribute.
      See Also:
    • DISPLAY_ENTITY_ATTR_NAME

      static final String DISPLAY_ENTITY_ATTR_NAME
      Attribute label for the DisplayEntity attribute.
      See Also:
    • MIME_TYPE_ATTR_NAME

      static final String MIME_TYPE_ATTR_NAME
      Attribute label for the MimeType attribute.
      See Also:
  • Method Details

    • isMustShow

      Boolean isMustShow()
      Returns the value of the MustShow attribute.
      Returns:
      the MustShow attribute
    • isMustShowXSBoolean

      org.opensaml.core.xml.schema.XSBooleanValue isMustShowXSBoolean()
      Returns the MustShow attribute as a XSBooleanValue.
      Returns:
      the MustShow attribute
      See Also:
    • setMustShow

      void setMustShow(Boolean mustShow)
      Assigns the value of the MustShow attribute.
      Parameters:
      mustShow - the value to assign
    • setMustShow

      void setMustShow(org.opensaml.core.xml.schema.XSBooleanValue mustShow)
      Assigns the value of the MustShow attribute.
      Parameters:
      mustShow - the value to assign
      See Also:
    • getDisplayEntity

      String getDisplayEntity()
      Returns the value of the DisplayEntity attribute.
      Returns:
      the DisplayEntity attribute
    • setDisplayEntity

      void setDisplayEntity(String displayEntity)
      Assigns the value for the DisplayEntity attribute.
      Parameters:
      displayEntity - the entityID to assign
    • getMimeType

      String getMimeType()
      Returns the value of the MimeType attribute.
      Returns:
      the MimeType attribute
    • getMimeTypeEnum

      SignMessageMimeTypeEnum getMimeTypeEnum()
      Returns the value of the MimeType attribute as an enum.
      Returns:
      the MimeType attribute
    • setMimeType

      void setMimeType(String mimeType)
      Assigns the MimeType attribute.
      Parameters:
      mimeType - the mime type to assign
    • setMimeType

      void setMimeType(SignMessageMimeTypeEnum mimeType)
      Assigns the MimeType attribute.
      Parameters:
      mimeType - the mime type as an enum to assign
    • getMessage

      Message getMessage()
      Returns the Message element.
      Returns:
      the Message element
    • setMessage

      void setMessage(Message message)
      Assigns the Message element.
      Parameters:
      message - the message to assign
    • getEncryptedMessage

      EncryptedMessage getEncryptedMessage()
      Returns the EncryptedMessage element.
      Returns:
      the EncryptedMessage element
    • setEncryptedMessage

      void setEncryptedMessage(EncryptedMessage encryptedMessage)
      Assigns the EncryptedMessage element.
      Parameters:
      encryptedMessage - the EncryptedMessage element to assign