- 10 Oct 2024
- 4 Minutes to read
- Print
- DarkLight
- PDF
Storing Signing Session Data
- Updated on 10 Oct 2024
- 4 Minutes to read
- Print
- DarkLight
- PDF
Java SDK .NET SDK REST API APEX SDK
Java SDK
To download the full code sample see our Code Share site.
When creating a signing session, extra data can be stored as part of the evidence summary. This is done by passing additional session fields per signer when creating the signing session. These fields are saved in the evidence summary, and are stored in the signature details of your signed documents.
To create session data
If you need a comparison to the basic object creation procedure, or if this is the first time creating a transaction, see Creating and Sending a Transaction.
After you have created your package, you must create a new Map object with your key/value pairs. The following code will do this:
Map<String, String> signerSessionFields = new LinkedHashMap<String, String>();
signerSessionFields.put("Transaction ID", "1234567890");
signerSessionFields.put("Login Token", "8888888888888");
Next, use AuthenticationTokensService to create a signer authentication token using the packageid, signer id, and the session fields. The following code will do this:
final String signerAuthenticationToken = eslClient.getAuthenticationTokensService()
.createSignerAuthenticationToken(packageId.getId(), "signer1", signerSessionFields);
Finally, build the signing session URL using the signer authentication token. The following code will do this:
System.out.println("https://sandbox.esignlive.com/access?sessionToken=" + signerAuthenticationToken);
Results
Once you’ve opened a session for your signer and the package has been completed, you can download the evidence summary to view your session fields.
.NET SDK
To download the full code sample see our Code Share site.
When creating a signing session, extra data can be stored as part of the evidence summary. This is done by passing additional session fields per signer when creating the signing session. These fields are saved in the evidence summary, and are stored in the signature details of your signed documents.
The Code
If you need a comparison to the basic object creation procedure, or if this is the first time creating a transaction, see Creating and Sending a Transaction.
After you have created your package, you must createe a new IDictionary object with your key/value pairs. The following code will do this:
IDictionary<string, string> signerSessionFields = new Dictionary<string, string>();
signerSessionFields.Add("Transaction ID", "1234567890");
signerSessionFields.Add("Login Token", "8888888888888");
Next, use AuthenticationTokensService to create a signer authentication token using the packageid, signer id, and the session fields. The following code will do this:
var signerAuthenticationToken = eslClient.AuthenticationTokenService
.CreateSignerAuthenticationToken(packageId, "signer1", signerSessionFields);
Finally, build the signing session URL using the signer authentication token. The following code will do this:
Debug.WriteLine("https://sandbox.esignlive.com/access?sessionToken=" + signerAuthenticationToken);
Results
Once you’ve opened a session for your signer and the package has been completed, you can download the evidence summary to view your session fields.
REST API
To download the full code sample see our Code Share site.
When creating a signing session, extra data can be stored as part of the evidence summary. This is done by passing additional session fields per signer when creating the signing session. These fields are saved in the evidence summary, and are stored in the signature details of your signed documents.
If you need a comparison to the basic object creation procedure, or if this is the first time creating a transaction, see Creating and Sending a Transaction.
After you have created your package, create a signer authentication token with the key/value pair session fields:
HTTP Request
POST /api/authenticationTokens/signer/singleUse
HTTP Headers
Accept: application/json
Content-Type: application/json
Authorization: Basic api_key
Request Payload
{
"packageId": "x31anVFrwliCsGQXLJoqv0GRZ1w=","sessionFields": {
"Transaction ID": "1234567890",
"Login Token": "8888888888888"
},
"signerId": "signer1"
}
For a complete description of each field, see the Request Payload table below.
Response Payload
{
"packageId": "x31anVFrwliCsGQXLJoqv0GRZ1w=","signerId": "signer1",
"value": "ZDNmMDNiNGUtNGYxOC00YWZiLTkwMmUtNWE5YmIwZTRjZDg1",
"sessionFields": {
"Transaction ID": "1234567890",
"Login Token": "8888888888888"
}
}
In addition the API call from above, a sessionFields node can be added to all other Authentication Token creation APIs. For more information, see Authentication Tokens.
Finally, build the signing session URL using the signer authentication token. The following code will do this:
https://sandbox.esignlive.com/access?sessionToken={signerAuthToken}
Results
Once you’ve opened a session for your signer and the package has been completed, you can download the evidence summary to view your session fields.
Request Payload Table
Property | Type | Editable | Required | Default | Sample Values |
---|---|---|---|---|---|
packageId | string | Yes | No | n/a | x31anVFrwliCsGQXLJoqv0GRZ1w= |
signerId | string | Yes | No | n/a | signer1 |
sessionFields | string | Yes | No | n/a | Transaction ID / 1234567890 |
APEX SDK
To download the full code sample see our Code Share site.
When creating a signing session, extra data can be stored as part of the evidence summary. This is done by passing additional session fields per signer when creating the signing session. These fields are saved in the evidence summary, and are stored in the signature details of your signed documents.
If you need a comparison to the basic object creation procedure, or if this is the first time creating a transaction, see Creating and Sending a Transaction.
After you have created your package, you must create a new Map object with your key/value pairs. The following code will do this:
//prepare for session fields Map<String,String> sessionFields = new Map<String,String>(); sessionFields.put('username','123'); sessionFields.put('password','456');
Next, use the following encapsulated function to create a signer authentication token using the packageid, signer id, and the session fields.
public String createSignerAuthenticationToken(String packageId, String signerId, Map<String,String> sessionFields)
Finally, build the signing session URL using the signer authentication token. The following code will do this:
public String buildRedirectToSigningForSigner(String authenticationToken)
Results
Once you’ve opened a session for your signer and the package has been completed, you can download the evidence summary to view your session fields.