-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PB-1004. Support for authenticate signing
- Loading branch information
john
committed
Apr 25, 2017
1 parent
0fb2ec5
commit 4c9a29f
Showing
10 changed files
with
202 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
sdk/src/main/java/com/silanis/esl/sdk/examples/AuthenticatedSigningExample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.silanis.esl.sdk.examples; | ||
|
||
import com.silanis.esl.sdk.DocumentPackage; | ||
import com.silanis.esl.sdk.DocumentType; | ||
|
||
import static com.silanis.esl.sdk.builder.DocumentBuilder.newDocumentWithName; | ||
import static com.silanis.esl.sdk.builder.PackageBuilder.newPackageNamed; | ||
import static com.silanis.esl.sdk.builder.SignatureBuilder.signatureFor; | ||
import static com.silanis.esl.sdk.builder.SignerBuilder.newSignerWithEmail; | ||
|
||
/** | ||
* Created by schoi on 19/04/17. | ||
*/ | ||
public class AuthenticatedSigningExample extends SDKSample { | ||
|
||
public DocumentPackage sentPackage; | ||
|
||
public static void main( String... args ) { | ||
new AuthenticatedSigningExample().run(); | ||
} | ||
|
||
public void execute() { | ||
DocumentPackage superDuperPackage = newPackageNamed(getPackageName()) | ||
.describedAs("This is a package created using the eSignLive SDK") | ||
.withSigner(newSignerWithEmail(email1) | ||
.withFirstName("John1") | ||
.withLastName("Smith1") | ||
.withCertificateSigning() | ||
.withExternalSigning()) | ||
.withDocument(newDocumentWithName("First Document") | ||
.fromStream(documentInputStream1, DocumentType.PDF) | ||
.withSignature(signatureFor(email1) | ||
.onPage(0) | ||
.atPosition(100, 100))) | ||
.build(); | ||
|
||
packageId = eslClient.createPackage( superDuperPackage ); | ||
eslClient.sendPackage(packageId); | ||
sentPackage = eslClient.getPackage(packageId); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.