Commit 9b719919 authored by Prakhar Agrawal's avatar Prakhar Agrawal
Browse files

Updated readme.md

parent 4a1f929f
Loading
Loading
Loading
Loading
+58 −1
Original line number Diff line number Diff line
# docsigner
# Document Signer Utility

1. Setup a Document Signer from the Settings Tab in your Leegality Dashboard, by entering your application URL. For example, if you are deploying your application at docsigner.example.com, please save the same in the URL Field. Alternatively, you can start by entering any demo URL and update the same later. 
2. On successful set, you will receive an eSign ID. 
3. Download *docsigner.war*.
4. Please ensure that Java is installed on your server. (Recommended version: Java 1.8.x, Minimum requirement: Java 1.7)
5. Setup TOMCAT 8.5 or above on your server- Read [here](https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-ubuntu-16-04) to know how.
6. After installing Tomcat, go to *webapps* directory and place the *docsigner.war* file in it. Please ensure that you do not change the name of the WAR file. 
7. After placing WAR file, restart the  TOMCAT container. WAR will be exploded in the same folder.
8. Go to the folder *docsigner*. Locate the *certificate.properties* file (Create a file with the same name if you cannot locate the file).
9. Open the *certificate.properties*  file to configure Document Signer Certificate and add the following lines to it
    
    ```
    doc.signer.certificate.XXXXXXX.path=YOUR_PFX_FILE_LOCATION
    doc.signer.certificate.XXXXXXX.password=YOUR_PFX_FILE_PASSWORD
    ```
    
    Where XXXXXXX is your eSign ID generated from the Leegality dashboard above. You can configure multiple .pfx files in the same application instance by simply adding multiple configurations.
    
10. Application will run at **/docsigner**. Please ensure that it does not conflict with any other application.

Now, whenever a signing request is received for your eSign ID, the document will be eSigned using your Document Signer Certificate.

You can further configure Automated Signing using Document Signer by creating a passkey for the same in your Leegality Dashboard. Pursuant to the same, users from your Organisational Department would be able to get documents eSigned using Document Signer Certificate either using our API Gateway or using the Leegality Dashboard.

**Logs:** All communication with your application is loggable and is enabled by default. The logs will be created in catalina.out file in TOMCAT logs Directory. You can also change the destination if you wish so. See this link for more details.
    
    Format: yyyy-MM-dd HH:mm:ss.SSS INFO PID --- [THREAD_NAME] APP_PACKAGE_NAME: Message

    Examples:
    
    2019-04-02 13:27:28.760  INFO 28530 --- [nio-8080-exec-1] c.g.docsigner.filter.ApplicationFilter   : IP: 49.207.114.183 Host: 127.0.0.1 /docsigner/sr/status?pathId=nWxVGaU

    2019-04-02 13:27:29.050  INFO 28530 --- [nio-8080-exec-1] com.gspl.docsigner.service.SignService   : Status Response: {
      "commonName" : "DS GREY SWIFT PRIVATE LIMITED 01",
      "status" : 1
    }
    
    2019-04-02 13:27:43.392  INFO 28530 --- [nio-8080-exec-2] c.g.docsigner.filter.ApplicationFilter   : IP: 49.207.114.183 Host: 127.0.0.1 /docsigner/sr/sign
    
    2019-04-02 13:27:43.491  INFO 28530 --- [nio-8080-exec-2] c.g.docsigner.controller.SignController  : Sign Request: {
      "pathId" : "HLVt8dc",
      "documents" : [ {
        "hash" : "Document Hash",
        "docId" : "Document ID"} ]
    }
    
    
    2019-04-02 13:27:43.704  INFO 28530 --- [nio-8080-exec-2] com.gspl.docsigner.service.SignService   : Sign Response: {
      "documents" : [ {
        "hash" : "Document Hash",
        "docId" : "Document ID",
        "encodedBase64Sign" : "Signed Content",
        "errors" : [“Error Message”],
        "hasError" : false
      } ],
      "errors" : [“Error Message”],
      "hasError" : false
    }