Interface SignMessage
-
- All Superinterfaces:
AttributeExtensibleXMLObject,SAMLObject,XMLObject
- All Known Implementing Classes:
SignMessageImpl
public interface SignMessage extends SAMLObject, 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.lindstrom@litsec.se)
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_ELEMENT_LOCAL_NAMEName of the element.static QNameDEFAULT_ELEMENT_NAMEDefault element name.static StringDISPLAY_ENTITY_ATTR_NAMEAttribute label for the DisplayEntity attribute.static StringMIME_TYPE_ATTR_NAMEAttribute label for the MimeType attribute.static StringMUST_SHOW_ATTR_NAMEAttribute label for the MustShow attribute.static StringTYPE_LOCAL_NAMELocal name of the typestatic QNameTYPE_NAMEQName of the XSI type.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetDisplayEntity()Returns the value of theDisplayEntityattribute.EncryptedMessagegetEncryptedMessage()Returns theEncryptedMessageelement.MessagegetMessage()Returns theMessageelement.StringgetMimeType()Returns the value of theMimeTypeattribute.SignMessageMimeTypeEnumgetMimeTypeEnum()Returns the value of theMimeTypeattribute as an enum.BooleanisMustShow()Returns the value of theMustShowattribute.XSBooleanValueisMustShowXSBoolean()Returns theMustShowattribute as aXSBooleanValue.voidsetDisplayEntity(String displayEntity)Assigns the value for theDisplayEntityattribute.voidsetEncryptedMessage(EncryptedMessage encryptedMessage)Assigns theEncryptedMessageelement.voidsetMessage(Message message)Assigns theMessageelement.voidsetMimeType(String mimeType)Assigns theMimeTypeattribute.voidsetMimeType(SignMessageMimeTypeEnum mimeType)Assigns theMimeTypeattribute.voidsetMustShow(Boolean mustShow)Assigns the value of theMustShowattribute.voidsetMustShow(XSBooleanValue mustShow)Assigns the value of theMustShowattribute.-
Methods inherited from interface org.opensaml.core.xml.AttributeExtensibleXMLObject
getUnknownAttributes
-
Methods inherited from interface org.opensaml.core.xml.XMLObject
detach, 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 Detail
-
DEFAULT_ELEMENT_LOCAL_NAME
static final String DEFAULT_ELEMENT_LOCAL_NAME
Name of the element.- See Also:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
DISPLAY_ENTITY_ATTR_NAME
static final String DISPLAY_ENTITY_ATTR_NAME
Attribute label for the DisplayEntity attribute.- See Also:
- Constant Field Values
-
MIME_TYPE_ATTR_NAME
static final String MIME_TYPE_ATTR_NAME
Attribute label for the MimeType attribute.- See Also:
- Constant Field Values
-
-
Method Detail
-
isMustShow
Boolean isMustShow()
Returns the value of theMustShowattribute.- Returns:
- the
MustShowattribute
-
isMustShowXSBoolean
XSBooleanValue isMustShowXSBoolean()
Returns theMustShowattribute as aXSBooleanValue.- Returns:
- the
MustShowattribute - See Also:
isMustShow()
-
setMustShow
void setMustShow(Boolean mustShow)
Assigns the value of theMustShowattribute.- Parameters:
mustShow- the value to assign
-
setMustShow
void setMustShow(XSBooleanValue mustShow)
Assigns the value of theMustShowattribute.- Parameters:
mustShow- the value to assign- See Also:
setMustShow(Boolean)
-
getDisplayEntity
String getDisplayEntity()
Returns the value of theDisplayEntityattribute.- Returns:
- the
DisplayEntityattribute
-
setDisplayEntity
void setDisplayEntity(String displayEntity)
Assigns the value for theDisplayEntityattribute.- Parameters:
displayEntity- the entityID to assign
-
getMimeType
String getMimeType()
Returns the value of theMimeTypeattribute.- Returns:
- the
MimeTypeattribute
-
getMimeTypeEnum
SignMessageMimeTypeEnum getMimeTypeEnum()
Returns the value of theMimeTypeattribute as an enum.- Returns:
- the
MimeTypeattribute
-
setMimeType
void setMimeType(String mimeType)
Assigns theMimeTypeattribute.- Parameters:
mimeType- the mime type to assign
-
setMimeType
void setMimeType(SignMessageMimeTypeEnum mimeType)
Assigns theMimeTypeattribute.- Parameters:
mimeType- the mime type as an enum to assign
-
getMessage
Message getMessage()
Returns theMessageelement.- Returns:
- the
Messageelement
-
setMessage
void setMessage(Message message)
Assigns theMessageelement.- Parameters:
message- the message to assign
-
getEncryptedMessage
EncryptedMessage getEncryptedMessage()
Returns theEncryptedMessageelement.- Returns:
- the
EncryptedMessageelement
-
setEncryptedMessage
void setEncryptedMessage(EncryptedMessage encryptedMessage)
Assigns theEncryptedMessageelement.- Parameters:
encryptedMessage- theEncryptedMessageelement to assign
-
-