LogoLogo
v3.8.x
v3.8.x
  • Introduction
  • Concept
  • Prerequisites
  • Trust1Connector JS SDK
  • Release Notes
  • Installation Profiles
  • Core
    • Setting up the SDK
    • Initialize Trust1Connector
    • DNS Rebind
    • Readers
    • Core Service
    • Downloading latest Trust1Connector
    • Consent
    • Authenticated client
    • Module/container setup
    • Status codes / error handeling
    • Quick-Migration Guide (v2 -> v3)
  • Token
    • Token typing models
    • Generic token
    • Belgian eID
    • Aventra MyEID PKI
    • Idemia Cosmo One v8.2
    • Oberthur Cosmo One v7.3
    • Diplad (BeLawyer)
    • Chambersign*
    • Camerfirma*
    • Certigna*
    • Certinomis*
    • Jcop3*
    • Airbus
    • Eherkenning
    • Safenet*
    • Luxembourg ID
    • LuxTrust
  • Truststore
    • Introduction
    • Truststore API
    • Other PKCS11 Compatible Tokens*
  • Payment
    • Payment typing models
    • EMV*
    • Crelan
  • FIle
    • File exchange
    • Custom
      • VDDS
  • HSM
    • Remote loading
  • Other
    • Print
    • Wacom*
    • Simple Sign
  • Miscellaneous
    • Prerequisites New Token/Smart Card
    • Prerequisites Support
    • Troubleshooting
      • Connector Connection Issues
      • Windows
      • Windows dynamic port range
      • Mac OSX Sonoma and higher
      • Mac OSX Sonoma and higher Smart-card reader issue
      • MacOS Rosetta
      • Enable Debug Logging
      • Changing Device date/time
      • Disable DNS rebind pop-up
    • Installation FAQ
    • Removal of Trust1Connector
  • Installation Manual
    • Windows
    • Mac OSX
Powered by GitBook
On this page
  • Include Trust1Connector JS SDK
  • Using Trust1Connector in as a library
  • Using Trust1Connector as a module

Was this helpful?

Export as PDF
  1. Core

Setting up the SDK

PreviousInstallation ProfilesNextInitialize Trust1Connector

Was this helpful?

Include Trust1Connector JS SDK

Include the on your web application. This will provide you with access to the SDK's functions which are used to execute the Trust1Connector's functionality.

From now on we will refer to the Trust1Connector JS SDK to the following variances;

  • T1C-js/t1cjs

  • T1C SDK

Using Trust1Connector in as a library

The Trust1Connector is a Javascript Library with TypeScript typings. This can be easily used in any web-application by loading the javacript files on the web-page.

Loading the T1C SDK onto a web-page can be done as shown in the code example below of a html page

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script defer src="./T1CSdk.js"></script>
</head>
<body>
    ...
</body>
</html>

In the example you can see that we load the Javascript SDK on line 8

<script defer src="./T1CSdk.js"></script>

The defer attribute means that the script will be downloaded in parallel with the rest of the web-page but will be executed when the page has finished loading in.

This is mostly used to make sure that when the Javascript wants to target a specific element on the page, for example a div, that this element has already been loaded and is accessable.

Using Trust1Connector as a module

We also provide an npm package that makes it easier to load and use the Trust1Connector Javascript SDK as a module.

Trust1Connector JavaScript SDK