Overview

Hancock offers all you need to get the strongest available forms of digital signatures without compromising on usability. However, viewing the shared documents can be inconvenient for your users. With Verify by Hancock your users will not need to install Adobe Acrobat to verify that the viewed documents are authentic and have not been modified.

There are a few ways to use Verify by Hancock.

Embed as IFrame

You can simply use an iframe with a link to the document. Just paste it into your site.

<iframe allowfullscreen src="https://verify.ink/viewer?url=${YOUR_DOCUMENT_URL}" ></iframe>

Where YOUR_DOCUMENT_URL is just a link, for example: https://peculiarventures.github.io/ExamplePDFs/signed/BILLS-106s761enr.pdf. You will get a frame like this:

verify-iframe

Embed as WebComponent

Web component is a set of web platform APIs that allow you to use custom, reusable, encapsulated HTML tags in web pages and web apps. It is built on the basis of the Web Component standards; therefore, it will work across modern browsers and with any JavaScript library or framework that works with HTML. You can read more about web components here.

Firstly, you need to include a webcomponent script. You can do it in several ways:

1. As a script tag at the end of your HTML.

<script type="module" src="https://verify.ink/webcomponent/index.js" ></script>

2. As an imported ES module in a script tag or ES module file.

<script type="module"> import 'https://verify.ink/webcomponent/index.js'; </script>

After that you could simply use HTML tag verify-viewer, like this:

<verify-viewer url="${YOUR_DOCUMENT_URL}" ></verify-viewer>

Use several documents

Sometimes it is necessary to use more than one document at the same time and Verify provides the opportunity to do this.

several-documents-menu-close several-documents-menu-open You can specify more than one document for the viewer. All you need to do is to write URLs separated with commas:

<iframe allowfullscreen src="https://verify.ink/viewer? url=${YOUR_DOCUMENT_URL},${YOUR_SECOND_DOCUMENT_URL},${YOUR_THIRD_DOCUMENT_URL}" ></iframe>
<verify-viewer url="${YOUR_DOCUMENT_URL}, ${YOUR_SECOND_DOCUMENT_URL}, ${YOUR_THIRD_DOCUMENT_URL}" ></verify-viewer>

Configure viewer

You may have the need to modify a standard behavior of Verify. There are a few options you can configure.

All features are enabled by default:

You can disable the some settings in the following ways:

<verify-viewer url="${YOUR_DOCUMENT_URL}" show-signature-if-present="false" notify-if-not-signed="false" ></verify-viewer>

Or for an iframe

<iframe allowfullscreen src="https://verify.ink/viewer?url=${YOUR_DOCUMENT_URL} &show-signature-if-present=false &notify-if-not-signed=false" ></iframe>

If you want to configure the viewer manually, specify the attributes like blacklist in the web component:

<verify-viewer url="${YOUR_DOCUMENT_URL}" search="true" ></verify-viewer>

Or you can use the comma-separated values of the query settings in Iframe. Please note that Iframe uses the camelCase notation.

<iframe allowfullscreen src="https://verify.ink/viewer? url=${YOUR_DOCUMENT_URL} &search=true" ></iframe>

Possible options are described below.

Show signature if present

Enabling this option will show a bar with signatures if the document has been signed. There will be a list of document’s signatures, timestamps and seals. You can see the details by clicking them. Set show-signature-if-present attribute to webcomponent or settings query.

show-signature-if-present-several show-signature-if-present-single

Notify if not signed

Enabling this option will show a dialog window with a warning that the document is not signed. User will have an opportunity either to close the window or to sign the document using Hancock if this feature is not disabled by the sign option. Set notify-if-not-signed attribute to webcomponent or settings query.

notify-if-not-signed

Disable Sign, Search, Download Ability

Specifying the following options

  • sign="false" - hides "Sign" button for unsigned documents. disable-sign
  • search="false" - disables the ability to search in document's content. disable-search
  • download="false" - disables the ability to download a viewable document. disable-download

Provide Intermediate Certificates for correct signature verification

You could specify intermediate-certificates option with comma-separated Base64 BER-encoded certificates

<verify-viewer url="${YOUR_DOCUMENT_URL}" intermediate-certificates="MIIGjzCCBHegAwIBAgIUCthvozW5PvSMjjv3fUxjFDZDrbkwDQYJKoZIhvcNAQELBQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMSBHMzAeFw0xNjA2MDYxNDU0MjdaFw0zMTA2MDYxNDU0MjdaMFQxCzAJBgNVBAYTAkJNMRkwFwYDVQQKDBBRdW9WYWRpcyBMaW1pdGVkMSowKAYDVQQDDCFRdW9WYWRpcyBFbnRlcnByaXNlIFRydXN0IENBIDEgRzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDqL3pDpaiJseEm9psnmngjKR/pfNjNNggII9br+6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8BcUzXZWKYtxxNh8Hh33baG7iWK/mQ==" ></verify-viewer>

Provide Root Certificates to trust during signature verification

You could specify root-certificates option with comma-separated Base64 BER-encoded certificates

<verify-viewer url="${YOUR_DOCUMENT_URL}" root-certificates="MIIFYDCCA0igAwIBAgIUeFhfLq0sGUvjNwc1NBMotZbUZZMwDQYJKoZIhvcNAQELBQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMSBHMzAeFw0xMjAxMTIxNzI3NDRaFw00MjAxMTIxNzI3NDRaMEgxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDEgRzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCgvlAQjunybEC0BJyFuTHK3C3kEakEPBtVwedYMB0ktMPvhd6MLOHBPd+C5k+tR4ds7FtJwUrVu4/sh6x/gpqG7D0DmVIB0jWerNrwU8lmPNSsAgHaJNM7qAJGr6Qc4/hzWHa39g6QDbXwz8z6+cZM5cOGMAqNF34168Xfuw6cwI2H44g4hWf6Pser4BOcBRiYz5P1sZK0/CPTz9XEJ0ngnjybCKOLXSoh4Pw5qlPafX7PGglTvF0FBM+hSo+LdoINofjSxxR3W5A2B4GbPgb6Ul5jxaYA/qXpUhtStZI5cgMJYr2wYBZupt0lwgNm3fME0UDiTouG9G/lg6AnhF4EwfWQvTA9xO+oabw4m6SkltFi2mnAAZauy8RRNOoMqv8hjlmPSlzkYZqn0ukqeI1RPToV7qJZjqlc3sX5kCLliEVx3ZGZbHqfPT2YfF72vhZooF6uCyP8Wg+qInYtyaEQHeTTRCOQiJ/GKubX9ZqzWB4vMIkIG1SitZgj7Ah3HJVdYdHLiZxfokqRmu8hqkkWCKi9YSgxyXSthfbZxbGL0eUQMk1fiyA6PEkfM4VZDdvLCXVDaXP7a3F98N/ETH3Goy7IlXnLc6KOTk0k+17kBL5yG6YnLUlamXrXXAkgt3+UuU/xDRxeiEIbEbfnkduebPRq34wGmAOtzCjvpUfzUwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUo5fW816iEOGrRZ88F2Q87gFwnMwwDQYJKoZIhvcNAQELBQADggIBABj6W3X8PnrHX3fHyt/PX8MSxEBd1DKquGrX1RUVRpgjpeaQWxiZTOOtQqOCMTaIzen7xASWSIsBx40Bz1szBpZGZnQdT+3Btrm0DWHMY37XLneMlhwqI2hrhVd2cDMT/uFPpiN3GPoajOi9ZcnPP/TJF9zrx7zABC4tRi9pZsMbj/7sPtPKlL92CiUNqXsCHKnQO18LwIE6PWThv6ctTr1NxNgpxiIY0MWscgKCP6o6ojoilzHdCGPDdRS5YCgtW2jgFqlmgiNR9etT2DGbe+m3nUvriBbP+V04ikkwj+3x6xn0dxoxGE1nVGwvb2X52z3sIexe9PSLymBlVNFxZPT5pqOBMzYzcfCkeF9OrYMh3jRJjehZrJ3ydlo28hP0r+AJx2EqbPfgna67hkooby7utHnNkDPDs3b69fBsnQGQ+p6Q9pxyz0fawx/kNSBT8lTR32GDpgLiJTjehTItXnOQUl1CxM49S+H5GYQd1aJQzEH7QRTDvdbJWqNjZgKAvQU6O0ec7AAmTPWIUb+oI38YB7AL7YsmoWTTYUrrXJ/es69nA7Mf3W1daWhpq1467HxpvMc7hU6eFbm0FU/DlXpY18ls6Wy58yljXrQs8C097Vpl4KlbQMJImYFtnh8GKjwStIsPm6Ik8KaN1nrgS7ZklmOVhMJKzRwuJIczYOXD" ></verify-viewer>

Please note that default trusted certificates will lost their trust for signature verification when this option specified.

Interacting with a WebComponent

You could dynamically change settings and url attributes of <verify-viewer>. Viewer will pick up the changes and will update the document list, disable/enable features on the fly.

Hints and limitations

  • If you want to use a WebComponent don't forget to polyfill webcomponents API for old browsers;
  • Documents must be hosted on a publically available URLs, if you use a web-server to host it, make sure the CORS is configured correctly, learn more.

CORS policy

Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources on a web page to be requested from another domain outside the domain from which the first resource was served. A web page may freely embed cross-origin images, stylesheets, scripts, iframes, and videos. Certain "cross-domain" requests, notably Ajax requests, are forbidden by default by the same-origin security policy. CORS defines a way in which a browser and server can interact to determine whether or not it is safe to allow the cross-origin request. It allows for more freedom and functionality than purely same-origin requests, but is more secure than simply allowing all cross-origin requests.

If Access-Control-Allow-Origin Header is not present on the requested resource it means that the website with your document doesn't allow Verify by Hancock to get the resource from it. This could be done with an additional HTTP Header, Access-Control-Allow-Origin to requested resource. This header could take the following values:

Access-Control-Allow-Origin : [https://verify.ink]

In this case, https://verify.ink can access your web resource, since it is explicitly allowed.

Access-Control-Allow-Origin : * 

Wildcard character (*) means that any site can access the resource you have it in your site and obviously its unsafe. More information about CORS you can find here.

Document name resoultion

Several sources could be used to determine the document display name, there is a list of priorities:

  1. 1."Content-Disposition" header, with filename="displayname.pdf" *;
  2. 2.From url if ends with file name, for example: "https://domain.example/files/contract.pdf ";
  3. 3.Title from PDF metadata;
  4. 4.In a case document name couldn't be determined, it will be marked as "Unnamed".

*: Note that your server must send a "Access-Control-Expose-Headers": "Content-Disposition" response header to make Verify able to read "Content-Disposition" header value.