Interface SignMessage
- 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.
<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 Summary
Modifier and TypeFieldDescriptionstatic final String
Name of the element.static final QName
Default element name.static final String
Attribute label for the DisplayEntity attribute.static final String
Attribute label for the MimeType attribute.static final String
Attribute label for the MustShow attribute.static final String
Local name of the typestatic final QName
QName of the XSI type. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theDisplayEntity
attribute.Returns theEncryptedMessage
element.Returns theMessage
element.Returns the value of theMimeType
attribute.Returns the value of theMimeType
attribute as an enum.Returns the value of theMustShow
attribute.org.opensaml.core.xml.schema.XSBooleanValue
Returns theMustShow
attribute as aXSBooleanValue
.void
setDisplayEntity
(String displayEntity) Assigns the value for theDisplayEntity
attribute.void
setEncryptedMessage
(EncryptedMessage encryptedMessage) Assigns theEncryptedMessage
element.void
setMessage
(Message message) Assigns theMessage
element.void
setMimeType
(String mimeType) Assigns theMimeType
attribute.void
setMimeType
(SignMessageMimeTypeEnum mimeType) Assigns theMimeType
attribute.void
setMustShow
(Boolean mustShow) Assigns the value of theMustShow
attribute.void
setMustShow
(org.opensaml.core.xml.schema.XSBooleanValue mustShow) Assigns the value of theMustShow
attribute.Methods inherited from interface org.opensaml.core.xml.AttributeExtensibleXMLObject
getUnknownAttributes
Methods inherited from interface org.opensaml.core.xml.XMLObject
detach, ensureDOM, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getObjectMetadata, getOrderedChildren, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, releaseChildrenDOM, releaseDOM, releaseParentDOM, resolveID, resolveIDFromRoot, setDOM, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation
-
Field Details
-
DEFAULT_ELEMENT_LOCAL_NAME
Name of the element.- See Also:
-
DEFAULT_ELEMENT_NAME
Default element name. -
TYPE_LOCAL_NAME
Local name of the type- See Also:
-
TYPE_NAME
QName of the XSI type. -
MUST_SHOW_ATTR_NAME
Attribute label for the MustShow attribute.- See Also:
-
DISPLAY_ENTITY_ATTR_NAME
Attribute label for the DisplayEntity attribute.- See Also:
-
MIME_TYPE_ATTR_NAME
Attribute label for the MimeType attribute.- See Also:
-
-
Method Details
-
isMustShow
Boolean isMustShow()Returns the value of theMustShow
attribute.- Returns:
- the
MustShow
attribute
-
isMustShowXSBoolean
org.opensaml.core.xml.schema.XSBooleanValue isMustShowXSBoolean()Returns theMustShow
attribute as aXSBooleanValue
.- Returns:
- the
MustShow
attribute - See Also:
-
setMustShow
Assigns the value of theMustShow
attribute.- Parameters:
mustShow
- the value to assign
-
setMustShow
void setMustShow(org.opensaml.core.xml.schema.XSBooleanValue mustShow) Assigns the value of theMustShow
attribute.- Parameters:
mustShow
- the value to assign- See Also:
-
getDisplayEntity
String getDisplayEntity()Returns the value of theDisplayEntity
attribute.- Returns:
- the DisplayEntity attribute
-
setDisplayEntity
Assigns the value for theDisplayEntity
attribute.- Parameters:
displayEntity
- the entityID to assign
-
getMimeType
String getMimeType()Returns the value of theMimeType
attribute.- Returns:
- the MimeType attribute
-
getMimeTypeEnum
SignMessageMimeTypeEnum getMimeTypeEnum()Returns the value of theMimeType
attribute as an enum.- Returns:
- the MimeType attribute
-
setMimeType
Assigns theMimeType
attribute.- Parameters:
mimeType
- the mime type to assign
-
setMimeType
Assigns theMimeType
attribute.- Parameters:
mimeType
- the mime type as an enum to assign
-
getMessage
Message getMessage()Returns theMessage
element.- Returns:
- the Message element
-
setMessage
Assigns theMessage
element.- Parameters:
message
- the message to assign
-
getEncryptedMessage
EncryptedMessage getEncryptedMessage()Returns theEncryptedMessage
element.- Returns:
- the EncryptedMessage element
-
setEncryptedMessage
Assigns theEncryptedMessage
element.- Parameters:
encryptedMessage
- the EncryptedMessage element to assign
-