Class SignRequestData
- All Implemented Interfaces:
Serializable
,Extensible
SignServiceIntegrationService.createSignRequest(SignRequestInput)
call. This class holds the information needed to send a dss:SignRequest
to a signature service.
Chapter 3 of Implementation Profile for using OASIS DSS in Central Signing Services describes how a sign request is transfered to the signature service. Below is an example of an XHTML form:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>
<body onload='document.forms[0].submit()'>
<noscript>
<p><strong>Note:</strong> Since your browser does not support JavaScript,
you must press the Continue button once to proceed.</p>
</noscript>
<form action='https://sig.example.com/signrequest' method='post'>
<input type='hidden' name='Binding' value='POST/XML/1.0'/>
<input type='hidden' name='RelayState' value='56345145a482995d'/>
<input type='hidden' name='EidSignRequest' value='PD94bWC...WVzdD4='/>
<noscript>
<input type='submit' value='Continue'/>
</noscript>
</form>
</body>
- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder forSignRequestData
objects. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.SignRequestData
(SignatureState state, String signRequest, String relayState, String binding, String destinationUrl, Extension extension) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGets the identifier for the binding of the message that is to be sent.Gets the signature service URL to which the SignRequest should be posted.Returns the extension parameters for the instance.Gets the relay state.Gets the Base64-encoded SignRequest message that is to be posted to the signature service.getState()
Gets the state for a signature operation.void
setBinding
(String binding) Assigns the identifier for the binding of the message that is to be sent.void
setDestinationUrl
(String destinationUrl) Assigns the signature service URL to which the SignRequest should be posted.void
setExtension
(Extension extension) Assigns the extension parameters for the instance.void
setRelayState
(String relayState) Assigns the relay state.void
setSignRequest
(String signRequest) Assigns the Base64-encoded SignRequest message that is to be posted to the signature service.void
setState
(SignatureState state) Assigns the state for a signature operation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface se.idsec.signservice.integration.core.Extensible
addExtensionValue, getExtensionValue
-
Field Details
-
DEFAULT_BINDING
The default binding.- See Also:
-
-
Constructor Details
-
SignRequestData
public SignRequestData()Default constructor. -
SignRequestData
public SignRequestData(SignatureState state, String signRequest, String relayState, String binding, String destinationUrl, Extension extension) Constructor.- Parameters:
state
- state for a signature operationsignRequest
- the Base64-encoded SignRequest message that is to be posted to the signature servicerelayState
- the relay statebinding
- the identifier for the binding of the message that is to be sentdestinationUrl
- the signature service URL to which the SignRequest should be postedextension
- extensions for the object
-
-
Method Details
-
getState
Gets the state for a signature operation.This state must be maintained by the signature requester and when a sign response has been received from the signature service be supplied in the
SignServiceIntegrationService.processSignResponse(String, String, SignatureState, SignResponseProcessingParameters)
call.- Returns:
- the signature state for this operation
-
setState
Assigns the state for a signature operation.This state must be maintained by the signature requester and when a sign response has been received from the signature service be supplied in the
SignServiceIntegrationService.processSignResponse(String, String, SignatureState, SignResponseProcessingParameters)
call.- Parameters:
state
- the signature state
-
getSignRequest
Gets the Base64-encoded SignRequest message that is to be posted to the signature service.This value should be posted to the signature service in a form where the parameter has the name
EidSignRequest
. See example above.- Returns:
- the encoded SignRequest message
-
setSignRequest
Assigns the Base64-encoded SignRequest message that is to be posted to the signature service.This value should be posted to the signature service in a form where the parameter has the name
EidSignRequest
. See example above.- Parameters:
signRequest
- the sign request (in Base64-encoding)
-
getRelayState
Gets the relay state. This is the same value as theRequestID
attribute of the SignRequest andSignatureState.getId()
.This value should be posted to the signature service in a form where the parameter has the name
RelayState
. See example above.Note: The RelayState used in communication with the signature service has the same name as the parameter used in SAML authentication requests, but in SAML the value is opaque and does not bind to any value in the request as is the case for signature service communication. An unlucky re-use of the term RelayState.
- Returns:
- the relay state value
-
setRelayState
Assigns the relay state.See
getRelayState()
for clarifications about the relay state.- Parameters:
relayState
- the relay state variable
-
getBinding
Gets the identifier for the binding of the message that is to be sent.This value should be posted to the signature service in a form where the parameter has the name
Binding
. See example above.Currently, the only supported value is "POST/XML/1.0".
- Returns:
- the binding identifier
-
setBinding
Assigns the identifier for the binding of the message that is to be sent.The default value is "POST/XML/1.0".
- Parameters:
binding
- the binding identifier
-
getDestinationUrl
Gets the signature service URL to which the SignRequest should be posted.- Returns:
- signature service destination URL
-
setDestinationUrl
Assigns the signature service URL to which the SignRequest should be posted.- Parameters:
destinationUrl
- the signature service URL to which the SignRequest should be posted
-
getExtension
Returns the extension parameters for the instance.- Specified by:
getExtension
in interfaceExtensible
- Returns:
- the extension, or
null
if no extensions are set
-
setExtension
Assigns the extension parameters for the instance.- Specified by:
setExtension
in interfaceExtensible
- Parameters:
extension
- the extension
-