arrow-left

Only this pageAll pages
gitbookPowered by GitBook
1 of 39

v3.2.x

Loading...

Loading...

Loading...

Loading...

Core

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Trust1Connector SDK integration

Loading...

Token

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Payment

Loading...

Loading...

Loading...

FIle

Loading...

HSM

Loading...

PKCS11

Loading...

Loading...

Payment typing models

circle-exclamation

Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

hashtag
Introduction

This page describes all generic payment models used.

hashtag
Models

export class PaymentModuleDescriptionResponse extends DataObjectResponse {
  constructor(public data: PaymentModuleDescription, public success: boolean) {
    super(data, success);
  }
}

export class PaymentModuleDescription {
  constructor(
      public desc: string
  ) {}
}


export class PaymentVerifyPinResponse extends DataObjectResponse {
  constructor(public data: PaymentVerifyPinResponseData, public success: boolean) {
    super(data, success);
  }
}

export class PaymentVerifyPinResponseData {
  constructor(
      public verified: boolean
  ) {}
}

export class PaymentReadData {
  constructor(
      public applications: Array<PaymentApplication>,
  ) {}
}

export class PaymentApplication {
  constructor(
      public aid?: string,
      public name?: string,
      public priority?: number,
  ) {}
}


export class PaymentReadDataResponse extends DataObjectResponse {
  constructor(public data: PaymentReadData, public success: boolean) {
    super(data, success);
  }
}

export class PaymentReadApplicationData {
  constructor(
      public country?: string,
      public countryCode?: string,
      public effectiveDate?: string,
      public expirationDate?: string,
      public language?: string,
      public name?: string,
      public pan?: string,
  ) {}
}

export class PaymentReadApplicationDataResponse extends DataObjectResponse {
  constructor(public data: PaymentReadApplicationData, public success: boolean) {
    super(data, success);
  }
}

export class PaymentSignResponseData {
  constructor(public success: boolean, public data?: string, public cardSignature?: string, public readerSignature?: string) {
  }
}

export class PaymentSignResponse {
  constructor(public data: PaymentSignResponseData, public success: boolean) {}
}

Quick-Migration Guide

circle-exclamation

Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

hashtag
Introduction

Migration from the v2 to the v3 of the Trust1Connector can be done in 2 ways;

  1. Integration of the API

  2. Integration via the deprecated Javascript SDK

Both are viable integrations but we strongly suggest to integrate via the API since the JS SDK does not include all features, only the ones which were available in the v2. When integrating via the API you have more control over the Javascript packages used.

The Javascript SDK has the following packages as dependencies;

hashtag
Update a v2 application to v3

For updating your web application first of all you need to use the new Javascript SDK. After this there are some differences in using the SDK from the v2.

hashtag
Configuration

The configuration from the v2 has changed, we simplified this.

The v2 had the following configuration options;

With the v3 this is significantly simplified to the following;

circle-exclamation

Some of the config options of the v3 are still in review and can be removed up until the final release of the v3, in the table below you will find more information

hashtag
Initialisation

After you've created your configuration object you can do the initialisation of the Trust1Connector SDK. This has largely remained the same except for the error codes.

V2 example:

V3 example;

Trust1Connector JS SDK

You can find the trust1connector JS SDK for the Trust1Connector v3 via NPM

You can also find the source code here

Similar to the api url this is the URL where the proxy used in shared environment is running on. This is by default the same as the API url

apiKey

/

gwJwt

jwt

JWT token used for authentication of the web application towards the Trust1Connector. This must be retrieved from the web applications backend

tokenExchangeContextPath

/

ocvContextPath

/

dsContextPath

/

in v2 this was the context path for the DS based on the gwOrProxyUrl

dsFileContextPath

/

pkcs11Config

/

agentPort

/

implicitDownload

/

forceHardwarePinpad

/

sessionTimeout

/

consentDuration

/

syncManaged

/

osPinDialog

/

boolean which depicts the default os pin dialog value

containerDownloadTimeout

/

localTestMode

/

lang

/

providedContainers

/

V2 config option

V3 config option

Description

gclUrl

t1cApiUrl

in the V2 this was https://localhost:10443 while in the V3 this will be https://t1c.t1t.io (for T1T)

t1cApiPort

is the port where the webserver is listening on, in the v2 this is 10443 but in the v3 by default(T1T) this is 51983

t1cProxyPort

This value represents the port where the Proxy webserver is listening on. By default this is 51983

gwOrProxyUrl

t1cProxyUrl

"@types/lodash": "^4.14.150",
"Base64": "^1.1.0",
"axios": "^0.19.2",
"jsencrypt": "^3.0.0-rc.1",
"lodash": "^4.17.15",
"logger-bootstrap": "^2.0.0-alpha2",
"semver": "^7.3.2",
"sha256": "^0.2.0",
"store2": "^2.11.1",
"uuid": "^8.0.0"
export class GCLConfigOptions {
    constructor(public gclUrl?: string,
                public gwOrProxyUrl?: string,
                public apiKey?: string,
                public gwJwt?: string,
                public tokenExchangeContextPath?: string,
                public ocvContextPath?: string,
                public dsContextPath?: string,
                public dsFileContextPath?: string,
                public pkcs11Config?: Pkcs11ModuleConfig,
                public agentPort?: number,
                public implicitDownload?: boolean,
                public forceHardwarePinpad?: boolean,
                public sessionTimeout?: number,
                public consentDuration?: number,
                public consentTimeout?: number,
                public syncManaged?: boolean,
                public osPinDialog?: boolean,
                public containerDownloadTimeout?: number,
                public localTestMode?: boolean,
                public lang?: string,
                public providedContainers?: T1CContainerid[]) {
    }
}
export class T1CConfigOptions {
  constructor(
    public t1cApiUrl?: string,
    public t1cApiPort?: string,
    public t1cProxyUrl?: string,
    public t1cProxyPort?: string,
    public jwt?: string
  ) {}
}
config = new GCLLib.GCLConfig(configoptions);
    GCLLib.GCLClient.initialize(config).then(res => {
        client = res;
        core = client.core();
        console.log("GCLClient: ", res)
    }, err => {
        console.log("GCL error:", err)
    })
config = new T1CSdk.T1CConfig(configoptions);
T1CSdk.T1CClient.initialize(config).then(res => {
    client = res;
    console.log("Client config: ", client.localConfig)
    core = client.core();

}, err => {
    errorHandler(err);
});
https://github.com/Trust1Team/t1c-sdk-js/tagsarrow-up-right

Changelog

hashtag
Release notes - Trust1Connector - Version T1C-JS-v3.2.13

hashtag
Bug

Pkcs11 module and os dialog return decryption error

  • Update certificate model to correctly handle multiple certificates

  • hashtag
    Release notes - Trust1Connector - Version T1C-JS-v3.2.12

    hashtag
    Bug

    • Device-key endpoint gets called in error handler instead of successhandler

    hashtag
    Release notes - Trust1Connector - Version T1C-JS-v3.2.11

    hashtag
    Bug

    • File-exchange ArrayBuffer should be Blob

    hashtag
    Release notes - Trust1Connector - Version T1C-JS-v3.2.10

    hashtag
    Bug

    • Initialising with invalid JWT does not throw an error

    hashtag
    Release notes - Trust1Connector - Version T1C-JS-v3.2.9

    hashtag
    Bug

    • Entity and type response object inconsistency

    • Remoteloading split TX, RX and SW value based on APDU response

    hashtag
    Story

    • Use Device certificate to encrypt the pin value sent in clear text

    • I want to enable the module for eHerkenning

    • I want to enable module for Print Writer

    hashtag
    Release notes - Trust1Connector - Version T1C-JS-v3.2.8

    hashtag
    Bug

    • Aventra, Idemia, Oberthur callback functions not being triggered

    • FileExchange typing inconsistency

    hashtag
    Story

    • Add LuxeID to the token generic interface in JS SDK

    hashtag
    Release notes - Trust1Connector - Version T1C-JS-v3.2.7

    hashtag
    Bug

    • Fix imports for Pkijs

    hashtag
    Story

    • Disbable implicit any typing

    hashtag
    Release notes - Trust1Connector - Version T1C-JS-v3.2.6

    hashtag
    Bug

    • Fix for bulk sign reset in JS SDK causes the reader ID not to be included in certificate retrieval

    hashtag
    Release notes - Trust1Connector - Version T1C-JS-v3.2.5

    hashtag
    Improvement

    • Provide separate implementation for Belgian eID with Crelan reader

    Consent

    circle-exclamation

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

    hashtag
    Introduction

    The Trust1Connector supports user consent mechanism for applications:

    implicit user consent: the user will be provided with a consent token which can be pasted into his clipboard. The T1C-GCL will implicitly retrieve the consent token form the clipboard and perform a verification (the token pasted in the clipboard - form the application context - should match with the token available on the clipboard for the T1C-GCL)

    The consent can be configured to have an expiration date, when this expiration date has been exceeded, a new consent will be asked towards the user.

    circle-info

    The implementation of the consent flows only apply with the T1C JS SDK. Implementation with the API directly is different

    hashtag
    Consent dialog for implicit consent

    If the consent has been enabled upon installation of the Trust1Connector, a user will not be able to retrieve any data from the connector without first giving its consent, agreeing to give access to his/her card reader of filestorage. Without this consent, all requests will return a 401 Unauthorized response with error code 500 No valid consent found or at initialisation of the Trust1Connector SDK an error code 500 No valid consent found. The application should detect these error codes and use it to trigger the consent dialog.

    The application shows this code word on screen and provide a button for 'copy-to-clipboard'. When the user has copied the code word to the clipboard (on user click button event), an implicit consent request can be executed towards the T1C. The T1C will grab the pasted code word from the user system clipboard and if both match, an implicit user consent has been granted for the calling application. The relation between the application and the local T1C instance is 'approved'. At this point the Trust1Connector returns a cookie that should be stored in the browser. This cookie will be re-used the next time the user wants to use the Trust1Connector until the cookie expires.

    hashtag
    User clipboard remark

    Initially the concept was based on copying programmatically the code word, from the application context, to the user system clipboard. Although, through CAB forum, this not allowed; A user interaction is mandatory. The application should provide a 'copy-to-clipboard' button or alike in order to 'trigger' a user action. Once this action has been done, the T1C executes the flow automatically, this is retrieval and verification of the code word.

    Currently, the need for a user interaction is a known limitation (aka. ). As this is the case, the W3C has a project ' ' to propose a solution for a new clipboard API in browsers. The use case for 'Remote clipboard synchronisation' as a use case included in this draft proposal. As this is a draft, and not yet supported by the browsers, we can not perform an automatic 'paste' ('copy' in terms of the browser) to the clipboard.

    Sending an implicit consent request can be done as follows:

    This call has 1 required and 2 optional parameters:

    1. Code Word (required): a code word in string format that will be shown in the consent dialog.

    2. Consent duration in days (optional): Allows the application the specify how long this consent is to be valid if granted. If not provided, the default value is 365 days.

    3. Callback function (optional): function to be called with the result of the consent request.

    The response of the consent will be an updated T1C Client which you after this point can use to continue your use-case(s).

    The response can also be a 400 Bad Request with status code 115 "No agents registered to the proxy service" which means that the request has been sent with the unique code but the Proxy cannot not find the user associated with it by checking the clipboards of all connected users.

    This could mean that there is no T1C API client present or it is not running correctly.

    Prerequisites

    hashtag
    Trust1Connector API DNS

    The Trust1Connector API v3 exposes a secure REST API on the client device. Trust1Team has created a t1c.t1t.io DNS entry (or customer-specific DNS entry) that points to 127.0.0.1 in order to facilitate SSL communication. This means that if the customer infrastructure uses a proxy for all network traffic, an exemption must be made for t1c.t1t.io to always point to the origin device's loopback address.

    If no exemption is made and https://t1c.t1t.io is handled by a proxy, it will redirect to 127.0.0.1 IP of the proxy server instead of the local machine, and the Trust1Connector API will be unreachable.

    hashtag
    Distribution Service

    In order to correctly function, the Trust1Connector API must be able to connect to its configured Distribution Service. You must allow REST traffic to the following URLs (if applicable):

    • Acceptance: https://acc-ds.t1t.io

    • Production: https://ds.t1t.io

    hashtag
    Disk Space

    The T1C-Proxy (necessary for shared environments only) requires ± 200Mb of space

    The T1C-API is installed in user space and also requires ± 200Mb of space for every user.

    hashtag
    API Key

    All endpoints of the Trust1Connector API are secured and require a JWT to access. To obtain a token, an API key must be exchanged. This API key must be requested from Trust1Team, or created by the customer if they are hosting their own Distribution Service

    hashtag
    Operating System

    Right now Trust1Conector support two operating systems;

    • MacOS 10.9 or higher

    • Windows 8.1 or higher

    hashtag
    Windows 8.1 or higher

    To run in user-space on Windows 8.1 or higher some components have to be set on the operating system

    hashtag
    Registry keys

    Below you can find a list of all registry keys that will be created for the working of the Trust1Connector, All these keys are added to HKCU

    HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

    HKEY_CURRENT_USER\SOFTWARE\Trust1Team\Trust1Connector

    hashtag
    Cookies

    When running in a shared environment a cookie is used to store the user's consent, the following cookie will be used:

    clipboard.jsarrow-up-right
    Clipboard APIsarrow-up-right
    t1c-agent-proxy
    T1CSdk.T1CClient.initialize(config).then(res => {
        client = res;
        console.log("Client config: ", client.localConfig)
        core = client.core();
    
    }, err => {
        if (err.code == 500) {
            client = err.client
            $('#consentModal').modal('show', {
                keyboard: false
            });
            $('.consent-token').text(makeid(20));
        } else if (err.code == 115) {
            $('.consent-token').text(makeid(20));
        } else {
            console.error("T1C error:", err)
        }
    });
        
    $('#consentModal .btn-primary').on('click', (ev) => {
        const tokenNode = document.querySelector('.consent-token');
        var range = document.createRange();
        range.selectNode(tokenNode);
        window.getSelection().addRange(range);
        try {
            document.execCommand('copy');
        } catch (err) {
            console.log('Oops, unable to copy');
        }
        window.getSelection().removeRange(range);
        const clipboardData = tokenNode.textContent;
        
        client.core().getImplicitConsent(clipboardData).then(consentRes => {
            client = consentRes // replace the client and other set variables of the T1C
            core = client.core();
            core.version().then(versionResult => console.log("T1C running on core " + versionResult));
            $('#consentModal').modal('hide');
        }, err => {
            console.error(err)
        })
    });

    Introduction

    Trust1Connector v3 Release Documentation

    hashtag
    A Word of Introduction

    The Trust1Connector Javascript SDK is a library that purely functions as a proxy towards the Trust1Connector API. This Library does not contain any business logic.

    Concept

    Running the Trust1Connector in a shared environment, such as Citrix, XenApp and Remote Desktop, requires additional installation steps. In this section we explain the concept and approach used.

    hashtag
    Architecture Overview

    The following schematic seems rather complicated as it explains the inner workings of the Trust1Connector components, the concept is elaborate further on this page. If you are only interested in what the integration impact is for your Web Application in a Shared Environment, you can skip directly to the section: Integration in Web Applications

    hashtag
    Components

    hashtag
    Web Environment

    The Web Application can use the T1C-SDK-JS or a custom REST API client for integration purpose. As the Web Application operates in a browser context, resolving an agent, by means of a consent, will result in a browser cookie being provided.

    The T1C-SDK-JS implements the detection of a Shared Environment during the initialisation of the library. When initialisation succeeds without a controlled exception, the setup is a standalone; when the initialisation throws an 401 Error, the T1C-SDK-JS can be used to request the user for a Consent.

    When using the REST API directly form your web application, reading the browser cookie and performing the initialisation must be done by the integrating Web Application itself.

    hashtag
    Shared Environment Host

    Compared to Trust1Connector v2, the v3 release has a separate component to be be installed on a shared host. This component is called the T1C-Proxy and only exposes the following use cases:

    • Verify random available ports [in a predefined range] which can be used by an Agent (Session of T1C-API running in user space)

    • Port reservation upon installation of a new T1C-API in an active user session

    • Port registration upon initialisation of a T1C-API in an active user session

    The T1C-Proxy operates by Default on the API port defined in the T1C-DS (Distribution Server). From a Web Application perspective, this is the only information known. When a Web Application requests the information of the device, the PROXY device type will inform the Web Application that the targeted underlying API is a PROXY, which means that the Web Application must ask for the Agent specific API port to configure an URI which can be used to execute the use cases.

    When using the T1C-SDK-JS this is done implicitly during initialisation.

    hashtag
    Shared Environment Client

    A T1C-API installed for a specific users runs in [User Space]. To avoid possible attack vectors, the Trust1Connector v3 will always run in [User Space].

    Upon installation of the T1C-API, during the post install phase, the T1C-API will try to verify automatically if it is running in a shared environment. If this is the case, the T1C-API will ask the T1C-Proxy for available ports and will reserve those post, prior to initialisation and startup.

    The ports which are reserved by the T1C-Proxy are the following:

    • T1C-API Port: This is the port exposing the OpenAPI interface towards Web Applications and used by the T1C-SDK-JS

    • T1C-gRPC Port: This is the port exposing the gRPC interface locally towards the T1C-API component. The T1C-gRPC runs in a sandboxed and hardened environment, it contains the implementation modules needed for hardware communication with local or remote peripherals.

    When receiving ports during post-install, an user agent device is temporary RESERVED in the Agent Registry of the T1C-Proxy. Upon T1C-API initialisation, the port configurations will be confirmed and the Agent Registry will set the device state on REGISTERED. From this moment on, a T1C-API instance, running in an active user session, will be available for the Web Application.

    The T1C-gRPC instance is inherently a component from the T1C-API, and thus is managed by the T1C-API. As each user must have it's own hardened runtime for communication purpose, the port assigned for T1C-gRPC will be registered and configured by the T1C-API (and restarted when needed).

    hashtag
    Central Back-Office

    Starting from this release (v3) of the Trust1Connector, each device must have a link with an active and running T1C-DS (Trust1Connector Distribution Server). This is to guarantee security, updates, and avoid potential risk in production.

    The T1C-DS is proceeded by an API Gateway who is managing the security offloading in the application layer. For a Web Application to communicate with a T1C-Proxy or T1C-API, a JWT (Json Web Token) is needed and obliged. The T1C-DS is responsible for the key management, the certificate management and other use cases which are described in a separate wiki.

    In order to retrieve a valid JWT, the T1C-DS can be requested from your application back-end with a valid api-key. The JWT is valid for a given amount of time, and sets the context used when requesting the T1C-API on a device.

    hashtag
    Security

    hashtag
    Share Environment Flows

    hashtag
    Communication Stack

    Management of an in-memory list of active Agents

  • Management of user consents in a shared environment by means of browser cookies with an optional configurable TTL (time to live)

  • Configuration

    circle-exclamation

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

    hashtag
    Introduction

    In order to use the JS-SDK, the library must be initialised with an api-key. The api-key is a key received upon subscription. The JS-SDK is a client library for web based consumers. As a reminder, the T1C can be used from a native applications context using a native client, or addressing directly the T1C interface. In order to work with an api-key in a browser context, 2 type of consumers can be distinguished:

    • SPA (Single Page Application) integration: this is a web application without any back-end

    • Web Application integration: this is a web application with a back-end implementation

    For an SPA, an api-key (thus the access token to the Distribution Service) is considered unsafe in a browser context. For SPA's, Trust1Team configures extra security measures on infrastructure level. A mutual authentication is required and additional policies are applied (IP restriction policy, ...).

    The api-key must be translated into an JWT token in order to enable communication with the T1C.

    hashtag
    Initialise the client library

    To initialise the JavaScript client library, the library must be loaded into your HTML page:

    Once loaded, the script will expose a GCLLib global. This global will allow you to create a GCLConfig:

    The GCLConfigOptions object will allow you to specify and/or override the configuration to be used. Configuration options can be found in the Configuration Options below. You can create a GCLConfigOptions as follows:

    Now that we have a configuration, we can initialise the client library. The following example creates a Promise that will resolve with an instance of a T1CClient:

    <script src="../T1CSdk.js" charset="utf-8"></script>
    var configoptions = new T1CSdk.T1CConfigOptions(
                environment.t1cApiUrl,
                environment.t1cApiPort,
                environment.t1cApiUrl,
                environment.t1cApiPort,
                environment.jwt
            );
            
    config = new T1CSdk.T1CConfig(configoptions);
    T1CSdk.T1CClient.initialize(config).then(res => {
            client = res;
            console.log("Client config: ", client.localConfig)
            core = client.core();
        }, err => {});

    Status codes / error handeling

    hashtag
    Introduction

    In the Trust1Connector V3 we've completely reworked the error system. The goal of this system is to have error codes which are easy to read, understand and integrate. Our first implementation was a very generic approach with as few error codes as possible.

    After some iterations of the Trust1Connector we've discovered that this error system does not suffice the needs. So we've upgraded the system to be more consistent and extensive. This provides integrators the flexibility to have a very detailed error handeling system while keeping it easy to understand and read.

    The new system provides information about the origin, type and detailed information of the error. We maintained the same type (integers) as our previous error codes, this makes it easier to differentiate them.

    hashtag
    HTTP Status Codes

    T1C uses the following HTTP response codes when handling a request.

    In case of an error the response will contain a body with more detailed information about the error:

    hashtag
    Error format

    Error codes will be in the following number format XXXXXX for example 201010 is an error code that depicts an error occurred with the reader in the Transaction service.

    The first digit depicts the Origin of that error, values can be the following;

    The following 2 digits describe the type of error;

    Finally we have 3 digits that give a more detailed error. These will give you more information about the specific error-case. Currently we have the following exceptions that can be thrown.

    hashtag
    Codes to expect

    The following list are codes that you can expect.

    hashtag
    General / Controller

    hashtag
    Aventry My Id 4

    hashtag
    Oberthur 7.3

    hashtag
    Idemia cosmo 8.2

    hashtag
    BeID

    hashtag
    Diplad

    hashtag
    Luxtrust

    hashtag
    Luxeid

    hashtag
    EMV

    hashtag
    Crelan

    hashtag
    File exchange

    hashtag
    Error codes coming from v2

    hashtag

    Identity service

    7XXXXX

    Reader service

    8XXXXX

    Proxy

    Input

    X07XXX

    Session

    X08XXX

    PIN

    X09XXX

    PUK

    X10XXX

    Pace

    X11XXX

    Module

    X12XXX

    System

    X13XXX

    I/O

    X14XXX

    Consent

    X15XXX

    Agent

    FunctionNotSupportedException

    XXX005

    FunctionNotAvailableException

    XXX006

    FunctionNotImplementedException

    XXX007

    ServiceNotSupportedException

    XXX008

    ServiceNotAvailableException

    XXX009

    ServiceNotImplementedException

    XXX010

    ReaderException

    XXX011

    ReaderTimeoutException

    XXX012

    ReaderProviderException

    XXX013

    ReaderNotAvailableException

    XXX014

    ReaderCancelledException

    XXX020

    InitialisationException

    XXX021

    DistributionServiceException

    XXX022

    GenericRestException

    XXX023

    JsonParseException

    XXX024

    JWTParseException

    XXX025

    ForbiddenException

    XXX026

    UnauthorisedException

    XXX028

    DeviceKeyStoreMissingException

    XXX029

    ParamRestException

    XXX030

    ProxyServiceException

    XXX031

    InvalidStateException

    XXX032

    DeviceKeyException

    XXX040

    TransactionException

    XXX041

    TransactionNotFoundException

    XXX042

    TransactionNotSupportedException

    XXX043

    TransactionProviderException

    XXX044

    ApplicationLockedException

    XXX045

    PaceLayerException

    XXX046

    TransactionPinBlockedException

    XXX047

    TransactionInvalidPinException

    XXX048

    TransactionPukBlockedException

    XXX049

    TransactionInvalidPukException

    XXX050

    TransactionPinTimeoutException

    XXX051

    TransactionPinCancelledException

    XXX052

    TransactionSignAuthenticateErrorException

    XXX053

    CardProtocolException

    XXX054

    ApduException

    XXX060 - XXX069

    TransactionPukException

    XXX070 - XXX079

    TransactionPinException

    XXX090

    EncryptionException

    XXX100

    CertificateException

    XXX101

    CertificatePinException

    XXX102

    CertificateNotFoundException

    XXX103

    CertificateProviderException

    XXX104

    MetaException

    XXX105

    MetaPinException

    XXX106

    MetaNotFoundException

    XXX107

    MetaProviderException

    XXX110

    PKCS11Exception

    XXX111

    PKCS11ProviderException

    XXX120

    FileExchangeException

    XXX121

    IoException

    XXX123

    AccessException

    XXX124

    TypeException

    XXX125

    EntityException

    XXX126

    ConfigurationException

    XXX127

    ContentException

    XXX128

    AccessReadException

    XXX129

    AccessWriteException

    XXX130

    AccessExecuteException

    XXX131

    FileNotFoundException

    XXX132

    FileAlreadyExistsException

    XXX133

    TypeAlreadyExistsException

    XXX135

    MatrixPrinterException

    XXX140

    NotificationException

    XXX998

    InternalErrorException

    XXX999

    ConnectorNotAvailableException

    XXX501

    ConsentException

    XXX500

    AgentNotFoundException

    XXX200

    InvalidSessionException

    XXX201

    InvalidAtrException

    XXX997

    ClientErrorException (invalid input body or request was send)

    Consent error

    815500

    Agent not found

    104000

    Invalid digest error

    104021

    Error contacting or retrieving info from Distribution service

    104020

    Error initialising T1C

    104030

    Error contacting or getting info from the proxy

    104028

    Device keystore missing

    104027

    DS JWE error

    104026

    Unauthorised

    104027

    Forbidden

    104024

    JWT parsing error

    104023

    JSON parsing error

    100890

    Decryption exception, pin or puk or pace value could not be decrypted

    106997

    Invalid input body or request has been send to the API

    Card error

    302040

    Card error

    402040

    Card error

    602040

    Card error

    206029

    Parameter exception

    208072

    invalid Pin 2 retries remain

    208071

    invalid Pin 1 retry remain

    206046

    Pin blocked

    206047

    invalid pin

    201051

    Pin cancelled

    2015050

    Pin timeout

    209048

    Puk blocked

    209049

    invalid puk

    209062

    Invalid puk 2 retries remain

    209061

    invalid puk 1 retry remain

    202010

    Card not present

    302010

    Card not present

    602010

    Card not present

    Card error

    302040

    Card error

    402040

    Card error

    602040

    Card error

    206029

    Parameter exception

    208072

    invalid Pin 2 retries remain

    208071

    invalid Pin 1 retry remain

    206046

    Pin blocked

    206047

    invalid pin

    201051

    Pin cancelled

    2015050

    Pin timeout

    202010

    Card not present

    302010

    Card not present

    602010

    Card not present

    Card error

    302040

    Card error

    402040

    Card error

    602040

    Card error

    206029

    Parameter exception

    208072

    invalid Pin 2 retries remain

    208071

    invalid Pin 1 retry remain

    206046

    Pin blocked

    206047

    invalid pin

    201051

    Pin cancelled

    2015050

    Pin timeout

    202010

    Card not present

    302010

    Card not present

    602010

    Card not present

    Card error

    302040

    Card error

    402040

    Card error

    602040

    Card error

    206029

    Parameter exception

    208072

    invalid Pin 2 retries remain

    208071

    invalid Pin 1 retry remain

    206046

    Pin blocked

    206047

    invalid pin

    201051

    Pin cancelled

    2015050

    Pin timeout

    202010

    Card not present

    302010

    Card not present

    602010

    Card not present

    Card error

    302040

    Card error

    402040

    Card error

    602040

    Card error

    206029

    Parameter exception

    208072

    invalid Pin 2 retries remain

    208071

    invalid Pin 1 retry remain

    206046

    Pin blocked

    206047

    invalid pin

    201051

    Pin cancelled

    2015050

    Pin timeout

    202010

    Card not present

    302010

    Card not present

    602010

    Card not present

    Card error

    302040

    Card error

    402040

    Card error

    602040

    Card error

    206029

    Parameter exception

    208074

    invalid Pin 4 retries remain

    208073

    invalid Pin 3 retries remain

    208072

    invalid Pin 2 retries remain

    208071

    invalid Pin 1 retry remain

    206046

    Pin blocked

    206047

    invalid pin

    201051

    Pin cancelled

    2015050

    Pin timeout

    202010

    Card not present

    302010

    Card not present

    602010

    Card not present

    Card error

    302040

    Card error

    402040

    Card error

    602040

    Card error

    206029

    Parameter exception

    208074

    invalid Pin 4 retries remain

    208073

    invalid Pin 3 retries remain

    208072

    invalid Pin 2 retries remain

    208071

    invalid Pin 1 retry remain

    206046

    Pin blocked

    206047

    invalid pin

    201051

    Pin cancelled

    2015050

    Pin timeout

    209048

    Puk blocked

    209049

    invalid puk

    209064

    Invalid puk 4 retries remain

    209063

    Invalid puk 3 retries remain

    209062

    Invalid puk 2 retries remain

    209061

    invalid puk 1 retry remain

    202010

    Card not present

    302010

    Card not present

    602010

    Card not present

    Card error

    302040

    Card error

    402040

    Card error

    602040

    Card error

    206029

    Parameter exception

    208072

    invalid Pin 2 retries remain

    208071

    invalid Pin 1 retry remain

    206046

    Pin blocked

    206047

    invalid pin

    201051

    Pin cancelled

    2015050

    Pin timeout

    202010

    Card not present

    302010

    Card not present

    602010

    Card not present

    Card error

    302040

    Card error

    402040

    Card error

    602040

    Card error

    206029

    Parameter exception

    208072

    invalid Pin 2 retries remain

    208071

    invalid Pin 1 retry remain

    206046

    Pin blocked

    206047

    invalid pin

    201051

    Pin cancelled

    2015050

    Pin timeout

    202010

    Card not present

    302010

    Card not present

    602010

    Card not present

    Execute rights missing

    513124

    Type error

    513125

    Entity error

    513127

    Content error / file not found

    503140

    Notification error, when a OS dialog returns an error

    513131

    File not found

    513132

    File already exists

    Source '/Users/gilles/Desktop/fileextest/test.plist' does not exist

    355

    503140

    No valid dir path returned, no valid file path returned, Timeout, No PIN entered

    356

    513124

    No Type with name test was found in entity with name testEnt,

    357

    513124

    type with name testType already exists

    358

    513131 or 513132

    FIle not found or File already exists

    359

    not applicable

    360

    513125

    Entity with name testEnt already exists

    361

    513125

    No Entity with name testEnt was found

    /

    505126

    No configuration found (file-exchange config file is missing/deleted…)

    Error

    Origin

    1XXXXX

    General

    2XXXXX

    Transaction service

    3XXXXX

    Certificate service

    4XXXXX

    Meta service

    5XXXXX

    File exchange

    Error

    Type

    X01XXX

    Reader

    X02XXX

    Card

    X03XXX

    Notification

    X04XXX

    Security

    X05XXX

    Configuration

    Code

    Exception type

    10000

    GeneralConnectorException

    XXX000

    InvalidDigestException

    XXX001

    ModuleNotSupportedException

    XXX002

    ModuleNotAvailableException

    XXX003

    ModuleNotImplementedException

    Error code

    Description

    111003

    Module not implemented

    106029

    Parameter error

    105126

    Configuration error

    112031

    Invalid T1C state error

    104025

    Forbidden exception

    Error code

    Description

    312998

    Module not implemented

    611004

    Parameter error

    411004

    Invalid T1C state error

    212998

    Forbidden exception

    211004

    Function not supported

    Error code

    Description

    312998

    Module not implemented

    611004

    Parameter error

    411004

    Invalid T1C state error

    212998

    Forbidden exception

    211004

    Function not supported

    Error code

    Description

    312998

    Module not implemented

    611004

    Parameter error

    411004

    Invalid T1C state error

    212998

    Forbidden exception

    211004

    Function not supported

    Error code

    Description

    312998

    Module not implemented

    611004

    Parameter error

    411004

    Invalid T1C state error

    212998

    Forbidden exception

    211004

    Function not supported

    Error code

    Description

    312998

    Module not implemented

    611004

    Parameter error

    411004

    Invalid T1C state error

    212998

    Forbidden exception

    211004

    Function not supported

    Error code

    Description

    312998

    Module not implemented

    611004

    Parameter error

    411004

    Invalid T1C state error

    212998

    Forbidden exception

    211004

    Function not supported

    Error code

    Description

    312998

    Module not implemented

    611004

    Parameter error

    411004

    Invalid T1C state error

    212998

    Forbidden exception

    211004

    Function not supported

    Error

    Description

    312998

    Module not implemented

    611004

    Parameter error

    411004

    Invalid T1C state error

    212998

    Forbidden exception

    211004

    Function not supported

    Error

    Description

    312998

    Module not implemented

    611004

    Parameter error

    411004

    Invalid T1C state error

    212998

    Forbidden exception

    211004

    Function not supported

    Error

    Description

    505126

    Configuration error / none is found

    504123

    Access exception/ not enough access rights - General error

    513121

    I/O error

    504128

    Read rights missing

    504129

    Write rights missing

    Old code

    New code

    example description

    351

    504128

    /Library/Updates/ProductMetadata2.plist (Operation not permitted)

    352

    504129

    /Library/Updates/ProductMetadata2.plist (Operation not permitted)

    353

    504130

    /Library/Updates/ProductMetadata2.plist (Operation not permitted)

    354

    6XXXXX

    X06XXX

    XXX004

    814501

    202040

    202040

    202040

    202040

    202040

    202040

    202040

    202040

    202040

    504130

    513121

    {
      description: "some error description",
      code: "some error code"
    }
    

    Authenticated client

    circle-exclamation

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

    hashtag
    Introduction

    The Trust1Connector API requires a valid JWT token to be provided in the Authorization header. This JWT token can be retrieved by asking the Distribution Service to generate a token for a specific API-key. It is important that this API-key is not exposed in the front-end application as this is a security violation.

    When you've received a valid JWT token from the DS you can provide this into the configuration object when initialising the Trust1Connector JS client.

    When using the Trust1Connector Javascript SDK the Authorization header is automatically populated with the JWT provided while initialising.

    When the Token has expired there is a function which you can call to provide a new token and which will in turn return an updated client to be used.

    hashtag
    Retrieving a JWT token

    Retrieving a valid JWT token happens via the DS. When passing a valid API-key to header of the endpoint {{ds-url}}/v3/tokens/application (GET) you wil in turn receive a valid JWT token.

    Example response

    hashtag
    Refresh JWT token

    circle-exclamation

    Refreshing the JWT token can only be done after a first successfull initialisation of the Trust1Connector. This means the Trust1Connector has to be initialised with a valid configuration the first time. When the token expires after first successfull initialisation you can use the refreshJWT function described below

    A JWT token is only valid for a certain period. After this period the API will return an error. At this point you need to request a new JWT token to be able to communicate with the API.

    In the T1C JS SDK there is a function which you can use to re-initalise the client with a new valid JWT token. This should be done when you receive a 104026 error-code which means you do not have a valid JWT

    The updateJWT function can be found in the Core service. After initialising you can retrieve the core as follows:

    The function's interface is as follows;

    This function returns an updated client which you can continue to use for your desired use-cases.

    Integration in Web Applications

    A Web Application interacts with the Trust1Connector on standalone devices or within a shared environment. The Web Application is not aware, but must take this into consideration upon integration.

    circle-exclamation

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

    Integrating the Trust1Connector can be done via the Javascript SDK. This SDK is compiled in regular javascript and in Typescript. Each release of the Javascript SDK will have the following files;

    • dist

      • T1CSdk.js (complete SDK)

      • T1CSdk.js.map

    • lib (typings, default Typescript compilation)

    • lib-esm (typings, Compilation with ES6 module support)

    In V3 of the Trust1Connector the javascript SDK is meant as a comparable manner of integrating like the V2. The SDK includes most of the API featureset but not all.

    We strongly encourage to integrate via the API, since this will be the most feature-complete and the de-facto way of integration in the future.

    circle-info

    All examples below will be shown in regular Javascript. All Javascript for changing UI will not be present but are purely displayed as part of the example.

    hashtag
    Initialising the Trust1Connector

    For initialisation of the T1C you need to prepare your application first by adding the SDK JS files to your project and importing them in such a way that you can call for the Javascript functions when you need them.

    Next up we will prepare the SDK's configuration Object, this object is used to pass information about which default port the Trust1Connector is running on, JWT key, API url, ...

    When the configuration is set you can initialise the Trust1Connector with that Config and an optional property for clipboardData. This clipboard data is used for initialisation of the Trust1Connector in a shared environment. This will be handled later.

    You can see in the code above we catch 3 errors;

    • 814501: Consent error, this means the user is running in a shared environment and needs to provide his consent

    • 812020: Initialisation error: The Trust1Connector is not able to initialise because it could not find any users with a Trust1Connector installed.

    • 112999: T1C exception, this will be thrown when the T1C is not available, where you can display an URL where the user can

    hashtag
    Readers

    To retrieve the reader after initialisation you can do the following;

    hashtag
    Initialisation of a module

    After initialisation of the T1C you can start using it. For example the BEID module needs to be initialised with a readerId, That is why fetching the readers and providing the user-selected reader to the client is a necessity.

    The code above will return a BEID client which can be used to execute the BEID functionality.

    hashtag
    Shared environments

    Initialisation of the Trust1Connector for shared environments is similar to the regular initialisation with the difference being a required consent. More information can be found in the page.

    For initialising the Trust1Connector in a shared environment you need to setup the config so that it contacts the Proxy. When initialising you need to provide a token that is residing on the user's clipboard, via this clipboard token the Proxy can determine which which user is trying to communicate and will return an updated configuration value for the API and the sandbox service.

    This configuration update is handled by the SDK itself.

    The code above is an example of how you can integrate a copy command in the webbrowser. When the data is copied to the clipboard you just need to pass it to the initialize function like so;

    Downloading latest Trust1Connector

    hashtag
    Downloading Trust1Connector

    The T1C JS SDK no longer has a method to download the T1C installer.

    Instead, the T1C installer can be downloaded by navigating the client browser to the /v3/downloads/installer endpoint of the Distribution Service (e.g. https://acc-ds.t1t.io/v3/downloads/installer). The Distribution Service will analyse the User-Agent header and automatically initiate the download of an OS-appropriate installer of the latest configured version. The user agent string parsing is considered "best-effort"; as they can vary wildly depending OS and browser software.

    Alternatively, you can also initiate the download of a T1C installer with the following endpoints:

    1. /v3/downloads/installers/{{OS}}: This endpoint allows you to specify the OS for which you wish to obtain an installer. The possible values are win32, win64, unix, macos.

    2. /v3/downloads/installers/{{OS}}/versions/{{version}}: This endpoint allows you to download a specific version of a T1C installer for a specific OS.

    hashtag
    Distribution services

    Generic token

    circle-exclamation

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

    hashtag
    Introduction

    The Generic token interface is an interface used to integrate all supported tokens. This interface relies on the fact that you will need to provide a valid module. The module suggested from the reader response can be used here.

    hashtag
    Interface

    hashtag
    Models

    All model information can be found in the

    hashtag
    Initialise the Trust1Connector JS

    Initialise a Trust1Connector client with a valid configuration:

    hashtag
    Obtain the Reader information

    In order to get all connected card-readers, with available cards:

    This function call returns:

    As you can see in the response we get a property suggestedModule which is returned based on the card, reader and AID information. This suggested module can be used in the generic interface.

    Using the generic interface can be done as follows;

    The pin and pinType are optional and are used for unlocking the pace layer (if the card is protected with a pace layer).

    At this point for each use-case you will need to provide the module. This can be manually defined or be retrieved from the suggestedModule property in the reader-response. In the examples below we provide the module as a variable module

    hashtag
    Cardholder Information

    The card holder is the person identified using the Belgian eID card. It's important to note that all data must be validated in your backend. Data validation can be done using the appropriate certificate (public key).

    hashtag
    Biometric data

    Contains all card holder related data, excluding the card holder address and photo. The service can be called:

    An example callback:

    Response:

    hashtag
    Address

    Contains the card holder's address. The service can be called:

    Response:

    hashtag
    Picture

    Contains the card holder's picture stored on the smart card. The service can be called:

    Response:

    hashtag
    Token info

    The token info contains generic information about the card and it's capabilities. This information includes the serial number, file types for object directory files, algorithms implemented on the card, etc.

    Response

    hashtag
    Certificates

    Exposes all the certificates publicly available on the smart card.

    hashtag
    Root Certificate

    Contains the 'root certificate' stored on the smart card. The root certificate is used to sign the 'citizen CA certificate'. When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not. The service can be called:

    Response:

    hashtag
    Authentication Certificate

    Contains the 'authentication certificate' stored on the smart card. The 'authentication certificate' contains the public key corresponding to the private RSA authentication key. The 'authentication certificate' is needed for pin validation and authentication. When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not The service can be called:

    Response:

    hashtag
    Intermediate Certificate (citizen)

    Contains the citizen certificate stored on the smart card. The 'citizen certificate' is used to sign the 'authentication certificate' and the 'non-repudiation certificate'. When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not The service can be called:

    Response:

    hashtag
    Non-repudiation Certificate

    Contains the 'non-repudiation certificate' stored on the smart card. The 'non-repudiation certificate' contains the public key corresponding the private RSA non-repudiation key. When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not The service can be called:

    Response:

    hashtag
    Encryption Certificate (RRN)

    Contains the 'encryption certificate' stored on the smart card. The 'encryption certificate' corresponds to the private key used to sign the 'biometric' and 'Address' data. When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not The service can be called:

    Response:

    hashtag
    Data Filter

    hashtag
    Filter Card Holder Data

    All data on the smart card can be dumped at once, or using a filter. In order to read all data at once:

    Response:

    The filter can be used to ask a list of custom data containers. For example, we want to read only the biometric data

    Response:

    hashtag
    Filter Certificates

    All certificates on the smart card can be dumped at once, or using a filter. In order to read all certificates at once:

    Response:

    The filter can be used to ask a list of custom data containers. For example, we want to read only the rootCertificate

    Response:

    hashtag
    Sign Data

    Data can be signed using the Belgian eID smart card. To do so, the T1C-GCL facilitates in:

    • Retrieving the certificate chain (citizen-certificate, root-certificate and non-repudiation certificate)

    • Perform a sign operation (private key stays on the smart card)

    • Return the signed hash

    To get the certificates necessary for signature validation in your back-end:

    Response:

    Depending on the connected smart card reader. A sign can be executed in 2 modes:

    • Using a connected card reader with 'pin-pad' capabilities (keypad and display available)

    • Using a connected card reader without 'pin-pad' capabilities (no keypad nor display available)

    Security consideration: In order to sign a hash, security considerations prefer using a 'pin-pad'.

    hashtag
    Sign Hash without pin-pad

    When the web or native application is responsible for showing the password input, the following request is used to sign a given hash:

    Response is a base64 encoded signed hash:

    The 'authenticationreference' property can contain the following values: sha1, sha256, sha512, md5.

    hashtag
    Sign Hash with pin-pad

    When the pin entry is done on the pin-pad, the following request is used to sign a given hash:

    Response is a base64 encoded signed hash:

    The 'algorithm_reference' property can contain the following values: sha1, sha256, sha512, md5.

    The core services lists connected readers, and if they have pin-pad capability. You can find more information in the Core Service documentation on how to verify card reader capabilities.

    hashtag
    Bulk Signing

    It is possible to bulk sign data without having to re-enter the PIN by adding an optional bulk parameter set to true to the request. Subsequent sign requests will not require the PIN to be re-entered until a request with bulk being set to false is sent, or the method is called.

    triangle-exclamation

    When using bulk signing, great care must be taken to validate that the first signature request was successful prior to sending subsequent requests. Failing to do this will likely result in the card being blocked.

    hashtag
    Bulk PIN Reset

    The PIN set for bulk signing can be reset by calling this method.

    Response will look like:

    hashtag
    Verify PIN

    hashtag
    Verify PIN without pin-pad

    When the web or native application is responsible for showing the password input, the following request is used to verify a card holder PIN:

    Response:

    hashtag
    Verify PIN with pin-pad

    When the pin entry is done on the pin-pad, the following request is used to verify a given PIN:

    Response:

    hashtag
    Authentication

    The T1C-GCL is able to authenticate a card holder based on a challenge. The challenge can be:

    • provided by an external service

    • provided by the smart card An authentication can be interpreted as a signature use case, the challenge is signed data, that can be validated in a back-end process.

      External Challenge

      An external challenge is provided in the data property of the following example:

    Response:

    Take notice that the PIN property can be omitted when using a smart card reader with pin-pad capabilities.

    hashtag
    Get valid algorithms to use for Sign or Authenticate

    Via the Trust1Connector modules you are able to retrieve available algorithms to use for Signing or Authenticate

    The response you can expect is a list of algorithms, an example can be found below (the values below are purely examplatory)

    Core Service

    circle-exclamation

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

    hashtag
    Introduction

    The Trust1Connector core services address communication functionality with local devices. The Trust1Connector core exposes 2 main interfaces:

    • interface for web/native applications using JavaScrip/Typescript

    • REST API as a new approach and to incorporate the Trust1Connector as a microservice in the application architecture

    In this guide, we target only the use of Trust1Connector's core interface for web/native applications. The T1C-SDK-JS exposes protected resources for administration and consumer usage.

    The JavaScript library must be initialized with a correct token in order to access the all resource. The security policy for Trust1Connector v3 secured ALL endpoints.

    hashtag
    Administration resources

    Protected resources are administration resources. The JavaScript library must be initialized with a correct token in order to access the resource.

    • Download Trust1Connector installer

    • Get Information of the device and user context

    • Register T1C for device

    Executing these functionality is explained further.

    hashtag
    Consumer resources

    Consumer resources are typically used from an application perspective:

    • Get pub-key certificate

    • Get version

    • Get Information (operating system, runtime, user context, variable configuration)

    Executing these functionality is explained further.

    hashtag
    Core Functionalities

    The Trust1Connector functionalities are about secured communication with device hardware. The document highlights communication with smart card readers - contact and contact-less. Other hardware devices can be enabled or integrated as well in the solution. Some of the already are, for example printer drivers, signature tablet drivers, ...

    hashtag
    Initialize the client library

    The client can be initialized by passing a T1CConfig object in the constructor

    hashtag
    List card readers

    Returns a list of available card readers. Multiple readers can be connected. Each reader is identified by a unique reader_id.

    The response will contains a list of card readers:

    When multiple readers are attached to a device, the response will show all connected card readers:

    Important to notice:

    • The response adds a card-element when a card is inserted into the card reader.

    • The response contains card-reader pin-pad capabilities

    hashtag
    Card Inserted

    As mentioned in the List card-readers, when a smart-card is inserted/detected, the reader will contain the cart-type based on the ATR. The ATR (Anwser To Reset), is the response from any smart-card when powered, and defines the card type. The Trust1Connector recognized more than 3k smart-card types.

    hashtag
    Pin-Pad Capabilities

    As mentioned in the List card-readers, when a card-reader has pin-pad capabilities, this will be mentioned in the response (notice the pinpadproperty):

    hashtag
    List Card-Readers - Explained Example

    The following example is the response for List card-readers on a device with 4 different card-readers attached:

    In the above example you notice that 4 card-readers are connected. Each card-reader receives his temporary id which can be used for other functions where a card-reader id is needed. This method can be requested in order to list all available card-readers, and optional cards-inserted. Each card-reader has a vendor provided name, which is retrieved from the card-reader itself. An additional property pinpad, a boolean value, denotes if the card-reader has pin-pad capabilities. A pin-pad is a card-reader, most of the times with its own display and key-pad. From a security perspective, it's considered best practice to use as much as possible pin-pad capabilities of a pin-pad card-reader. When a reader has a smart-card inserted (contact interface) or detected (contactless interface), the card type will be resolved by the GCL in order to respond with a meaningful type. In the above examples you see that; one card-reader has a Belgian eID card; another card-reader has a MisterCash or VISA Card available for interaction.

    The readers returned, are the card-readers with a card available. The card-readers where no card is presented, are ignored.

    hashtag
    Get card reader with card inserted

    Returns a list of available card readers with a smart card inserted. Multiple readers can be connected with multiple smart cards inserted. Each reader is identified by a unique reader_id and contains information about a connected smart card. A smart card is of a certain type. The Trust1Connector detects the type of the smart card and returns this information in the JSON response.

    Response:

    hashtag
    Get device public key

    via the getDevicePublicKey endpoint you're able to fetch the public key information of the device. This requires an authenticated client to be able to access this endpoint.

    This endpoint is used in the library to encrypt pin, puk and pace information so that it is not exposed in the network logs of the browser.

    Encryption of pin, puk and pace is only possible when the Trust1Connector is registered via a DS and has a valid device key-pair. The SDK will automatically switch to send the pin, puk or pace info in clear text if its not able to encrypt. The Trust1Connector API will also detect if it has no valid device key-pair it will not try to decrypt the incoming pin, puk or pace information.

    hashtag
    Core interface

    Troubleshooting

    hashtag
    Windows

    hashtag
    Error while retrieving readers

    hashtag
    Is the smartcard service running?

    The Smartcard service is a Windows service that manages the connection to the eID and card reader. Therefore, this service must be running for you to be able to access the eID. You can check this as follows:

    • Open "Windows Services".

    • Search for "Smartcard service" as shown in the following screenshot:

    Check the following Smartcard service settings (based on the screenshot above):

    • The status column for the Smartcard service shows 'Running'.

    • The 'Log On As' column shows 'Local Service'.

    Are the Smartcard service settings NOT as they should be? Then do whichever of the following two options applies:

    1. The Smartcard service is not running.

    Start the Smartcard service, as follows:

    • Double-click the Smartcard service.

    • Click 'Start' and then 'OK'.

    2. The Smartcard service is not logged on as a 'Local Service'.

    • Double-click the Smartcard service.

    • Select the second tab, 'Log On'.

    • Select 'This account'.

    • In the white text box, type: loc.

    • Then click 'Check names'.

    • The name 'Local service' now appears in the text box.

    • Then click 'OK'.

    • Leave the password boxes empty.

    Idemia Cosmo One v8.2

    circle-exclamation

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

    hashtag
    Introduction

    Token typing models

    circle-exclamation

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

    hashtag
    Introduction

    Environment

    DS url

    Acceptance

    https://acc-ds.t1t.io

    Production

    https://ds.t1t.io

    download the T1C
    Consent
    Token typings model page
    Bulk Sign Reset

    Update T1C on device (install new version)

  • Update DS (distribution server) metadata

  • Increment use case counter

  • List card-readers
  • List modules

  • Get module

  • Get card-reader

  • Get card-reader with cards inserted

  • Get card-readers without card

  • Get consent (needed for shared environments)

  • Detect card for card-reader (polling utility resource)

  • Detect any card (polling utility resource)

  • Detect card-readers (polling utility resource)

  • Browser Information (utility resource)

  • The ID-One Cosmo V8-n is part of the Idemia IAS ECC family of cryptographic modules called ID-One Cosmo V8. Modules within this family share the same functionalities and the description of the ID-One Cosmo V8 applies to all versions including the “-n” subject to this validation. This document describes the functionality provided by the Idemia IAS ECC ID-One smartcard - which is a PKI container - on the T1C-GCL (Generic Connector Library) implemented version:
    • ID-One Cosmo V8-n; FIPS 140-2 Security Policy

    hashtag
    Interface

    hashtag
    Models

    All model information can be found in the Token typings model page

    hashtag
    Examples

    hashtag
    Create the Idemia module

    When initialisation is finished you can continue using the aventra object to execute the functions below.

    hashtag
    All certificate filters

    The expected response for this call should be;

    hashtag
    all Key references

    The expected response for this call should be;

    hashtag
    all Certificates

    When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not.

    The expected response for this call should be;

    hashtag
    Token data

    This will return information of the Aventra card.

    The expected response for this call should be;

    hashtag
    Certificate

    When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not.

    hashtag
    Root certificate

    Contains the 'root certificate' stored on the smart card. The service can be called:

    hashtag
    Authentication certificate

    Contains the 'authentication certificate' stored on the smart card. The 'authentication certificate' contains the public key corresponding to the private RSA authentication key. The 'authentication certificate' is needed for pin validation, authentication and singing. The service can be called:

    hashtag
    Non repudiation certificate

    Contains the 'non-repudiation certificate' stored on the smart card. The 'non-repudiation certificate' contains the public key corresponding the private RSA non-repudiation key. The service can be called:

    hashtag
    Issuer certificate

    hashtag
    Encryption certificate

    The expected response for these calls should be in the following format;

    hashtag
    Verify pin

    The expected response for these calls should be in the following format;

    hashtag
    Sign

    Data can be signed using the smartcard. To do so, the SDK facilitates in:

    • Retrieving the certificate chain (root, intermediate and non-repudiation certificate)

    • Perform a sign operation (private key stays on the smart card)

    • Return the signed hash

    To sign data, an algorithm must be specified in the algorithm property (see Supported Algorithms), and a Base64-encoded string representation of the digest bytes of the same algorithm in the data property.

    Additionally, it is possible to bulk sign data without having to re-enter the PIN by adding an optional bulk parameter set to true to the request. Subsequent sign requests will not require the PIN to be re-entered until a request with bulk being set to false is sent, or the Bulk PIN Reset method is called.

    triangle-exclamation

    When using bulk signing, great care must be taken to validate that the first signature request was successful prior to sending subsequent requests. Failing to do this will likely result in the card being blocked.

    The expected response for this call should be;

    hashtag
    Bulk PIN Reset

    The PIN set for bulk signing can be reset by calling this method.

    Response will look like:

    hashtag
    Authenticate

    The SDK is able to authenticate a card holder based on a challenge. The challenge can be:

    • provided by an external service

    • provided by the smart card An authentication can be interpreted as a signature use case, the challenge is signed data, that can be validated in a back-end process

    The expected response for this call should be;

    hashtag
    Retrieve supported algorithms

    The expected response for this call should be;

    This page describes all generic token models used.

    hashtag
    Models

    // Config object definition
    export class T1CConfigOptions {
      constructor(
        public t1cApiUrl?: string,
        public t1cApiPort?: string,
        public t1cProxyUrl?: string,
        public t1cProxyPort?: string,
        public jwt?: string
      ) {}
    }
    
    
    
    // example
    const configoptions = new T1CSdk.T1CConfigOptions(
      environment.t1cApiUrl,
      environment.t1cApiPort,
      environment.t1cProxyUrl,
      environment.t1cProxyPort,
      environment.jwt
    );
    config = new T1CSdk.T1CConfig(configoptions);
    curl --location --request GET 'https://acc-ds.t1t.io/v3/tokens/application' \
    --header 'apikey: your-api-key'
    {
        "success": true,
        "data": "eyJraWQiOiJ0MWNkcyIsImFsZyI6IlJTMjU2In0.eyJpc3MiOiJ0MWNkcy1hcHAiLCJzdWIiOiJkZXZlbG9wbWVudCIsImV4cCI6MTU5OTA1MTExMywiaWF0IjoxNTk5MDQ5OTEzLCJuYmYiOjE1OTkwNDk5MDh9.LE_AdYv9PWxqSRm6-lkV_3TxInCqbf_hTwHFKCFfYwkuzex6AMkeW6FaVCOxu-EBU158S2g70i4VBpeT2TAr0IoOyjK-nalvVG5aB9MwidZMtiPlidcUfsDhsyhbhwqlhI2dzB5J5KsBmvZwpoG-Pg2koUSidruixg3SxRrCMotBRlRNKItnYgfs6_wvd_OOLXs2OlufYOD876MWcJymBK48wf9ESQ50clR3zwPAQsNnXFq2Augk0gOlCgWO1--WgaFeMnBF28b7genZXIkwZCfT82nRYtiOs0zLK2WtyireTHDgjIZif4nX8pggE7t_63Hbv8wCvv8_Mg2PfdhCMQ"
    }
    const configoptions = new T1CSdk.T1CConfigOptions(
      environment.t1cApiUrl,
      environment.t1cApiPort,
      environment.t1cProxyUrl,
      environment.t1cProxyPort,
      environment.jwt
    );
    config = new T1CSdk.T1CConfig(configoptions);
    
    T1CSdk.T1CClient.initialize(config).then(res => {
            client = res;
            console.log("Client config: ", client.localConfig)
            core = client.core();
        }, err => {});
    updateJWT(jwt: string, callback?: (error: T1CLibException, data?: T1CClient) => void): Promise<T1CClient>
    core.updateJWT("jwt").then(client => {}, error => {});
    let environment = {
        t1cApiUrl: 'https://t1c.t1t.io',
        t1cApiPort: '51983',
        t1cProxyUrl: 'https://t1c.t1t.io',
        t1cProxyPort: '51983',
        jwt: '' // retrieve via Back-end
    };
    
    const configoptions = new T1CSdk.T1CConfigOptions(
            environment.t1cApiUrl,
            environment.t1cApiPort,
            environment.t1cProxyUrl,
            environment.t1cProxyPort,
            environment.jwt
        );
    config = new T1CSdk.T1CConfig(configoptions);
    T1CSdk.T1CClient.initialize(config).then(res => {
            client = res;
            console.log("Client config: ", client.localConfig);
            core = client.core();
            core.version().then(versionResult => console.log("T1C running on core "+ versionResult));
        }, err => {
            else if (err.code == 814501) {
                $('#consentModal').modal('show', {
                    keyboard: false
                });
                $('.consent-token').text(makeid(20));
            }
            else if (err.code == 812020) {
                $('.consent-token').text(makeid(20));
            }
            else if(err.code == 112999) {
                document.querySelector("#initAlert").classList.remove("d-none")
                document.querySelector("#initAlert").innerHTML = err.description;
            } else {
                console.error("T1C error:", err)
            }
        });
    core.readersCardAvailable().then(res => {
        //Reader response
    }, err => {
        console.log("Cards available error:", err)
    })
    function getBeid() {
        if(selected_reader === null || selected_reader === undefined) return undefined
        else return client.beid(selected_reader.id);
    }
    const tokenNode = document.querySelector('.consent-token');
    var range = document.createRange();
    range.selectNode(tokenNode);
    window.getSelection().addRange(range);
    try {
        // Now that we've selected the anchor text, execute the copy command
        document.execCommand('copy');
    } catch(err) {
        console.log('Oops, unable to copy');
    }
    
    // Remove the selections - NOTE: Should use
    // removeRange(range) when it is supported
    window.getSelection().removeRange(range);
    const clipboardData = tokenNode.textContent;
    
    T1CSdk.T1CClient.initialize(config).then(res => {
        // initialised
    }, err => {
        // Error handeling
    })
    export interface AbstractEidGeneric {
      getModuleDescription(module: string, callback?: (error: T1CLibException, data: DataObjectResponse) => void): Promise<DataObjectResponse>;
      allData(module: string, filters?: string[] | Options, callback?: (error: T1CLibException, data: TokenAllDataResponse) => void): Promise<TokenAllDataResponse>;
      allCerts(module: string, parseCerts?: boolean,  filters?: string[] | Options, callback?: (error: T1CLibException, data: TokenAllCertsResponse) => void): Promise<TokenAllCertsResponse>;
      biometric(module: string, callback?: (error: T1CLibException, data: TokenBiometricDataResponse) => void): Promise<TokenBiometricDataResponse>;
      tokenData(module: string, callback?: (error: T1CLibException, data: TokenDataResponse) => void): Promise<TokenDataResponse>;
      address(module: string, callback?: (error: T1CLibException, data: TokenAddressResponse) => void): Promise<TokenAddressResponse>;
      picture(module: string, callback?: (error: T1CLibException, data: TokenPictureResponse) => void): Promise<TokenPictureResponse>;
      rootCertificate(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      intermediateCertificates(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      authenticationCertificate(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      nonRepudiationCertificate(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      encryptionCertificate(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      verifyPin(module: string, body: TokenVerifyPinData, callback?: (error: T1CLibException, data: TokenVerifyPinResponse) => void): Promise<TokenVerifyPinResponse>;
      authenticate(module: string, body: TokenAuthenticateOrSignData, callback?: (error: T1CLibException, data: TokenAuthenticateResponse) => void): Promise<TokenAuthenticateResponse>;
      sign(module: string, body: TokenAuthenticateOrSignData, bulk?: boolean, callback?: (error: T1CLibException, data: TokenSignResponse) => void): Promise<TokenSignResponse>;
      allAlgoRefs(module: string, callback?: (error: T1CLibException, data: TokenAlgorithmReferencesResponse) => void): Promise<TokenAlgorithmReferencesResponse>
      resetBulkPin(module: string, callback?: (error: T1CLibException, data: BoolDataResponse) => void): Promise<BoolDataResponse>;
    }
    T1CSdk.T1CClient.initialize(config).then(res => {
        client = res;
    }, err => {
        console.error(error)
    });
    var core = client.core();
    core.readersCardAvailable(callback);
    {
      "data": [
        {
          "card": {
            "atr": "3B9813400AA503010101AD1311",
            "description": ["Belgian eID Card"]
          },
          "id": "57a3e2e71c48cee9",
          "name": "Bit4id miniLector",
          "pinpad": false,
          "suggestedModule": "beid"
        }
      ],
      "success": true
    }
    var generic = client.generic(selected_reader.id, pin, pinType);
    generic.biometric(module, options, callback);
    function callback(err,data) {
        if(err){
            console.log("Error:",JSON.stringify(err, null, '  '));
        }
        else {
            console.log(JSON.stringify(data, null, '  '));
        }
    }
    {
     "birthDate": "15 JUL  1993",
     "birthLocation": "Roeselare",
     "cardDeliveryMunicipality": "Avelgem",
     "cardNumber": "592..8233",
     "cardValidityDateBegin": "27.05.2015",
     "cardValidityDateEnd": "27.05.2025",
     "chipNumber": "U0xHk...EstwAjEpJQQg==",
     "documentType": "01",
     "firstNames": "Gilles Frans",
     "name": "Platteeuw",
     "nationalNumber": "930...154",
     "nationality": "Belg",
     "nobleCondition": "",
     "pictureHash": "Fqva9YCp...JKyn8=",
     "rawData": "AQw1OTIxMjQwNTgy...TARFBar2vWAqTW+axEIuyskBgFySsp/",
     "sex": "M",
     "signature": "hKys9WMjUm4ipg...14xUCg/98Y9/gP/vgG7JTRZJoKgDXLLTvLZO4qlfA==",
     "specialStatus": "0",
     "thirdName": "J",
     "version": "0"
    }
    generic.address(module, callback);
    {
     "municipality": "Hoeselt",
     "rawData": "ARJLZXJrc...AAAAAA==",
     "signature": "mhPyeRg25H...w==",
     "streetAndNumber": "Kerkstraat X",
     "version": "0",
     "zipcode": "3730"
    }
    generic.picture(module, callback);
    {
      "data": "/9j/4AAQSkZJRgABA...59aVpcklSDzyKUTEDGK//9k=",
      "success": true
    }
    {
      "data": {
        "eid_compliant":48,
        "electrical_perso_interface_version":0,
        "electrical_perso_version":3,
        "graphical_perso_version":7,
        "label":"BELPIC",
        "prn_generation":4,
        "raw_data":"MCcCAQAEEFNMSU4z...JFTFBJQwMCBDCeBAcDAAA=",
        "serial_number":"534C494E..1231C",
        "version":0,
        "version_rfu":0
        },
        "success": true
    }
    generic.rootCertificate(module, parseCertsBoolean, callback);
    {
     "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
     "parsedCertificate": {...}
    }
    generic.authenticationCertificate(module, parseCertsBoolean, callback);
    {
     "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
      "parsedCertificate": {...}
    }
    generic.intermediateCertificates(module, parseCertsBoolean, callback);
    {
     "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
      "parsedCertificate": {...}
    }
    generic.nonRepudiationCertificate(module, parseCertsBoolean, callback);
    {
     "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
      "parsedCertificate": {...}
    }
    generic.encryptionCertificate(module, parseCertsBoolean, callback);
    {
     "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
      "parsedCertificate": {...}
    }
    var filter = [];
    generic.allData(module, { filters: filter}, callback);
    {
     "picture": {
      "picture": "/9j/4AAQSkZJRgABAgEBLAEsAAD/.../wAALCADIAIwBAREA/8QA0gAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoLEAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/2gAIAQEAAD8A9JpKKWiikooooopaKSilooooopKr3d9bWaFriVEwM4J5Ncjq3jUxkixQADozjJNcze+L9WndWF20OOCI/lzRb+KtYjhIN67Z7vyf1qT/AIS3Wc5F2OnQgY/lWrovjC7hYLqJ86IkksPvCustPEumXbbUuAjYzh+K1UkWRA6MGU9CDkGn0UUUUUUUhOBk8CuY1zxOls/kWjbnH3pAMgewrz7VtWmu7gvJIzZ65NZk1wSBjOagWbn5lB+vagy7+2KlilUE7eRj1qS3ncSEE4X3qwzNs81Dgg9K19G8VXumTLFv8yDOWjb+len6bqMGp2qz2zZU8Ed1PpVyiiiiio5pkgiaSRgqKMkmuH8ReKXlMlpAAkHRnB5b29q4+e5HzAHjPFZkoLyhevH6014XUcjBqAow5xQEYjFPClDxkCnq20AkZ/xqyl2oUK4xu6n0qwgguZQ28K2Ofc1v6Pqs2lSRGJzsLAOv94d69MtriO6gSaFgyMMg1LS0UUlcn491FbfS/sicyzEH6AGvOCzuApPOakt7CWYk7TjNXE0iUNnyyfpVqPQ53XiNwPepYfDMhb94GAq5/wAIzbhc4IPpVK/8OYjzEMmsWbRZ0XIUnHtVRrR4/vqR9RSwQGXdt4Zav2rbFww6DI5ruvBuqIIjaSuMu2Y8/TpXYUtFFIa8r8W6h9v1d9mCqHYuO4FVdM0t7iZWb8a6y10+KNQCOlXFijQfKop6g9hUmw4pjoRzmopEyvIqrJEjDGKpXGnwzoQ68+1YNxpv2Ry8RPHrVGUqse4MN38Qq7o8o8kOh+dG3AjsRXpejapHqVsDkLMo+dM8/WtOiis/WrxrHTJp1GWAwOeme9eWqqzTln6k5rqNLhWKFcDmtJRk1aSPPWp0i21J5dRSx8VWKVXkQA1WmwvGDzWVegSRsp4zXNT2WwMASSxqa1kNimMBkOB9fWt7QLx4ddgaNCyyLtIHevR6Wiuf8ZsRobAdWcD+dcLYQZlHck/lXWQKEjUVZj69OlXI+manXnvTiADioXPJ4qBhVaQ/NVWbkZ7VlXeDmqRYY27Rn1rOmkDXOwKBgH8av6XOba9guVz8hA2+1epg5GaWiuf8ZqTom4fwyKf5iuS0uFiQcV0MYwgBqxH1FWl6VLGeKcxOOaaRmoZAcVTkBqrOcL61j3B5NVgducVXkeOOXLKMt1p9tIsyjaAMGvVI+I1+gp9FZXiOAT6LcKRnaN35Vy+lhfKJ9Kv+cifeYACpIry3A5kA+tW1uYmXKuD+NSRzDseKl3gjrTS47UhYAGqFxINxqhcSA8ZrPlQmq8kZArNujljkdBUuhAy3cUOOWdRXrY4FLRUN0iSW8iSkBGUg5riLGMrbzxq3IkI3CozpuWZmnkye+6qT6TlmPnkk9M1Smsbq3OUuOOvWtDTrq4j+V5CRn1rpIZy6ZNSbiBz1qneXphFcpqmqzyNiJiBnqKyl+33DDZJL9dxq2i6pDg7mYehNX7a/lx5d5EADwGHUVBeR/MfT2q/4It2n10vtykY3H29K9MpaSsLxKJJo4oI5Ci53NjvWbbweUGAH3sE5qG8DpnqB7CsKNru7umitUKgdXbqay3m1L7cluxlMm/DAqMYrqLfTW5DKAw7joa1LRCnDVNelYo91cXq13NcMfLDbAcA+tVbXTppyzMrNtGSq9RTP7VhgZY44HBP+1k1Zi1LzZNgbOexGCKS8kwQcc1LM4ayeT0Sl8M+IhpDzfuA4kwCe+BXqFldxXtrHcQnKOMjNWKSsfV48zI3qMVVwpIA5xxTpI1bqBVNrRQ25EwfVaja3cybtgz/eK81ahjKrz1pTwR6k1U1aQ/Zm57VhQKDGhAyBWxatHACUXbuHOO9Yt3plol01wkWSTnGazLixaW5EsSbSO4q5HZu6Ey9R0qLUQYNOcdA3FY1vGS4wK9f8NQtBolurdSC2PrWtRWfqoHlI3cHFZUXJJ9TU3U4xxTguKdsyM1FINtQNjcKpauC1uwHORWLYsAAhPStqOPKAjoaHhU8Fc1G0KDouKgmUBTisDXCTBGoxgtk1W02AysoUclgK9it4hDBHGOiKFqWiqWppvtT7EGsgKoGVJB7ip161KoWlY4qrctjGOpqCJd74JqLUlVYic8YrlI22ySSKehzXUWDCa2RxzkVaaMVUnXaDWXdzBVIzziuf1Pc80MS9x1rd8Maa39qxRucqhDtj2r0elopkiCRGRuhGKxJreaFipQlB/EBTA2Dih5tg4ySeAKlUnbufr6VBOpkBA4PassR3NtIZJJ/MB/h24xWDr+rySYihU+/NZULXMkXlrHyepFdfoYaG1RG5IFa7yZTIrNv5gqHmudnn3zgdeazrjL3+7PyggV6J4QgY28ly643YRT64610tFFJTXXcjL6jFc+/BIP8ACcUKoEm888YFI13GuVkbafehZ4uu8UOYpVwGGazp9KtmYs2AfempZQx524pyusRAyKkEuXU9jxWNrUxUsnc1k26F50U9WIFd1F4N08XCzu0rdCUJ4Jro0RY0VEUKqjAA7U+iiikrCvV2Xki9ic1BExDYPOKL6xhvIdrqM9j6VjmwNuNiu6/8CzUiW0uw73bOOCADVO7hulGRIxY9iOKy5RfgnbKB+NLZWWp3EwMtwBHnPU8106xrFGiZzt5JNcpqdyLnVWVOUU81a0GL7TrdsmMgOCfoDmvUaWiiiikrM1aHlJh0HBrNBAcZqcnH0qJ1EnBGaqvGy/dPFU51mfv+tVRaNnLc/Wp0cRLgHmqup35hs2AJ8xxgYrBijKRlm+8eSa6nwLbbryW4b+EYFd5RRRRRRVXURmxlz7fzrmDJ820noavoQ0WCcmlQZpXjBGarMijpzVedBtJNZczbSTmsW6k864BY/Kvaomk3sFB4rtfBO398F6BcV19FFFFFFVr/AJs5fpXLXEJK716imWt5tOxzir6Tqe9JLcAcbhUTTrt4Iqhc3IOQGrA1C/CcZ56VkPOzHr1p0JZ32r07mu/8ELsaYZ5K5rsKKKKSloqtfnFnL9KwkAP41Qv7I53R9ax5ri5tzhg31qm+qzdDzUb6zKBjAqlNqkrZxwTWe8jSOSSSalhiaRgO1a1tAsYA711/hA7bpx6qa7CikpaSio1njZioYZHWs/UdQtmhlgjnjeUYyinJHPes2M5HNPYDbiqr28cvyuoIqjceH7eQ5AI+lZ0vhyME4Z/zqjPoiRZ5aqBslRulXbe3woOKtLGc8itvQJxbXqseh4NdRPqaxpujjMnqAcYHrToNShlAz8h96mkvLeJQ0k8aKe7MBT0uIZF3JNGy+qsCKqajfx2gUFvmJ6ZrB1HxUkSttIGOOtcpfeK5jC8dsxDP1f0+laehxeVp8cjcyTfOxPU1uRmpm6VAchqkEmKjkcYz0rJvGDZrJMe+Tgd6vRwbU6UpTBqS1O2ZT71vRkSJtakaARITyy+3UVyXiXUTvijEqugB+6en1rJi1AqmN7D6Gut8S61a6XKipbieSRSSXPSuBv8AUZbyQlwFXP3VGAKp7q9B0OTzdLtG/wBnH5VtR1Z6ionXnIprDI6VWkjB/i5qnPCMHAqCCAeZyKutGoWqsvBqOM4cH3rcgOQKvRNxisbxB4ettQgaZcRToM7gOv1rgEvzAvl+VE+D1K1//9k="
     },
     "biometric": {
      "birthDate": "15 JUL  1993",
      "birthLocation": "Roeselare",
      "cardDeliveryMunicipality": "Avelgem",
      "cardNumber": "592124058233",
      "cardValidityDateBegin": "27.05.2015",
      "cardValidityDateEnd": "27.05.2025",
      "chipNumber": "...==",
      "documentType": "01",
      "firstNames": "Gilles Frans",
      "name": "Platteeuw",
      "nationalNumber": "...",
      "nationality": "Belg",
      "nobleCondition": "",
      "pictureHash": "...=",
      "rawData": "...+axEIuyskBgFySsp/",
      "sex": "M",
      "signature": ".../OlA44h4YCM/h+J14xUCg/98Y9/.../C/RB2dtVbHwFvDuafmr4ZEshTlZTLidHKlISFvFWOtsLAEPCbl5LjfQwcOKe0pDADtHb4IStBnr+aaE8oHsTaKq66Y+zt+AbwdmWOrMA5URKKf7dZkY7jt3h8KZDw36VjcytUgjxVIdqwHsDkmIjK6mJtakIwybS5wn3RiQj33/vgG7JTRZJoKgDXLLTvLZO4qlfA==",
      "specialStatus": "0",
      "thirdName": "J",
      "version": "0"
     },
     "address": {
      "municipality": "Hoeselt",
      "rawData": "...==",
      "signature": "...+Evety1PnTE4pqXaHgBxIpk+P8kRL5W3zDV+../../..+YoHBC9KqTmSpl5KULxdnKiyCt+2RyJdzE2wyoymjRmysIhJy1wW9PRnx99S1TFqQLuc0tyBmkBPR4aFqmOq4a7zqd0q2Q1g+BbnwJ4d3oa10ia5+0kBXf0THoXv3HYIHlnwhBMfAtWzPnFrYBuAKTwyl7yBF5IFfXFpGWuVZUTJElgNcmNvsHMnAhVwDw==",
      "streetAndNumber": "Kerkstraat X",
      "version": "0",
      "zipcode": "3730"
     }
    }
    var filter = ['biometric'];
    generic.allData(module, { filters: filter }, callback);
    {
     "biometric": {
      "birthDate": "15 JUL  1993",
      "birthLocation": "Roeselare",
      "cardDeliveryMunicipality": "Avelgem",
      "cardNumber": "592124058233",
      "cardValidityDateBegin": "27.05.2015",
      "cardValidityDateEnd": "27.05.2025",
      "chipNumber": "...==",
      "documentType": "01",
      "firstNames": "Gilles Frans",
      "name": "Platteeuw",
      "nationalNumber": "...",
      "nationality": "Belg",
      "nobleCondition": "",
      "pictureHash": "...=",
      "rawData": "...+axEIuyskBgFySsp/",
      "sex": "M",
      "signature": ".../OlA44h4YCM/h+J14xUCg/98Y9/.../C/RB2dtVbHwFvDuafmr4ZEshTlZTLidHKlISFvFWOtsLAEPCbl5LjfQwcOKe0pDADtHb4IStBnr+aaE8oHsTaKq66Y+zt+AbwdmWOrMA5URKKf7dZkY7jt3h8KZDw36VjcytUgjxVIdqwHsDkmIjK6mJtakIwybS5wn3RiQj33/vgG7JTRZJoKgDXLLTvLZO4qlfA==",
      "specialStatus": "0",
      "thirdName": "J",
      "version": "0"
     }
    }
    var filter = [];
    generic.allCerts(module, parseCerts, { filters: filter}, callback);
    {
     "rootCertificate": {
      "certificate": "..."
     },
     "authenticationCertificate": {
      "certificate": "..."
     },
     "nonRepudiationCertificate": {
      "certificate": "..."
     },
     "intermediateCertificates": {
      "certificate": "..."
     },
     "encryptionCertificate": {
      "certificate": "..."
     }
    }
    var filter = ['rootCertificate'];
    generic.allCerts(module, { filters: filter}, callback);
    {
     "rootCertificate": {
      "certificate": "..."
     }
    }
    var filter = null;
    generic.allCerts(module, { filters: filter}, callback);
    {
     "rootCertificate": {
      "certificate": "..."
     },
     "authenticationCertificate": {
      "certificate": "..."
     },
     "nonRepudiationCertificate": {
      "certificate": "..."
     },
     "intermediateCertificates": {
      "certificate": "..."
     },
     "encryptionCertificate": {
      "certificate": "..."
     }
    }
    var data = {
          "pin":"...",
          "algorithmReference":"sha1",
          "data":"I2e+u/sgy7fYgh+DWA0p2jzXQ7E=",
          "osDialog": true
    }
    generic.sign(module, data, callback);
    {
      "success": true,
      "data": "W7wqvWA8m9SBALZPxN0qUCZfB1O/WLaM/silenLzSXXmeR+0nzB7hXC/Lc/fMru82m/AAqCuGTYMPKcIpQG6MtZ/SGVpZUA/71jv3D9CatmGYGZc52cpcb7cqOVT7EmhrMtwo/jyUbi/Dy5c8G05owkbgx6QxnLEuTLkfoqsW9Q="
    }
    var data = {
          "algorithmReference":"sha1",
          "data":"I2e+u/sgy7fYgh+DWA0p2jzXQ7E=",
          "osDialog": false
    }
    generic.sign(module, data, callback);
    {
        "success": true,
        "data": "W7wqvWA8m9SBALZPxN0qUCZfB1O/WLaM/silenLzSXXmeR+0nzB7hXC/Lc/fMru82m/AAqCuGTYMPKcIpQG6MtZ/SGVpZUA/71jv3D9CatmGYGZc52cpcb7cqOVT7EmhrMtwo/jyUbi/Dy5c8G05owkbgx6QxnLEuTLkfoqsW9Q="
    }
    const data = {
        algorithm: "sha256",
        data: "E1uHACbPvhLew0gGmBH83lvtKIAKxU2/RezfBOsT6Vs=",
        pin: "1234"
    }
    const bulk = true;
    generic.sign(module, data, bulk).then(res => {
    }, err => {
        console.error(err)
    })
    generic.resetBulkPin(module).then(res => {
    }, err => {
        console.error(err)
    })
    {
        "success": true,
        "data": true
    }
    var data = {
          "pin":"..."
    }
    generic.verifyPin(module, data, callback);
    {
      "verified": true
    }
    var data = {}
    generic.verifyPin(module, data, callback);
    {
      "verified": true
    }
    var data = {
      "pin": "...",
      "algorithm_reference": "sha1",
      "data":"I2e+u/sgy7fYgh+DWA0p2jzXQ7E="
    }
    generic.authenticate(module, data, callback);
    {
    "success": true,
    "data": "W7wqvWA8m9SBALZPxN0qUCZfB1O/WLaM/silenLzSXXmeR+0nzB7hXC/Lc/fMru82m/AAqCuGTYMPKcIpQG6MtZ/SGVpZUA/71jv3D9CatmGYGZc52cpcb7cqOVT7EmhrMtwo/jyUbi/Dy5c8G05owkbgx6QxnLEuTLkfoqsW9Q="
    }
    generic.allAlgoRefs(module, callback);
    {
        "success": true,
        "data": ["sha1", "sha256"]
    
    config = new T1CSdk.T1CConfig(configoptions);
    T1CSdk.T1CClient.initialize(config).then(res => {
        client = res;
        console.log("Client config: ", client.localConfig)
        core = client.core();
    
    }, err => {
        errorHandler(error);
    });
    T1CClient.initialize(config).then(res => {
        var coreService = res.core();
        core.readers(callback);
    })
    {
      "success": true,
      "data": [
        {
          "id": "57a3e2e71c48cee9",
          "name": "Bit4id miniLector",
          "pinpad": false,
          "card": {
            "atr": "3B9813400AA503010101AD1311",
            "description": [
              "Belgium Electronic ID card (eID)"
            ],
            "module": "beid"
          }
        }
      ]
    }
    {
      "data": [
        {
          "id": "ec3109c84ee9eeb5",
          "name": "Identiv uTrust 4701 F Dual Interface Reader(2)",
          "pinpad": false
        },
        {
          "card": {
            "atr": "3B9813400AA503010101AD1311",
            "description": [
              "Belgium Electronic ID card"
            ]
          },
          "id": "57a3e2e71c48cee9",
          "name": "Bit4id miniLector",
          "pinpad": false
        },
        {
          "id": "c8d31f8fed44d952",
          "name": "Identiv uTrust 4701 F Dual Interface Reader(1)",
          "pinpad": false
        }
      ],
      "success": true
    }
    {
      "data": [
        {
          "card": {
            "atr": "3B9813400AA503010101AD1311",
            "description": [
              "Belgium Electronic ID card"
            ]
          },
          "id": "57a3e2e71c48cee9",
          "name": "Bit4id miniLector",
          "pinpad": false
        }
      ],
      "success": true
    }
    {
      "data": [
        {
          "card": {
            "atr": "3B9813400AA503010101AD1311",
            "description": [
              "Belgium Electronic ID card"
            ]
          },
          "id": "57a3e2e71c48cee9",
          "name": "Bit4id miniLector",
          "pinpad": false
        }
      ],
      "success": true
    }
    {
      "data": [
        {
          "id": "ec3109c84ee9eeb5",
          "name": "Identiv uTrust 4701 F Dual Interface Reader(2)",
          "pinpad": false
        },
        {
          "card": {
            "atr": "3B67000000000000009000",
            "description": [
              "MisterCash & Proton card",
              "VISA Card (emitted by Bank Card Company - Belgium)"
            ]
          },
          "id": "e5863fcc71478871",
          "name": "Gemalto Ezio Shield Secure Channel",
          "pinpad": true
        },
        {
          "card": {
            "atr": "3B9813400AA503010101AD1311",
            "description": [
              "Belgium Electronic ID card"
            ]
          },
          "id": "57a3e2e71c48cee9",
          "name": "Bit4id miniLector",
          "pinpad": false
        },
        {
          "id": "c8d31f8fed44d952",
          "name": "Identiv uTrust 4701 F Dual Interface Reader(1)",
          "pinpad": false
        }
      ],
      "success": true
    }
    GCLClient.initialize(config, function(err, client) {
        var coreService = client.core();
        core.readersCardAvailable(callback);
    });
    {
      "data": [
        {
          "card": {
            "atr": "3B9813400AA503010101AD1311",
            "description": []
          },
          "id": "57a3e2e71c48cee9",
          "name": "Bit4id miniLector",
          "pinpad": false
        }
      ],
      "success": true
    }
    export interface AbstractCore {
      getImplicitConsent(codeWord: string, durationInDays?: number, callback?: (error: T1CLibException, data?: T1CClient) => void): Promise<T1CClient>;
      updateJWT(jwt: string, callback?: (error: T1CLibException, data?: T1CClient) => void): Promise<T1CClient>
      info(callback?: (error: T1CLibException, data: InfoResponse) => void): void | Promise<InfoResponse>;
      reader(reader_id: string, callback?: (error: T1CLibException, data: SingleReaderResponse) => void): Promise<SingleReaderResponse>;
      readers(callback?: (error: T1CLibException, data: CardReadersResponse) => void): Promise<CardReadersResponse>;
      readersCardAvailable(callback?: (error: T1CLibException, data: CardReadersResponse) => void): Promise<CardReadersResponse>;
      readersCardsUnavailable(callback?: (error: T1CLibException, data: CardReadersResponse) => void): Promise<CardReadersResponse>;
      getUrl(): string;
      version(): Promise<string>;
      getDevicePublicKey(): Promise<string>;
    }
    export interface AbstractIdemia {
        allCertFilters(): string[];
        allKeyRefs(): string[];
        allCerts(parseCerts?: boolean, filters?: string[] | Options, callback?: (error: T1CLibException, data: TokenAllCertsResponse) => void): Promise<TokenAllCertsResponse>;
        tokenData(callback?: (error: T1CLibException, data: TokenDataResponse) => void): Promise<TokenDataResponse>;
        rootCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
        authenticationCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
        nonRepudiationCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
        encryptionCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
        issuerCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>
        verifyPin(body: TokenVerifyPinData, callback?: (error: T1CLibException, data: TokenVerifyPinResponse) => void): Promise<TokenVerifyPinResponse>;
        authenticate(body: TokenAuthenticateOrSignData, callback?: (error: T1CLibException, data: TokenAuthenticateResponse) => void): Promise<TokenAuthenticateResponse>;
        sign(body: TokenAuthenticateOrSignData, bulk?: boolean, callback?: (error: T1CLibException, data: TokenSignResponse) => void): Promise<TokenSignResponse>;
        allAlgoRefs(callback?: (error: T1CLibException, data: TokenAlgorithmReferencesResponse) => void): Promise<TokenAlgorithmReferencesResponse>
        resetBulkPin(callback?: (error: T1CLibException, data: BoolDataResponse) => void): Promise<BoolDataResponse>;
    }
    T1cSdk.initialize(config).then(res => {
        const idemia = res.client.idemia(readerId);
    }, err => {
        console.error(error)
    });
    idemia.allCertFilters().then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: ['rootCertificate', 'authenticationCertificate', 'encryptionCertificate', 'nonRepudiationCertificate', 'issuerCertificate']
    }
    idemia.allKeyRefs().then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: ['authenticate', 'sign', 'encrypt']
    }
    const filter = ['rootCertificate', 'authenticationCertificate', 'encryptionCertificate'];
    idemia.allCerts(filter).then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: {
           authenticationCertificate?: {
                certificate?: TokenCertificateObject,
                certificates?: Array<TokenCertificateObject>
           },
           citizenCertificate?: {
                certificate?: TokenCertificateObject,
                certificates?: Array<TokenCertificateObject>
           },
           nonRepudiationCertificate?: {
                certificate?: TokenCertificateObject,
                certificates?: Array<TokenCertificateObject>
           },,
           rootCertificate?: {
                certificate?: TokenCertificateObject,
                certificates?: Array<TokenCertificateObject>
           },,
           encryptionCertificate?: {
                certificate?: TokenCertificateObject,
                certificates?: Array<TokenCertificateObject>
           },
        }
    }
    idemia.tokenData().then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: {
           version?: string,
           serialNumber?: string,
           label?: string,
           changeCounter?: number,
        }
    }
    idemia.rootCertificate(parseCertsBoolean).then(res => {
    }, err => {
        console.error(err)
    })
    idemia.authenticationCertificate(parseCertsBoolean).then(res => {
    }, err => {
        console.error(err)
    })
    idemia.nonRepudiationCertificate(parseCertsBoolean).then(res => {
    }, err => {
        console.error(err)
    })
    idemia.issuerCertificate(parseCertsBoolean).then(res => {
    }, err => {
        console.error(err)
    })
    aventra.encryptionCertificate(parseCertsBoolean).then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: {
            certificate?: TokenCertificateObject,
            certificates?: Array<TokenCertificateObject>    
        }    
    }
    const data = {
        pin: "1234", // optional
        osDialog: true // optional
    }
    idemia.verifyPin(data).then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: {
            "verfied": true
        }
    }
    const data = {
        algorithm: "sha256",
        data: "E1uHACbPvhLew0gGmBH83lvtKIAKxU2/RezfBOsT6Vs=",
        id: "123"
    }
    const bulk = false;
    idemia.sign(data, bulk).then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: {
            data: string
        }
    }
    idemia.resetBulkPin().then(res => {
    }, err => {
        console.error(err)
    })
    {
        "success": true,
        "data": true
    }
    const data = {
        algorithm: "sha256",
        data: "E1uHACbPvhLew0gGmBH83lvtKIAKxU2/RezfBOsT6Vs=",
        id: "123"
    }
    idemia.authenticate(data).then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: {
            data: string
        }
    }
    idemia.allAlgoRefs(data).then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: {
            ref: ['sha256', 'md5']
        }
    }
    export class ModuleDescriptionResponse extends DataObjectResponse {
      constructor(public data: TokenModuleDescription, public success: boolean) {
        super(data, success);
      }
    }
    
    export class TokenCertificateResponse extends T1CResponse {
      constructor(public data: TokenCertificate, public success: boolean) {
        super(success, data);
      }
    }
    
    
    export class TokenCertificate {
      constructor(
        public certificate?: TokenCertificateObject,
        public certificates?: Array<TokenCertificateObject>
      ) {}
    }
    
    export class TokenCertificateObject {
      constructor(
          public certificate?: string,
          public certificateType?: string,
          public id?: string,
          public parsedCertificate?: Certificate,
      ) {}
    }
    
    export class TokenAddressResponse extends DataObjectResponse {
      constructor(public data: TokenAddressData, public success: boolean) {
        super(data, success);
      }
    }
    
    export class TokenPictureResponse extends DataObjectResponse {
      constructor(public data: TokenPictureData, public success: boolean) {
        super(data, success);
      }
    }
    
    export class TokenVerifyPinResponse extends DataObjectResponse {
      constructor(public data: TokenVerifyPinResponseData, public success: boolean) {
        super(data, success);
      }
    }
    
    export class TokenVerifyPinResponseData {
      constructor(
          public verified: boolean
      ) {}
    }
    
    export class TokenSignResponse extends DataObjectResponse {
      constructor(public data: TokenSignResponseData, public success: boolean) {
        super(data, success);
      }
    }
    
    export class TokenSignResponseData {
      constructor(
          public data?: string
      ) {}
    }
    
    export class TokenAuthenticateResponse extends DataObjectResponse {
      constructor(public data: TokenAuthenticateResponseData, public success: boolean) {
        super(data, success);
      }
    }
    
    export class TokenAuthenticateResponseData {
      constructor(
          public data?: string
      ) {}
    }
    
    export class TokenModuleDescription {
      constructor(
          public desc: string
      ) {}
    }
    
    export class TokenAddressData {
      constructor(
        public municipality?: string,
        public rawData?: string,
        public signature?: string,
        public streetAndNumber?: string,
        public version?: number,
        public zipcode?: string
      ) {}
    }
    
    
    
    export class TokenAllDataResponse extends DataObjectResponse {
      constructor(public data: TokenAllData, public success: boolean) {
        super(data, success);
      }
    }
    
    
    export class TokenAllData {
      constructor(
        public picture?: TokenPictureData,
        public biometric?: TokenBiometricData,
        public address?: TokenAddressData,
      ) {}
    }
    
    export class TokenPictureData {
      constructor(
          public picture?: string,
          public signature?: string,
          public width?: number,
          public height?: number,
      ) {}
    }
    
    export class TokenData {
      constructor(
          public rawData?: string,
          public version?: string,
          public serialNumber?: string,
          public label?: string,
          public prnGeneration?: string,
          public eidCompliant?: string,
          public graphicalPersoVersion?: string,
          public versionRfu?: string,
          public electricalPersoVersion?: string,
          public electricalPersoInterfaceVersion?: string,
          public changeCounter?: number,
          public activated?: string,
      ) {}
    }
    
    export class TokenDataResponse extends DataObjectResponse {
      constructor(public data: TokenData, public success: boolean) {
        super(data, success);
      }
    }
    
    export class TokenBiometricData {
      constructor(
        public birthDate?: string,
        public birthLocation?: string,
        public cardDeliveryMunicipality?: string,
        public cardNumber?: string,
        public cardValidityDateBegin?: string,
        public cardValidityDateEnd?: string,
        public chipNumber?: string,
        public documentType?: string,
        public firstNames?: string,
        public name?: string,
        public nationalNumber?: string,
        public nationality?: string,
        public nobleCondition?: string,
        public pictureHash?: string,
        public rawData?: string,
        public sex?: string,
        public signature?: string,
        public specialStatus?: string,
        public thirdName?: string,
        public version?: number,
        public issuer?: string
      ) {}
    }
    
    export class TokenBiometricDataResponse extends DataObjectResponse {
      constructor(public data: TokenBiometricData, public success: boolean) {
        super(data, success);
      }
    }
    
    export class TokenAlgorithmReferencesResponse {
      constructor(public data: TokenAlgorithmReferences, public success: boolean) {
      }
    }
    
    export class TokenAlgorithmReferences {
      constructor(public ref: Array<string>) {
      }
    }
    
    export class TokenResetPinResponse {
      constructor(public data: TokenResetPin, public success: boolean) {
      }
    }
    
    export class TokenResetPin {
      constructor(public verified: boolean) {
      }
    }
    
    
    export class PinType {
      static PIN = 'Pin';
      static CAN = 'Can';
    }
    Click 'Browse'.
    Click 'Apply'.
  • Click 'OK'.

  • Go back to the first tab, 'General', and restart the service.

  • Click 'Start'.

  • Click 'Stop'.

  • Oberthur Cosmo One v7.3

    circle-exclamation

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

    hashtag
    Introduction

    The ID-One Cosmo V7-n is part of the Oberthur family of cryptographic modules called ID-One Cosmo V7. Modules within

    this family share the same functionalities and the description of the ID-One Cosmo V7 applies to all versions including the “-n” subject to this validation.

    This document describes the functionality provided by the Oberthur ID-One smartcard - which is a PKI container:

    • ID-One Cosmo V7-n; FIPS 140-2 Security Policy

    hashtag
    Interface

    hashtag
    Models

    All model information can be found in the

    hashtag
    Examples

    hashtag
    Create the Oberthur module

    When initialisation is finished you can continue using the aventra object to execute the functions below.

    hashtag
    All certificate filters

    The expected response for this call should be;

    hashtag
    all Key references

    The expected response for this call should be;

    hashtag
    all Certificates

    Exposes all the certificates publicly available on the smart card. The following certificates can be found on the card:

    • Root certificate

    • Signing certificate

    • Authentication certificate

    When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not.

    The expected response for this call should be;

    hashtag
    Token data

    This will return information of the Aventra card.

    The expected response for this call should be;

    hashtag
    Certificate

    When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not.

    hashtag
    Root certificate

    Contains the 'root certificate' stored on the smart card. The service can be called:

    hashtag
    Authentication certificate.

    Contains the 'authentication certificate' stored on the smart card. The 'authentication certificate' contains the public key corresponding to the private RSA authentication key. The 'authentication certificate' is needed for pin validation, authentication and singing. The service can be called:

    hashtag
    Non repudiation certificate

    Contains the 'non-repudiation certificate' stored on the smart card. The 'non-repudiation certificate' contains the public key corresponding the private RSA non-repudiation key. The service can be called:

    hashtag
    Issuer certificate

    hashtag
    Encryption certificate

    The expected response for these calls should be in the following format;

    hashtag
    Verify pin

    The expected response for these calls should be in the following format;

    hashtag
    Sign

    Data can be signed using the smartcard. To do so, the SDK facilitates in:

    • Retrieving the certificate chain (root, intermediate and non-repudiation certificate)

    • Perform a sign operation (private key stays on the smart card)

    • Return the signed has

    To sign data, an algorithm must be specified in the algorithm property (see ), and a Base64-encoded string representation of the digest bytes of the same algorithm in the data property.

    Additionally, it is possible to bulk sign data without having to re-enter the PIN by adding an optional bulk parameter set to true to the request. Subsequent sign requests will not require the PIN to be re-entered until a request with bulk being set to false is sent, or the method is called.

    triangle-exclamation

    When using bulk signing, great care must be taken to validate that the first signature request was successful prior to sending subsequent requests. Failing to do this will likely result in the card being blocked.

    The expected response for this call should be;

    hashtag
    Bulk PIN Reset

    The PIN set for bulk signing can be reset by calling this method.

    Response will look like:

    hashtag
    Authenticate

    The SDK is able to authenticate a card holder based on a challenge. The challenge can be:

    • provided by an external service

    • provided by the smart card

      An authentication can be interpreted as a signature use case, the challenge is signed data, that can be validated in a back-end process.

    The expected response for this call should be;

    hashtag
    Retrieve supported algorithms

    The expected response for this call should be;

    Chambersign

    circle-exclamation

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks

    triangle-exclamation

    Chambersign is only usable when the Middleware software has been installed. As integrator you can check this with the . Example will be described below

    hashtag
    Chambersign introduction

    The Chambersign token is a token that requires for the middleware of Chambersign to be installed prior to using it on the Trust1Connector.

    hashtag
    Detect if Middleware has been installed.

    hashtag
    Windows

    The chambersign software for windows requires administration rights to be installed. After installation the location will be:

    x64 & x86 ; C:\Program Files\ChamberSign

    To check if this has been installed we can use the File-exchange create type function and then check the contents of the (sub)-folders.

    To check if the middleware is installed the sample code below is a good start to use the File-Exchange to check if the middleware has been installed and its safe to continue to use the ChamberSign middleware and the Trust1Connector.

    circle-info

    This is an example of how this could be integrated. You are free to implement this however you like. Information for the file-exchange module can be found

    hashtag
    Interface

    circle-info

    Be aware that for chambersign only the following functions are supported at this time:

    • authenticate

    • sign

    hashtag
    Models

    All model information can be found in the

    hashtag
    Initialise the Trust1Connector JS

    Initialise a Trust1Connector client with a valid configuration:

    hashtag
    Obtain the Reader information

    In order to get all connected card-readers, with available cards:

    This function call returns:

    Using the generic interface can be done as follows;

    Because we're using the generic interface we can define the module variable upfront since we know we want to use the chambersign integration.

    hashtag
    Certificates

    Exposes all the certificates publicly available on the smart card.

    hashtag
    Authentication Certificate

    Contains the 'authentication certificate' stored on the smart card. The 'authentication certificate' contains the public key corresponding to the private RSA authentication key. The 'authentication certificate' is needed for pin validation and authentication. When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not The service can be called:

    Response:

    hashtag
    Non-repudiation Certificate

    Contains the 'non-repudiation certificate' stored on the smart card. The 'non-repudiation certificate' contains the public key corresponding the private RSA non-repudiation key. When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not The service can be called:

    Response:

    hashtag
    Filter Certificates

    All certificates on the smart card can be dumped at once, or using a filter. In order to read all certificates at once:

    Response:

    The filter can be used to ask a list of custom data containers. For example, we want to read only the rootCertificate

    Response:

    hashtag
    Sign Data

    To get the certificates necessary for signature validation in your back-end:

    Response:

    Depending on the connected smart card reader. A sign can be executed in 2 modes:

    • Using a connected card reader with 'pin-pad' capabilities (keypad and display available)

    • Using a connected card reader without 'pin-pad' capabilities (no keypad nor display available)

    Security consideration: In order to sign a hash, security considerations prefer using a 'pin-pad'.

    hashtag
    Sign Hash without pin-pad

    When the web or native application is responsible for showing the password input, the following request is used to sign a given hash:

    Response is a base64 encoded signed hash:

    The 'authenticationreference' property can contain the following values: sha1, sha256, sha512, md5.

    hashtag
    Sign Hash with pin-pad

    When the pin entry is done on the pin-pad, the following request is used to sign a given hash:

    Response is a base64 encoded signed hash:

    The 'algorithm_reference' property can contain the following values: sha1, sha256, sha512, md5.

    The core services lists connected readers, and if they have pin-pad capability. You can find more information in the Core Service documentation on how to verify card reader capabilities.

    hashtag
    Bulk Signing

    It is possible to bulk sign data without having to re-enter the PIN by adding an optional bulk parameter set to true to the request. Subsequent sign requests will not require the PIN to be re-entered until a request with bulk being set to false is sent, or the method is called.

    triangle-exclamation

    When using bulk signing, great care must be taken to validate that the first signature request was successful prior to sending subsequent requests. Failing to do this will likely result in the card being blocked.

    hashtag
    Bulk PIN Reset

    The PIN set for bulk signing can be reset by calling this method.

    Response will look like:

    hashtag
    Verify PIN

    hashtag
    Verify PIN without pin-pad

    When the web or native application is responsible for showing the password input, the following request is used to verify a card holder PIN:

    Response:

    hashtag
    Verify PIN with pin-pad

    When the pin entry is done on the pin-pad, the following request is used to verify a given PIN:

    Response:

    hashtag
    Authentication

    The T1C-GCL is able to authenticate a card holder based on a challenge. The challenge can be:

    • provided by an external service

    • provided by the smart card An authentication can be interpreted as a signature use case, the challenge is signed data, that can be validated in a back-end process.

      External Challenge

      An external challenge is provided in the data property of the following example:

    Response:

    Take notice that the PIN property can be omitted when using a smart card reader with pin-pad capabilities.

    hashtag
    Get valid algorithms to use for Sign or Authenticate

    Via the Trust1Connector generic modules you are able to retrieve available algorithms to use for Signing or Authenticate

    The response you can expect is a list of algorithms, an example can be found below (the values below are purely examplatory)

    Airbus

    circle-exclamation

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

    hashtag
    Introduction

    The following page describes how you can integrate the Airbus module exposed on the Trust1Connector onto your web application.

    hashtag
    Interface

    hashtag
    Models

    All model information can be found in the

    hashtag
    Initialise the Trust1Connector JS

    Initialise a Trust1Connector client with a valid configuration:

    hashtag
    Obtain the Reader information

    In order to get all connected card-readers, with available cards:

    This function call returns:

    Using the generic interface can be done as follows;

    Because we're using the generic interface we can define the module variable upfront since we know we want to use the jcop3 integration.

    hashtag
    Certificates

    Exposes all the certificates publicly available on the smart card.

    hashtag
    Authentication Certificate

    Contains the 'authentication certificate' stored on the smart card. The 'authentication certificate' contains the public key corresponding to the private RSA authentication key. The 'authentication certificate' is needed for pin validation and authentication. When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not The service can be called:

    Response:

    hashtag
    Non-repudiation Certificate

    Contains the 'non-repudiation certificate' stored on the smart card. The 'non-repudiation certificate' contains the public key corresponding the private RSA non-repudiation key. When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not The service can be called:

    Response:

    hashtag
    Encryption Certificate

    Contains the 'encryption certificate' stored on the smart card. The 'encryption certificate' corresponds to the private key used to sign the 'biometric' and 'Address' data. When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not The service can be called:

    Response:

    hashtag
    Root Certificate/Issuer Certificate

    Contains the 'root certificate' or 'Issuer certificate stored on the smart card. The service can be called:

    Response:

    hashtag
    Filter Certificates

    All certificates on the smart card can be dumped at once, or using a filter. In order to read all certificates at once:

    Response:

    The filter can be used to ask a list of custom data containers. For example, we want to read only the rootCertificate

    Response:

    hashtag
    Sign Data

    Data can be signed using the Jcop3 smart card. To do so, the T1C-GCL facilitates in:

    To get the certificates necessary for signature validation in your back-end:

    Response:

    Depending on the connected smart card reader. A sign can be executed in 2 modes:

    • Using a connected card reader with 'pin-pad' capabilities (keypad and display available)

    • Using a connected card reader without 'pin-pad' capabilities (no keypad nor display available)

    Security consideration: In order to sign a hash, security considerations prefer using a 'pin-pad'.

    hashtag
    Sign Hash without pin-pad

    When the web or native application is responsible for showing the password input, the following request is used to sign a given hash:

    Response is a base64 encoded signed hash:

    The 'authenticationreference' property can contain the following values: sha1, sha256, sha512, md5.

    hashtag
    Sign Hash with pin-pad

    When the pin entry is done on the pin-pad, the following request is used to sign a given hash:

    Response is a base64 encoded signed hash:

    The 'algorithm_reference' property can contain the following values: sha1, sha256, sha512, md5.

    The core services lists connected readers, and if they have pin-pad capability. You can find more information in the Core Service documentation on how to verify card reader capabilities.

    hashtag
    Bulk Signing

    It is possible to bulk sign data without having to re-enter the PIN by adding an optional bulk parameter set to true to the request. Subsequent sign requests will not require the PIN to be re-entered until a request with bulk being set to false is sent, or the method is called.

    triangle-exclamation

    When using bulk signing, great care must be taken to validate that the first signature request was successful prior to sending subsequent requests. Failing to do this will likely result in the card being blocked.

    hashtag
    Bulk PIN Reset

    The PIN set for bulk signing can be reset by calling this method.

    Response will look like:

    hashtag
    Verify PIN

    hashtag
    Verify PIN without pin-pad

    When the web or native application is responsible for showing the password input, the following request is used to verify a card holder PIN:

    Response:

    hashtag
    Verify PIN with pin-pad

    When the pin entry is done on the pin-pad, the following request is used to verify a given PIN:

    Response:

    hashtag
    Authentication

    The T1C-GCL is able to authenticate a card holder based on a challenge. The challenge can be:

    • provided by an external service

    • provided by the smart card An authentication can be interpreted as a signature use case, the challenge is signed data, that can be validated in a back-end process.

      External Challenge

      An external challenge is provided in the data property of the following example:

    Response:

    Take notice that the PIN property can be omitted when using a smart card reader with pin-pad capabilities.

    hashtag
    Get valid algorithms to use for Sign or Authenticate

    Via the Trust1Connector modules you are able to retrieve available algorithms to use for Signing or Authenticate

    The response you can expect is a list of algorithms, an example can be found below (the values below are purely examplatory)

    Aventra MyEID PKI

    circle-exclamation

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

    hashtag
    Introduction

    Aventra MyEID PKI Card is a cryptographic smart card conforming to common Public Key Infrastructure standards like ISO/IEC-7816 and PKCS#15v1.0 specification. It can be used for various tasks requiring strong cryptography, e. g. logging securely to Windows, encrypting e-mail, authentication, and electronic signatures. The card is also available as a Dual Interface version, compatible with T=CL protocol and also emulating Mifare™. The card is a JavaCard with Aventra MyEID applet that implements the functionality.

    The applet implements the FINEID S1 v1.12 specification and it can be configured to include all or any subset of the features specified in FINEID S4-1 or S4-2 specifications. Starting from version 2.2.0 the applet supports both 1024 and 2048 bit RSA keys. From version 3.0.0 (MyEID3) the applet supports keys from 512 bit up to 2048 bit in increments of 64 bits. The applet is fully compatible with JavaCard 2.1.1 and GlobalPlatform 2.0.1 specifications. The new MyEID version 3 (MyEID3) is now released and it uses the new JavaCard 2.2.1 and GlobalPlatform 2.1.1 platform. The new MyEID3 now supports RSA keys from 512 up to 2048 bits in 64 bit increments. MyEID3 supports file sizes up to 32767 bytes and 14 different PIN-codes can be created and used. The number of RSA keys is only limited by the available memory and maximum numbers of files (see PUT DATA: INITIALISE APPLET).

    References

    The most relevant specifications and standards are:

    • ISO/IEC 7816-4

    • ISO/IEC 7816-8

    • ISO/IEC 7816-9

    This document describes the functionality provided by the Aventra smartcard - which is a PKI container - on the T1C-GCL (Generic Connector Library) implemented version:

    • MyEID - reference manual v1.7.36

    hashtag
    Interface

    hashtag
    Models

    All model information can be found in the

    hashtag
    Examples

    hashtag
    Create the Aventra module

    When initialisation is finished you can continue using the aventra object to execute the functions below.

    hashtag
    All certificate filters

    The expected response for this call should be;

    hashtag
    all Key references

    The expected response for this call should be;

    hashtag
    all Certificates

    Exposes all the certificates publicly available on the smart card. The following certificates can be found on the card:

    • Root certificate

    • Signing certificate

    • Authentication certificate

    When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not.

    The expected response for this call should be;

    hashtag
    Token data

    This will return information of the Aventra card.

    The expected response for this call should be;

    hashtag
    Certificate

    When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not.

    hashtag
    Root certificate

    Contains the 'root certificate' stored on the smart card.

    hashtag
    Authentication certificate

    Contains the 'authentication certificate' stored on the smart card. The 'authentication certificate' contains the public key corresponding to the private RSA authentication key. The 'authentication certificate' is needed for pin validation, authentication and signing.

    hashtag
    Non repudiation certificate

    Contains the 'non-repudiation certificate' stored on the smart card. The 'non-repudiation certificate' contains the public key corresponding the private RSA non-repudiation key.

    hashtag
    Issuer certificate

    hashtag
    Encryption certificate

    The expected response for these calls should be in the following format;

    hashtag
    Verify pin

    The expected response for these calls should be in the following format;

    hashtag
    Sign

    To sign data, an algorithm must be specified in the algorithm property (see ), and a Base64-encoded string representation of the digest bytes of the same algorithm in the data property.

    Additionally, it is possible to bulk sign data without having to re-enter the PIN by adding an optional bulk parameter set to true to the request. Subsequent sign requests will not require the PIN to be re-entered until a request with bulk being set to false is sent, or the method is called.

    triangle-exclamation

    When using bulk signing, great care must be taken to validate that the first signature request was successful prior to sending subsequent requests. Failing to do this will likely result in the card being blocked.

    The expected response for this call should be;

    hashtag
    Bulk PIN Reset

    The PIN set for bulk signing can be reset by calling this method.

    Response will look like:

    hashtag
    Authenticate

    The expected response for this call should be;

    hashtag
    Reset pin

    The expected response for this call should be;

    hashtag
    Retrieve supported algorithms

    The expected response for this call should be;

    EMV

    circle-exclamation

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

    hashtag
    Introduction

    Belgian eID

    circle-exclamation

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

    hashtag
    Introduction

    Diplad (BeLawyer)

    circle-exclamation

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

    hashtag
    Introduction

    File exchange

    circle-exclamation

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

    hashtag
    Introduction

    PKCS11 Keystore

    circle-exclamation

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

    hashtag
    Interface

    Crelan

    circle-exclamation

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

    hashtag
    Introduction

    Issuer certificate
  • Encryption certificate

  • Token typings model page
    Supported Algorithms
    Bulk PIN Reset

    verifyPin

  • AuthenticationCertificate

  • NonRepudiationCertificate

  • AllCerts(auth, nonrep)

  • allAlgoRefs

  • resetBulkPin

  • File Exchange module
    here
    Token typings model page
    Bulk Sign Reset
    Token typings model page
    Bulk Sign Reset
    JavaCard 2.1.1, MyEID3: 2.2.1
  • GlobalPlatform 2.0.1 ' (Open Platform), MyEID3: GlobalPlatform 2.1.1

  • FINEID S1 and S4 documentation

  • Issuer certificate
  • Encryption certificate

  • Token typings model page
    Supported Algorithms
    Bulk PIN Reset
    This container supports functionality for EMV "chip and PIN" bank cards, including:
    • VISA, MasterCard, Amex, CB and UK Post Office Account contact cards

    • PayWave (VISA) and PayPass (MasterCard) contactless cards

    hashtag
    Get EMV container object

    Initialise a Trust1Connector:

    Get the EMV service:

    Call a function for the EMV container:

    hashtag
    Obtain the Reader-ID

    The constructor for the EMV expect as the parameter to be a valid reader-ID. A reader-ID can be obtained from the exposed core functionality, for more information see Core Services. Core services responds with available card-readers, available card in a card-reader, etc. For example: In order to get all connected card-readers, with available cards:

    This function call returns:

    We notice that a card object is available in the response in the context of a detected reader. The reader in the example above is VASCO DIGIPASS 870, has pin-pad capabilities, and there is a card detected with given ATR and some descriptions. An ATR (Answer To Reset) identifies the type of a smart-card. The reader, has a unique ID, reader_id; this reader_id must be used in order to request functionalities for the EMV card. This must be done upon instantiation of the EMV container:

    All methods for emv will use the selected reader - identified by the reader_id.

    hashtag
    Reading data

    hashtag
    Applications

    List the supported applications on the EMV card

    An example callback:

    Response:

    hashtag
    Application data

    The application data contains information of the holder of the card, the validity, the primary account number, ...

    An example callback:

    Response:

    hashtag
    Issuer Public Key Certificate

    On some applications there is an issuer public key certificate present. The aid parameter indicates which application you want to use, this can be fetched using the applications endpoint.

    An example callback:

    Response:

    hashtag
    ICC Public Key Certificate

    On some applications there is an icc public key certificate present. The aid parameter indicates which application you want to use, this can be fetched using the applications endpoint.

    An example callback:

    Response:

    hashtag
    Verify PIN

    hashtag
    Verify PIN without pin-pad

    When the web or native application is responsible for showing the password input, the following request is used to verify a card holder PIN:

    Response:

    hashtag
    Verify PIN with pin-pad

    When the pin entry is done on the pin-pad, the following request is used to verify a given PIN:

    Response:

    hashtag
    Verify PIN - retries left

    After an unsuccessful PIN verification, the error code indicates the number of retries left. For example, when executing:

    The following error message will be returned when PIN is wrong:

    After a second wrong PIN verification:

    Note that, when the user has at least one retry left, entering a correct PIN resets the PIN retry status.

    Code

    Description

    301

    Warning: the user can try twice more to verify his PIN

    301

    Warning: the user has only 1 retry left

    301

    Error: the PIN is blocked

    hashtag
    Error Handling

    hashtag
    Error Object

    The functions specified are asynchronous and always need a callback function. The callback function will reply with a data object in case of success, or with an error object in case of an error. An example callback:

    The error object returned:

    For the error codes and description, see Status codes.

    Each lawyer in Belgium registered at the balie is obliged since 1/1/2018 to have an electronic lawyer card. This is declared in atr. 193bis of the Codex Deontologie voor Advocatenarrow-up-right:

    “De advocaat moet voor zijn identificatie en voor de authenticatie beschikken over de elektronische CCBE-advocatenkaart.”

    More info at https://www.diplad.be/en-GB/t/23/elektronische-advocatenkaart.aspxarrow-up-right.

    hashtag
    Interface

    hashtag
    Module

    hashtag
    Models

    All model information can be found in the Token typings model page

    hashtag
    Examples

    hashtag
    Initializing Diplad Module

    hashtag
    All Data

    Response will look like:

    hashtag
    Biometric Data

    Response will look like:

    hashtag
    Picture

    Response will look like:

    hashtag
    All Certificates

    When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not.

    circle-info

    The filter is optional

    Response will look like:

    hashtag
    Root Certificate

    When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not.

    Response will look like:

    hashtag
    Authentication Certificate

    When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not.

    Response will look like:

    hashtag
    Non-Repudiation Certificate

    When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not.

    Response will look like:

    hashtag
    Verify PIN

    • If the card reader has a PIN pad, the PIN must always be entered via the card-reader PIN pad.

    • If the card reader has no PIN pad:

      • If the osDialog property is set to true, a OS dialog window will be displayed for the user the enter their PIN

      • If the pin property is defined, that value is used

      • If osDialog is set to false, and pin is undefined, an error will be returned

    Response will look like:

    hashtag
    Sign

    To sign data, an algorithm must be specified in the algorithm property (see Supported Algorithms), and a Base64-encoded string representation of the digest bytes of the same algorithm in the data property.

    Additionally, it is possible to bulk sign data without having to re-enter the PIN by adding an optional bulk parameter set to true to the request. Subsequent sign requests will not require the PIN to be re-entered until a request with bulk being set to false is sent, or the Bulk PIN Reset method is called.

    triangle-exclamation

    When using bulk signing, great care must be taken to validate that the first signature request was successful prior to sending subsequent requests. Failing to do this will likely result in the card being blocked.

    The PIN can provided/entered in the same way as Verify PIN

    Response will look like:

    hashtag
    Authenticate

    To sign data, an algorithm must be specified in the algorithm property (see Supported Algorithms), and a Base64-encoded string representation of the digest bytes of the same algorithm in the data property.

    The PIN can provided/entered in the same way as Verify PIN

    Response will look like:

    hashtag
    Get Supported Algorithms

    Response will look like:

    hashtag
    Bulk PIN Reset

    The PIN set for bulk signing can be reset by calling this method.

    Response will look like:

    hashtag
    Models

    hashtag
    Initialising the SDK

    Before you are able to use the SDK's methods you need to initialise the trust1connector javascript SDK. Below you can find an example of how to do this. You can also check the integration in web applications page.

    In this example you can see when the connector is initialised we try to fetch the pkcs11 configuration already loaded in (if present), if this is not loaded you still need to upload the configuration. (line 30)

    we store the client data for later use (line 27)

    After initialising the configuration we can fetch all available slots to display on the screen. (line 31)

    hashtag
    Configuration

    hashtag
    Example

    hashtag
    Example config contents

    The most important config values are the name and the library (location of the PKCS11 dylib or DLL).

    Base64 ecoding the config contents described in the codeblock above and sending them via the uploadConfig method of the JS sdk will enable you to upload and use that pkcs11 configuration.

    hashtag
    Upload configuration

    To be able to use the PKCS11 generic you need to upload a correct configuration file, which includes the name and library to be used. We use a html file chooser to fetch a file and use the FilereaderAPI to retrieve the contents of the selected file, then we convert it to a base64 string which we send to the uploadConfig method

    hashtag
    Get configuration

    hashtag
    Clear configuration

    This method is used to clear a currently active configuration

    hashtag
    Os information

    Via the following endpoint your're able to retrieve OS information if required

    hashtag
    Info

    Retrieve the library information of the loaded configuration. When the loaded config is not present it will throw a configuration exception

    Requirements: loaded configuration

    hashtag
    slots

    Retrieve all available slots

    Requirements: loaded configuration

    The same endpoint can be triggered but only showing the slots present;

    hashtag
    Slot information

    Retrieve relevant slot information

    Requirements: loaded configuration, slotId

    hashtag
    Token information

    Retrieve information about the selected token

    Requirements: loaded configuration, slotId

    hashtag
    Retrieve aliasses

    Retrieve all aliasses for a specific token.

    Requirements: loaded configuration, slotId, verifyPin object

    hashtag
    Retrieve the Private key type

    Returns the name of the algorithm associated with this key

    Requirements: loaded configuration, slotId, Alias, verifyPin object

    hashtag
    Retrieve the certificates

    Retrieve all certificates present for a specific token.

    Requirements: loaded configuration, slotId, Alias, verifyPin object

    hashtag
    Sign

    Sign base64 data object.

    Requirements: loaded configuration, slotId, Alias, signData object

    hashtag
    Verify pin

    Verify the pin of a specific token.

    Requirements: loaded configuration, slotId, Alias, VerifyPin object

    hashtag
    Status/error codes

    TBD

    file-download
    78B
    pkcs11.cfg
    arrow-up-right-from-squareOpen
    PKCS11 example config
    This container supports functionality for Crelan bank cards

    hashtag
    Get Crelan Module

    Initialise a Trust1Connector client:

    Get the Crelan module:

    Call a function for the Crelan module:

    hashtag
    Obtain the Reader-ID

    The constructor for the Crelan expect as the parameter to be a valid reader-ID. A reader-ID can be obtained from the exposed core functionality, for more information see Core Services. Core services responds with available card-readers, available card in a card-reader, etc. For example: In order to get all connected card-readers, with available cards:

    This function call returns:

    We notice that a card object is available in the response in the context of a detected reader. The reader in the example above is VASCO DIGIPASS 870, has pin-pad capabilities, and there is a card detected with given ATR and some descriptions. An ATR (Answer To Reset) identifies the type of a smart-card. The reader, has a unique ID, reader_id; this reader_id must be used in order to request functionalities for the Crelan card. This must be done upon instantiation of the Crelan container:

    All methods for crelan will use the selected reader - identified by the reader_id.

    hashtag
    Reading data

    hashtag
    Applications

    List the supported applications on the Crelan card

    An example callback:

    Response:

    hashtag
    Application data

    The application data contains information of the holder of the card, the validity, the primary account number, ...

    An example callback:

    Response:

    hashtag
    Issuer Public Key Certificate

    On some applications there is an issuer public key certificate present. The aid parameter indicates which application you want to use, this can be fetched using the applications endpoint.

    An example callback:

    Response:

    hashtag
    ICC Public Key Certificate

    On some applications there is an icc public key certificate present. The aid parameter indicates which application you want to use, this can be fetched using the applications endpoint.

    An example callback:

    Response:

    hashtag
    Verify PIN

    hashtag
    Verify PIN without pin-pad

    When the web or native application is responsible for showing the password input, the following request is used to verify a card holder PIN:

    Response:

    hashtag
    Verify PIN with pin-pad

    When the pin entry is done on the pin-pad, the following request is used to verify a given PIN:

    Response:

    hashtag
    Verify PIN - retries left

    After an unsuccessful PIN verification, the error code indicates the number of retries left. For example, when executing:

    The following error message will be returned when PIN is wrong:

    After a second wrong PIN verification:

    Note that, when the user has at least one retry left, entering a correct PIN resets the PIN retry status.

    Code

    Description

    301

    Warning: the user can try twice more to verify his PIN

    301

    Warning: the user has only 1 retry left

    301

    Error: the PIN is blocked

    hashtag
    Sign

    • A Base64-encoded string representation of the digest bytes must be included in the data property of the request.

    • txId will be displayed on the PIN pad

    • language determines the language displayed on the PIN pad

    Additionally, it is possible to bulk sign data without having to re-enter the PIN by adding an optional bulk parameter set to true to the request. The PIN will not need to re-entered until a request with bulk being set to false is sent, or the Bulk PIN Reset method is called.

    triangle-exclamation

    When using bulk signing, great care must be taken to validate that the first signature request was successful prior to sending subsequent requests. Failing to do this will likely result in the card being blocked.

    The PIN can provided/entered in the same way as Verify PIN

    Response will look like:

    hashtag
    Error Handling

    hashtag
    Error Object

    The functions specified are asynchronous and always need a callback function. The callback function will reply with a data object in case of success, or with an error object in case of an error. An example callback:

    The error object returned:

    For the error codes and description, see Status codes.

    export interface AbstractOberthur73 {
        allCertFilters(): string[];
        allKeyRefs(): string[];
        allCerts(parseCerts?: boolean, filters?: string[] | Options, callback?: (error: T1CLibException, data: TokenAllCertsResponse) => void): Promise<TokenAllCertsResponse>;
        tokenData(callback?: (error: T1CLibException, data: TokenDataResponse) => void): Promise<TokenDataResponse>;
        rootCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
        authenticationCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
        nonRepudiationCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
        encryptionCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
        issuerCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>
        verifyPin(body: TokenVerifyPinData, callback?: (error: T1CLibException, data: TokenVerifyPinResponse) => void): Promise<TokenVerifyPinResponse>;
        authenticate(body: TokenAuthenticateOrSignData, callback?: (error: T1CLibException, data: TokenAuthenticateResponse) => void): Promise<TokenAuthenticateResponse>;
        sign(body: TokenAuthenticateOrSignData, bulk?: boolean, callback?: (error: T1CLibException, data: TokenSignResponse) => void): Promise<TokenSignResponse>;
        allAlgoRefs(callback?: (error: T1CLibException, data: TokenAlgorithmReferencesResponse) => void): Promise<TokenAlgorithmReferencesResponse>
        resetBulkPin(callback?: (error: T1CLibException, data: BoolDataResponse) => void): Promise<BoolDataResponse>;
    }
    T1cSdk.initialize(config).then(res => {
        const oberthur = res.client.createOberthur(readerId);
    }, err => {
        console.error(error)
    });
    oberthur.allCertFilters().then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: ['rootCertificate', 'authenticationCertificate', 'encryptionCertificate', 'nonRepudiationCertificate', 'issuerCertificate']
    }
    oberthur.allKeyRefs().then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: ['authenticate', 'sign', 'encrypt']
    }
    const filter = ['rootCertificate', 'authenticationCertificate', 'encryptionCertificate'];
    oberthur.allCerts(filter).then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: {
           authenticationCertificate?: {
                certificate?: TokenCertificateObject,
                certificates?: Array<TokenCertificateObject>
           },
           citizenCertificate?: {
                certificate?: TokenCertificateObject,
                certificates?: Array<TokenCertificateObject>
           },
           nonRepudiationCertificate?: {
                certificate?: TokenCertificateObject,
                certificates?: Array<TokenCertificateObject>
           },,
           rootCertificate?: {
                certificate?: TokenCertificateObject,
                certificates?: Array<TokenCertificateObject>
           },,
           encryptionCertificate?: {
                certificate?: TokenCertificateObject,
                certificates?: Array<TokenCertificateObject>
           },
        }
    }
    oberthur.tokenData().then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: {
           version?: string,
           serialNumber?: string,
           label?: string,
           changeCounter?: number,
        }
    }
    oberthur.rootCertificate(parseCertsBoolean).then(res => {
    }, err => {
        console.error(err)
    })
    oberthur.authenticationCertificate(parseCertsBoolean).then(res => {
    }, err => {
        console.error(err)
    })
    oberthur.nonRepudiationCertificate(parseCertsBoolean).then(res => {
    }, err => {
        console.error(err)
    })
    oberthur.issuerCertificate(parseCertsBoolean).then(res => {
    }, err => {
        console.error(err)
    })
    aventra.encryptionCertificate(parseCertsBoolean).then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: {
            certificate?: TokenCertificateObject,
            certificates?: Array<TokenCertificateObject>    
        }    
    }
    const data = {
        pin: "1234", // optional
        osDialog: true // optional
    }
    oberthur.verifyPin(data).then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: {
            "verfied": true
        }
    }
    const data = {
        algorithm: "sha256",
        data: "E1uHACbPvhLew0gGmBH83lvtKIAKxU2/RezfBOsT6Vs=",
        id: "123"
    }
    const bulk = false;
    oberthur.sign(data, bulk).then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: {
            data: string
        }
    }
    diplad.resetBulkPin().then(res => {
    }, err => {
        console.error(err)
    })
    {
        "success": true,
        "data": true
    }
    const data = {
        algorithm: "sha256",
        data: "E1uHACbPvhLew0gGmBH83lvtKIAKxU2/RezfBOsT6Vs="
        id: "123"
    }
    oberthur.authenticate(data).then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: {
            data: string
        }
    }
    oberthur.allAlgoRefs(data).then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: {
            ref: ['sha256', 'md5']
        }
    }
    const entity = "chambersign";
    const type = "middleware";
    const initPath = "C:\\Program Files\\ChamberSign"
    
    T1CSdk.T1CClient.initialize(config).then(res => {
        client = res;
        core = client.core();
        let fileex = client.fileex();
    
        const middlewareInstalled = await isMiddlewareInstalled(fileex);
        if (middlewareInstalled) {
            // Middleware is installed you can use the chambersign token with the T1C
        } else {
            // Middleware not installed please install before using it with the T1C
        }
        
    }, err => {
        errrorHandler(err);
    });
    
    
    async function isMiddlewareInstalled(fileexClient) {
        fileexClient.existsType(entity, type).then(existsRes => {
            if (existsRes.data) {
                // Type exists
                return checkFilesPresent(fileexClient);
            } else {
                // Type does not exist        
                fileexClient.createType(entity, type, initPath).then(createRes => {
                    return checkFilesPresent(fileexClient);
                }, err => {
                    errrorHandler(err);
                })
            }
        }, err => {
            // Type exists error, try to create and then check if middleware is installed
            fileexClient.createType(entity, type, initPath).then(createRes => {
                return checkFilesPresent(fileexClient);
            }, err => {
                errrorHandler(err);
            })
        });
    }
    
    
    async function checkFilesPresent(fileexClient) {
        await fileexClient.existsFile(entity, type, "HashLogic\\bin\\idoPKCS.dll").then(existsFileRes => {
            return existsFileRes;
        }, err => {
            return false;
        })
    }
    export interface AbstractEidGeneric {
    //  getModuleDescription(module: string, callback?: (error: T1CLibException, data: DataObjectResponse) => void): Promise<DataObjectResponse>;
    //  allData(module: string, filters?: string[] | Options, callback?: (error: T1CLibException, data: TokenAllDataResponse) => void): Promise<TokenAllDataResponse>;
      allCerts(module: string, parseCerts?: boolean,  filters?: string[] | Options, callback?: (error: T1CLibException, data: TokenAllCertsResponse) => void): Promise<TokenAllCertsResponse>;
    //  biometric(module: string, callback?: (error: T1CLibException, data: TokenBiometricDataResponse) => void): Promise<TokenBiometricDataResponse>;
    //  tokenData(module: string, callback?: (error: T1CLibException, data: TokenDataResponse) => void): Promise<TokenDataResponse>;
    //  address(module: string, callback?: (error: T1CLibException, data: TokenAddressResponse) => void): Promise<TokenAddressResponse>;
    //  picture(module: string, callback?: (error: T1CLibException, data: TokenPictureResponse) => void): Promise<TokenPictureResponse>;
    //  rootCertificate(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
    //  intermediateCertificates(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      authenticationCertificate(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      nonRepudiationCertificate(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
    //  encryptionCertificate(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      verifyPin(module: string, body: TokenVerifyPinData, callback?: (error: T1CLibException, data: TokenVerifyPinResponse) => void): Promise<TokenVerifyPinResponse>;
      authenticate(module: string, body: TokenAuthenticateOrSignData, callback?: (error: T1CLibException, data: TokenAuthenticateResponse) => void): Promise<TokenAuthenticateResponse>;
      sign(module: string, body: TokenAuthenticateOrSignData, bulk?: boolean, callback?: (error: T1CLibException, data: TokenSignResponse) => void): Promise<TokenSignResponse>;
      allAlgoRefs(module: string, callback?: (error: T1CLibException, data: TokenAlgorithmReferencesResponse) => void): Promise<TokenAlgorithmReferencesResponse>
      resetBulkPin(module: string, callback?: (error: T1CLibException, data: BoolDataResponse) => void): Promise<BoolDataResponse>;
    }
    T1CSdk.T1CClient.initialize(config).then(res => {
        client = res;
    }, err => {
        console.error(error)
    });
    var core = client.core();
    core.readersCardAvailable(callback);
    {
      "data": [
        // List of reader with cards found
      ],
      "success": true
    }
    const module = "chambersign";
    var generic = client.generic(selected_reader.id);
    generic.authenticationCertificate(module, parseCertsBoolean, callback);
    {
        "certificate": {
            "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
            "parsedCertificate": {...}
        },
        // OR if multiple certificates
        "certificates" [
            {
                "certificate": {
                    "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
                    "parsedCertificate": {...}
                }
            }
        ]
    }
    generic.nonRepudiationCertificate(module, parseCertsBoolean, callback);
    {
        "certificate": {
            "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
            "parsedCertificate": {...}
        },
        // OR if multiple certificates
        "certificates" [
            {
                "certificate": {
                    "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
                    "parsedCertificate": {...}
                }
            }
        ]
    }
    var filter = [];
    generic.allCerts(module, parseCerts, { filters: filter}, callback);
    {
     "authenticationCertificate": {
      ...
     },
     "nonRepudiationCertificate": {
      ...
     }
    }
    var filter = ['authenticationCertificate'];
    generic.allCerts(module, { filters: filter}, callback);
    {
     "authenticationCertificate": {
      ...
     }
    }
    var filter = null;
    generic.allCerts(module, { filters: filter}, callback);
    {
     "authenticationCertificate": {
      ...
     },
     "nonRepudiationCertificate": {
      ...
     }
    }
    var data = {
          "pin":"...",
          "algorithmReference":"sha1",
          "data":"I2e+u/sgy7fYgh+DWA0p2jzXQ7E=",
          "osDialog": true
    }
    generic.sign(module, data, callback);
    {
      "success": true,
      "data": "W7wqvWA8m9SBALZPxN0qUCZfB1...0nzB7hXC/Lc/fMru82m/AAqCuGTYMPKcIpQG6MtZ/SGVpZUA/71jv3D9CatmGYGZc52cpcb7cqOVT7EmhrMtwo/jyUbi/Dy5c8G05owkbgx6QxnLEuTLkfoqsW9Q="
    }
    var data = {
          "algorithmReference":"sha1",
          "data":"I2e+u/sgy7fYgh+DWA0p2jzXQ7E=",
          "osDialog": false
    }
    generic.sign(module, data, callback);
    {
        "success": true,
        "data": "W7wqvWA8m...hXC/Lc/fMru82m/AAqCuGTYMPKcIpQG6MtZ/SGVpZUA/71jv3D9CatmGYGZc52cpcb7cqOVT7EmhrMtwo/jyUbi/Dy5c8G05owkbgx6QxnLEuTLkfoqsW9Q="
    }
    const data = {
        algorithm: "sha256",
        data: "E1uHACbPvhLew0gGmBH83lvtKIAKxU2/RezfBOsT6Vs=",
        pin: "1234"
    }
    const bulk = true;
    generic.sign(module, data, bulk).then(res => {
    }, err => {
        console.error(err)
    })
    generic.resetBulkPin(module).then(res => {
    }, err => {
        console.error(err)
    })
    {
        "success": true,
        "data": true
    }
    var data = {
          "pin":"..."
    }
    generic.verifyPin(module, data, callback);
    {
      "verified": true
    }
    var data = {}
    generic.verifyPin(module, data, callback);
    {
      "verified": true
    }
    var data = {
      "pin": "...",
      "algorithm_reference": "sha1",
      "data":"I2e+u/sgy7fYgh+DWA0p2jzXQ7E="
    }
    generic.authenticate(module, data, callback);
    {
    "success": true,
    "data": "W7wqvWA8m9SBALZPxN0qUCZfB1O/WLaM/silenLzSXXmeR+0nzB7hXC/Lc/fMru82m/AAqCuGTYMPKcIpQG6MtZ/SGVpZUA/71jv3D9CatmGYGZc52cpcb7cqOVT7EmhrMtwo/jyUbi/Dy5c8G05owkbgx6QxnLEuTLkfoqsW9Q="
    }
    generic.allAlgoRefs(module, callback);
    {
        "success": true,
        "data": ["sha1", "sha256"]
    }
    export interface AbstractEidGeneric {
    //  getModuleDescription(module: string, callback?: (error: T1CLibException, data: DataObjectResponse) => void): Promise<DataObjectResponse>;
    //  allData(module: string, filters?: string[] | Options, callback?: (error: T1CLibException, data: TokenAllDataResponse) => void): Promise<TokenAllDataResponse>;
      allCerts(module: string, parseCerts?: boolean,  filters?: string[] | Options, callback?: (error: T1CLibException, data: TokenAllCertsResponse) => void): Promise<TokenAllCertsResponse>;
    //  biometric(module: string, callback?: (error: T1CLibException, data: TokenBiometricDataResponse) => void): Promise<TokenBiometricDataResponse>;
    //  tokenData(module: string, callback?: (error: T1CLibException, data: TokenDataResponse) => void): Promise<TokenDataResponse>;
    //  address(module: string, callback?: (error: T1CLibException, data: TokenAddressResponse) => void): Promise<TokenAddressResponse>;
    //  picture(module: string, callback?: (error: T1CLibException, data: TokenPictureResponse) => void): Promise<TokenPictureResponse>;
      rootCertificate(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
    //  intermediateCertificates(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      authenticationCertificate(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      nonRepudiationCertificate(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      encryptionCertificate(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      verifyPin(module: string, body: TokenVerifyPinData, callback?: (error: T1CLibException, data: TokenVerifyPinResponse) => void): Promise<TokenVerifyPinResponse>;
      authenticate(module: string, body: TokenAuthenticateOrSignData, callback?: (error: T1CLibException, data: TokenAuthenticateResponse) => void): Promise<TokenAuthenticateResponse>;
      sign(module: string, body: TokenAuthenticateOrSignData, bulk?: boolean, callback?: (error: T1CLibException, data: TokenSignResponse) => void): Promise<TokenSignResponse>;
      allAlgoRefs(module: string, callback?: (error: T1CLibException, data: TokenAlgorithmReferencesResponse) => void): Promise<TokenAlgorithmReferencesResponse>
      resetBulkPin(module: string, callback?: (error: T1CLibException, data: BoolDataResponse) => void): Promise<BoolDataResponse>;
    }
    T1CSdk.T1CClient.initialize(config).then(res => {
        client = res;
    }, err => {
        console.error(error)
    });
    var core = client.core();
    core.readersCardAvailable(callback);
    {
      "data": [
        // List of reader with cards found
      ],
      "success": true
    }
    const module = "airbus";
    var generic = client.generic(selected_reader.id);
    generic.authenticationCertificate(module, parseCertsBoolean, callback);
    {
     "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
      "parsedCertificate": {...}
    }
    generic.nonRepudiationCertificate(module, parseCertsBoolean, callback);
    {
        "certificate": {
            "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
            "parsedCertificate": {...}
        },
        // OR if multiple certificates
        "certificates" [
            {
                "certificate": {
                    "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
                    "parsedCertificate": {...}
                }
            }
        ]
    }
    generic.nonRepudiationCertificate(module, parseCertsBoolean, callback);
    {
        "certificate": {
            "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
            "parsedCertificate": {...}
        },
        // OR if multiple certificates
        "certificates" [
            {
                "certificate": {
                    "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
                    "parsedCertificate": {...}
                }
            }
        ]
    }
    generic.rootCertificate(module, parseCertsBoolean, callback);
    {
        "certificate": {
            "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
            "parsedCertificate": {...}
        },
        // OR if multiple certificates
        "certificates" [
            {
                "certificate": {
                    "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
                    "parsedCertificate": {...}
                }
            }
        ]
    }
    var filter = [];
    generic.allCerts(module, parseCerts, { filters: filter}, callback);
    {
     "authenticationCertificate": {
      ...
     },
     "nonRepudiationCertificate": {
      ...
     },
     "encryptionCertificate": {
      ...
     }
    }
    var filter = ['authenticationCertificate'];
    generic.allCerts(module, { filters: filter}, callback);
    {
     "authenticationCertificate": {
      ...
     }
    }
    var filter = null;
    generic.allCerts(module, { filters: filter}, callback);
    {
     "authenticationCertificate": {
      ...
     },
     "nonRepudiationCertificate": {
      ...
     }
    }
    var data = {
          "pin":"...",
          "algorithmReference":"sha1",
          "data":"I2e+u/sgy7fYgh+DWA0p2jzXQ7E=",
          "osDialog": true,
          "id": "id.."
    }
    generic.sign(module, data, callback);
    {
      "success": true,
      "data": "W7wqvWA8m9SBALZPxN0qUCZfB1...0nzB7hXC/Lc/fMru82m/AAqCuGTYMPKcIpQG6MtZ/SGVpZUA/71jv3D9CatmGYGZc52cpcb7cqOVT7EmhrMtwo/jyUbi/Dy5c8G05owkbgx6QxnLEuTLkfoqsW9Q="
    }
    var data = {
          "algorithmReference":"sha1",
          "data":"I2e+u/sgy7fYgh+DWA0p2jzXQ7E=",
          "osDialog": false,
          "id": "id.."
    }
    generic.sign(module, data, callback);
    {
        "success": true,
        "data": "W7wqvWA8m...hXC/Lc/fMru82m/AAqCuGTYMPKcIpQG6MtZ/SGVpZUA/71jv3D9CatmGYGZc52cpcb7cqOVT7EmhrMtwo/jyUbi/Dy5c8G05owkbgx6QxnLEuTLkfoqsW9Q="
    }
    const data = {
        algorithm: "sha256",
        data: "E1uHACbPvhLew0gGmBH83lvtKIAKxU2/RezfBOsT6Vs=",
        pin: "1234",
        id: "id.."
    }
    const bulk = true;
    generic.sign(module, data, bulk).then(res => {
    }, err => {
        console.error(err)
    })
    generic.resetBulkPin(module).then(res => {
    }, err => {
        console.error(err)
    })
    {
        "success": true,
        "data": true
    }
    var data = {
          "pin":"..."
    }
    generic.verifyPin(module, data, callback);
    {
      "verified": true
    }
    var data = {}
    generic.verifyPin(module, data, callback);
    {
      "verified": true
    }
    var data = {
      "pin": "...",
      "algorithm_reference": "sha1",
      "data":"I2e+u/sgy7fYgh+DWA0p2jzXQ7E=",
      "id": "id.."
    }
    generic.authenticate(module, data, callback);
    {
    "success": true,
    "data": "W7wqvWA8m9SBALZPxN0qUCZfB1O/WLaM/silenLzSXXmeR+0nzB7hXC/Lc/fMru82m/AAqCuGTYMPKcIpQG6MtZ/SGVpZUA/71jv3D9CatmGYGZc52cpcb7cqOVT7EmhrMtwo/jyUbi/Dy5c8G05owkbgx6QxnLEuTLkfoqsW9Q="
    }
    generic.verifyPin(module, data, callback);
    generic.allAlgoRefs(module, callback);
    {
        "success": true,
        "data": ["sha1", "sha256"]
    }
    export interface AbstractAventra {
        allCertFilters(): string[];
        allKeyRefs(): string[];
        allCerts(parseCerts?: boolean, filters?: string[] | Options, callback?: (error: T1CLibException, data: TokenAllCertsResponse) => void): Promise<TokenAllCertsResponse>;
        tokenData(callback?: (error: T1CLibException, data: TokenDataResponse) => void): Promise<TokenDataResponse>;
        rootCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
        authenticationCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
        nonRepudiationCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
        encryptionCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
        issuerCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>
        verifyPin(body: TokenVerifyPinData, callback?: (error: T1CLibException, data: TokenVerifyPinResponse) => void): Promise<TokenVerifyPinResponse>;
        authenticate(body: TokenAuthenticateOrSignData, callback?: (error: T1CLibException, data: TokenAuthenticateResponse) => void): Promise<TokenAuthenticateResponse>;
        sign(body: TokenAuthenticateOrSignData, bulk?: boolean, callback?: (error: T1CLibException, data: TokenSignResponse) => void): Promise<TokenSignResponse>;
        resetPin(body: TokenResetPinData, callback?: (error: T1CLibException, data: TokenResetPinResponse) => void): Promise<TokenResetPinResponse>
        allAlgoRefs(callback?: (error: T1CLibException, data: TokenAlgorithmReferencesResponse) => void): Promise<TokenAlgorithmReferencesResponse>
        resetBulkPin(callback?: (error: T1CLibException, data: BoolDataResponse) => void): Promise<BoolDataResponse>;
    }
    
    T1CSdk.T1CClient.initialize(config).then(res => {
        const aventra = res.client.createAventra(readerId);
    }, err => {
        console.error(error)
    });
    aventra.allCertFilters().then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: ['rootCertificate', 'authenticationCertificate', 'encryptionCertificate', 'nonRepudiationCertificate', 'issuerCertificate']
    }
    aventra.allKeyRefs().then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: ['authenticate', 'sign', 'encrypt']
    }
    const filter = ['rootCertificate', 'authenticationCertificate', 'encryptionCertificate'];
    aventra.allCerts(parseCertsBoolean, filter).then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: {
           authenticationCertificate?: {
                certificate?: TokenCertificateObject,
                certificates?: Array<TokenCertificateObject>
           },
           citizenCertificate?: {
                certificate?: TokenCertificateObject,
                certificates?: Array<TokenCertificateObject>
           },
           nonRepudiationCertificate?: {
                certificate?: TokenCertificateObject,
                certificates?: Array<TokenCertificateObject>
           },,
           rootCertificate?: {
                certificate?: TokenCertificateObject,
                certificates?: Array<TokenCertificateObject>
           },,
           encryptionCertificate?: {
                certificate?: TokenCertificateObject,
                certificates?: Array<TokenCertificateObject>
           },
        }
    }
    aventra.tokenData().then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: {
           version?: string,
           serialNumber?: string,
           label?: string,
           changeCounter?: number,
        }
    }
    aventra.rootCertificate(parseCertsBoolean).then(res => {
    }, err => {
        console.error(err)
    })
    aventra.authenticationCertificate(parseCertsBoolean).then(res => {
    }, err => {
        console.error(err)
    })
    aventra.nonRepudiationCertificate(parseCertsBoolean).then(res => {
    }, err => {
        console.error(err)
    })
    aventra.issuerCertificate(parseCertsBoolean).then(res => {
    }, err => {
        console.error(err)
    })
    aventra.encryptionCertificate(parseCertsBoolean).then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: {
            certificate?: TokenCertificateObject,
            certificates?: Array<TokenCertificateObject>    
        }    
    }
    const data = {
        pin: "1234", // optional
        osDialog: true // optional
    }
    aventra.verifyPin(data).then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: {
            "verfied": true
        }
    }
    const data = {
        algorithm: "sha256",
        data: "E1uHACbPvhLew0gGmBH83lvtKIAKxU2/RezfBOsT6Vs=",
        id: "123"
    }
    const bulk = false;
    aventra.sign(data, bulk).then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: {
            data: string
        }
    }
    aventra.resetBulkPin().then(res => {
    }, err => {
        console.error(err)
    })
    {
        "success": true,
        "data": true
    }
    const data = {
        algorithm: "sha256",
        data: "E1uHACbPvhLew0gGmBH83lvtKIAKxU2/RezfBOsT6Vs=",
        id: "123"
    }
    aventra.authenticate(data).then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: {
            data: string
        }
    }
    const data = {
        pin: "3214", //optional
        puk: "123123"
    }
    aventra.resetPin(data).then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: {
            verified: boolean
        }
    }
    aventra.allAlgoRefs(data).then(res => {
    }, err => {
        console.error(err)
    })
    {
        success: true,
        data: {
            ref: ['sha256', 'md5']
        }
    }
    T1CSdk.initialize(config).then(res => {
    
    }, err => {
        console.error(error)
    });
    var emv = client.emv(reader_id);
    function callback(err,data) {
        if(err){console.log("Error:",JSON.stringify(err, null, '  '));}
        else {console.log(JSON.stringify(data, null, '  '));}
    }
    emv.readData(callback)
    var coreService = client.core();
    core.readersCardAvailable(callback);
    var emv = client.emv(reader_id);
    client.emv(reader_id).readData(callback);
    function callback(err,data) {
        if(err){
            console.log("Error:",JSON.stringify(err, null, '  '));
        }
        else {
            console.log(JSON.stringify(data, null, '  '));
        }
    }
    {
      "data": [
          {
            "aid": "A0000000048002", 
            "name": "MAESTRO", 
            "priority": 1
          },{
            "aid": "A0000000048008", 
            "name": "MASTERCARD",
            "priority": 1
          }
        ],
      "success": true
    }
    client.emv(reader_id).readApplicationData(callback);
    function callback(err,data) {
        if(err){
            console.log("Error:",JSON.stringify(err, null, '  '));
        }
        else {
            console.log(JSON.stringify(data, null, '  '));
        }
    }
    {
     "country": "BE",
     "countryCode": "0056",
     "effectiveDate": "190201",
     "expirationDate": "241231",
     "language": "nlen",
     "name": "",
     "pan": "670...001"
    }
    // Application ID can be retrieved with the Applications endpoint
    var aid = "..."
    
    client.emv(reader_id).issuerPublicCertificate(aid, callback);
    function callback(err,data) {
        if(err){
            console.log("Error:",JSON.stringify(err, null, '  '));
        }
        else {
            console.log(JSON.stringify(data, null, '  '));
        }
    }
    {
      "data": {
        "data": "base64 encoded data", 
        "exponent": "base64 encoded data", 
        "remainder": "base64 encoded data"
      }, 
      "success": true
    }
    // Application ID can be retrieved with the Applications endpoint
    var aid = "..."
    
    client.emv(reader_id).iccPublicCertificate(aid, callback);
    function callback(err,data) {
        if(err){
            console.log("Error:",JSON.stringify(err, null, '  '));
        }
        else {
            console.log(JSON.stringify(data, null, '  '));
        }
    }
    {
     "certificate": "dxL8JnkxHneX36tdQCzz...HC3Wpt/qppk008q9OMDgVp0F7NJjCC2mXg3b/qD7c09WFXUwZ+XdkmIefhoZT/kme4QEoD49+ppQiqSeCaRjn6N0OetcjleWkPej8vE0QG4mLlG/edWTVbfMGbED9Kbjf4ooauNnq+iAVwgHedsDpdDWJLhV8sDSLQgZ1B3fMQuyZIaD79+X+H9fbhmJg+j7Lr638srglWM9VlthaWjRbFH2HzNEiQ9sOE20lmj6WM6zdYas9+Z4hcwZqWbeiTeIJDwDc6w==",
     "exponent": "AQAB",
     "remainder": ""
    }
    var data = {
        "pin": "...."
    }
    client.emv().verifyPin(data, callback);
    {
     "verified": true
    }
    var data = {}
    client.emv().verifyPin(data, callback);
    {
     "verified": true
    }
      $("#buttonValidate").on('click', function () {
          var _body={};
          _body.pin = $("#psw").val(); //only when no pin-pad available
          var emv = connector.emv(reader_id);
          emv.verifyPin(_body, validationCallback);
      });
    {
      "code": 301,
      "description": "Wrong pin, 2 tries remaining",
      "success": false
    }
    {
      "code": 301,
      "description": "Wrong pin, 1 try remaining",
      "success": false
    }
    function callback(err,data) {
        if(err){
            console.log("Error:",JSON.stringify(err, null, '  '));
        }
        else {
            console.log(JSON.stringify(data, null, '  '));
        }
    }
    {
      success: false,
      description: "some error description",
      code: "some error code"
    }
    export interface AbstractEidDiplad {
      allData(filters: string[] | Options, callback?: (error: T1CLibException, data: TokenAllDataResponse) => void): Promise<TokenAllDataResponse>;
      allCerts(parseCerts?: boolean, filters?: string[] | Options, callback?: (error: T1CLibException, data: TokenAllCertsResponse) => void): Promise<TokenAllCertsResponse>;
      biometric(callback?: (error: T1CLibException, data: TokenBiometricDataResponse) => void): Promise<TokenBiometricDataResponse>;
      tokenData(callback?: (error: T1CLibException, data: TokenDataResponse) => void): Promise<TokenDataResponse>;
      address(callback?: (error: T1CLibException, data: TokenAddressResponse) => void): Promise<TokenAddressResponse>;
      picture(callback?: (error: T1CLibException, data: TokenPictureResponse) => void): Promise<TokenPictureResponse>;
      rootCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      intermediateCertificates(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      authenticationCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      nonRepudiationCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      encryptionCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      verifyPin(body: TokenVerifyPinData, callback?: (error: T1CLibException, data: TokenVerifyPinResponse) => void): Promise<TokenVerifyPinResponse>;
      authenticate(body: TokenAuthenticateOrSignData, callback?: (error: T1CLibException, data: TokenAuthenticateResponse) => void): Promise<TokenAuthenticateResponse>;
      sign(body: TokenAuthenticateOrSignData, bulk?: boolean, callback?: (error: T1CLibException, data: TokenSignResponse) => void): Promise<TokenSignResponse>;
      allAlgoRefs(callback?: (error: T1CLibException, data: TokenAlgorithmReferencesResponse) => void): Promise<TokenAlgorithmReferencesResponse>
      resetBulkPin(callback?: (error: T1CLibException, data: BoolDataResponse) => void): Promise<BoolDataResponse>;
    }
    T1cSdk.initialize(config).then(res => {
        const diplad = res.client.createEidDiplad(readerId);
    }, err => {
        console.error(error)
    });
    diplad.allData().then(res => {
    }, err => {
       console.log(err);
    }
    {
      "data": {
        "biometric": {
          "cardNumber": "cardNumber",
          "cardValidityDateEnd": "2021-01-08",
          "chipNumber": "c57c0a3f-d034-46c9-831e-a208b2e44fb6",
          "firstNames": "Tom",
          "name": "Van Cammen",
          "nationality": "BE",
          "rawData": "BASE64_ENCODED_CARD_DATA",
          "version": "1",
          "issuer": ""
        },
        "picture": {
          "picture": "BASE64_ENCODED_BYTE_ARRAY"
        }
      },
      "success": true
    }
    diplad.biometric().then(res => {
    }, err => {
       console.log(err);
    }
    {
      "data": {
        "cardNumber": "cardNumber",
        "cardValidityDateEnd": "2021-01-08",
        "chipNumber": "c57c0a3f-d034-46c9-831e-a208b2e44fb6",
        "firstNames": "Tom",
        "name": "Van Cammen",
        "nationality": "BE",
        "rawData": "BASE64_ENCODED_CARD_DATA",
        "version": "1",
        "issuer": ""
      },
      "success": true
    }
    diplad.picture().then(res => {
    }, err => {
       console.log(err);
    }
    {
      "data": {
        "picture": "BASE64_ENCODED_BYTE_ARRAY"
      },
      "success": true
    }
    const filter = ['rootCertificate', 'authenticationCertificate', 'nonRepudiationCertificate'];
    diplad.allCerts(parseCertsBoolean, filter).then(res => {
    }, err => {
       console.log(err);
    }
    {
        success: true,
        data: {
           authenticationCertificate?: {
                 certificate?: string,
                 certificates?: Array<string>,
                 certificateType?: string,
                 id?: string,
                 parsedCertificate?: Certificate,
                 parsedCertificates?: Array<Certificate>
           },
           
           nonRepudiationCertificate?: {
                 certificate?: string,
                 certificates?: Array<string>,
                 certificateType?: string,
                 id?: string,
                 parsedCertificate?: Certificate,
                 parsedCertificates?: Array<Certificate>
           },
           rootCertificate?: {
                 certificate?: string,
                 certificates?: Array<string>,
                 certificateType?: string,
                 id?: string,
                 parsedCertificate?: Certificate,
                 parsedCertificates?: Array<Certificate>
           },
        }
    }
    diplad.rootCertificate(parseCertsBoolean).then(res => {
    }, err => {
       console.log(err);
    }
    {
        success: true,
        data: {
            certificate?: string,
            certificates?: Array<string>,
            certificateType?: string,
            id?: string,
            parsedCertificate?: Certificate,
            parsedCertificates?: Array<Certificate>
        }    
    }
    diplad.authenticationCertificate(parseCertsBoolean).then(res => {
    }, err => {
       console.log(err);
    }
    {
        success: true,
        data: {
            certificate?: string,
            certificates?: Array<string>,
            certificateType?: string,
            id?: string,
            parsedCertificate?: Certificate,
            parsedCertificates?: Array<Certificate>
        }    
    }
    diplad.nonRepudiationCertificate(parseCertsBoolean).then(res => {
    }, err => {
       console.log(err);
    }
    {
        success: true,
        data: {
            certificate?: string,
            certificates?: Array<string>,
            certificateType?: string,
            id?: string,
            parsedCertificate?: Certificate,
            parsedCertificates?: Array<Certificate>
        }    
    }
    const data = {
        pin: "1234", // optional
        osDialog: true // optional
    }
    diplad.verifyPin(data).then(res => {
    }, err => {
        console.error(err)
    })
    {
        "success": true,
        "data": {
          "verified": true
        }    
    }
    const data = {
        algorithm: "sha256",
        data: "E1uHACbPvhLew0gGmBH83lvtKIAKxU2/RezfBOsT6Vs=",
        pin: "1234"
    }
    const bulk = false;
    diplad.sign(data, bulk).then(res => {
    }, err => {
        console.error(err)
    })
    {
        "success": true,
        "data": {
          "data": "..."
        }    
    }
    const data = {
        algorithm: "sha256",
        data: "E1uHACbPvhLew0gGmBH83lvtKIAKxU2/RezfBOsT6Vs=",
        pin: "1234"
    }
    diplad.authenticate(data).then(res => {
    }, err => {
        console.error(err)
    })
    {
        "success": true,
        "data": {
          "data": "..."
        }    
    }
    diplad.allAlgoRefs().then(res => {
    }, err => {
        console.error(err)
    })
    {
        "success": true,
        "data": {
          "ref": ["sha1", "sha256", "sha512"]
        }    
    }
    diplad.resetBulkPin().then(res => {
    }, err => {
        console.error(err)
    })
    {
        "success": true,
        "data": true
    }
    interface AbstractPkcs11Generic {
        uploadConfig(config: string, callback?: (error: T1CLibException, data: Pkcs11UploadConfigResponse) => void): Promise<Pkcs11UploadConfigResponse>;
        getConfig(callback?: (error: T1CLibException, data: Pkcs11GetConfigResponse) => void): Promise<Pkcs11GetConfigResponse>;
        clearConfig(callback?: (error: T1CLibException, data: Pkcs11ClearConfigResponse) => void): Promise<Pkcs11ClearConfigResponse>;
        os(callback?: (error: T1CLibException, data: OsResponse) => void): Promise<OsResponse>;
        info(callback?: (error: T1CLibException, data: Pkcs11InfoResponse) => void): Promise<Pkcs11InfoResponse>;
        slots(callback?: (error: T1CLibException, data: Pkcs11SlotsResponse) => void): Promise<Pkcs11SlotsResponse>;
        slotsWithTokenPresent(callback?: (error: T1CLibException, data: Pkcs11SlotsResponse) => void): Promise<Pkcs11SlotsResponse>;
        slotInfo(slotId: string, callback?: (error: T1CLibException, data: Pkcs11SlotInfoResponse) => void): Promise<Pkcs11SlotInfoResponse>;
        token(slotId: string, callback?: (error: T1CLibException, data: Pkcs11TokenResponse) => void): Promise<Pkcs11TokenResponse>;
        getAliases(slotId: string, data: Pkcs11VerifyPinRequest, callback?: (error: T1CLibException, data: AliasesResponse) => void): Promise<AliasesResponse>;
        getPrivateKeyType(slotId: string, alias: string, data: Pkcs11VerifyPinRequest, callback?: (error: T1CLibException, data: PrivateKeyTypeResponse) => void): Promise<PrivateKeyTypeResponse>;
        getCertificates(slotId: string, alias: string, data: Pkcs11VerifyPinRequest, callback?: (error: T1CLibException, data: Pkcs11CertificatesResponse) => void): Promise<Pkcs11CertificatesResponse>;
        sign(slotId: string, alias: string, data: Pkcs11SignRequest, callback?: (error: T1CLibException, data: DataResponse) => void): Promise<DataResponse>;
        verifyPin(slotId: string, alias: string, data: Pkcs11VerifyPinRequest, callback?: (error: T1CLibException, data: BoolDataResponse) => void): Promise<BoolDataResponse>;
    }
    export class Pkcs11VerifyPinRequest {
        constructor(public pin?: string) {
        }
    }
    
    export class OsResponse {
        constructor(public data: Os, public success: boolean) {
        }
    }
    
    export class Os {
        constructor(public id: string, public version: string) {
        }
    }
    
    export class PrivateKeyTypeResponse {
        constructor(public data: PrivateKeyType, public success: boolean) {
        }
    }
    
    export class PrivateKeyType {
        constructor(public data: string) {
        }
    }
    
    export class Certificate {
        constructor(public certificate?: string, certSn?: string) {
        }
    }
    
    
    export class AliasesResponse {
        constructor(public data: Aliases, public success: boolean) {
        }
    }
    
    export class Aliases {
        constructor(public aliases: Alias[]) {
        }
    }
    
    export class Alias {
        constructor(public ref: string) {
        }
    }
    
    
    export class Pkcs11UploadConfigResponse {
        constructor(public data: string, public success: boolean) {
        }
    }
    
    export class Pkcs11ClearConfigResponse {
        constructor(public data: string, public success: boolean) {
        }
    }
    
    export class Pkcs11GetConfigResponse {
        constructor(public data: Pkcs11GetConfig, public success: boolean) {
        }
    }
    
    export class Pkcs11GetConfig {
        constructor(public sessionRef?: string, public tempPath?: string) {
        }
    }
    
    export class Pkcs11InfoResponse {
        constructor(public data: Pkcs11Info, public success: boolean) {
        }
    }
    
    export class Pkcs11SlotInfoResponse {
        constructor(public data: Pkcs11Slot, public success: boolean) {
        }
    }
    
    
    export class Pkcs11Info {
        constructor(public cryptokiVersion: string,
                    public manufacturerId: string,
                    public libraryDescription: string,
                    public libraryVersion: string) {
        }
    }
    
    export class Pkcs11Slots {
        constructor(public slots: Pkcs11Slot[]) {
        }
    }
    
    export class Pkcs11Slot {
        constructor(public slot: string,
                    public description: string) {
        }
    }
    
    export class Pkcs11SlotsResponse {
        constructor(public data: Pkcs11Slots, public success: boolean) {
        }
    }
    
    export class Pkcs11Certificate {
        constructor(public cert: string, public certSn: string, public parsed?: object) {
        }
    }
    
    export class Pkcs11CertificatesResponse {
        constructor(public data: Pkcs11Certificate[], public success: boolean) {
        }
    }
    
    export class Pkcs11SignRequest {
        constructor(public algorithm: string,
                    public data: string,
                    public pin?: string) {
        }
    }
    
    export class Pkcs11Config {
        constructor(public config: string) {
        }
    }
    
    export class Pkcs11TokenInfo {
        constructor(public slot: string,
                    public label: string,
                    public manufacturerId: string,
                    public model: string,
                    public serialNumber: string,
                    public flags: string,
                    public ulMaxSessionCount: number,
                    public ulSessionCount: number,
                    public ulMaxRwSessionCount: number,
                    public ulMaxPinLen: number,
                    public ulMinPinLen: number,
                    public ulTotalPublicMemory: number,
                    public ulFreePublicMemory: number,
                    public ulTotalPrivateMemory: number,
                    public ulFreePrivateMemory: number,
                    public hardwareVersion: string,
                    public firmwareVersion: string) {
        }
    }
    
    export class Pkcs11TokenResponse {
        constructor(public data: Pkcs11TokenInfo, public success: boolean) {
        }
    }
    
    export class Pkcs11ModuleConfig {
        constructor(public linux: string, public mac: string, public win: string) {
        }
    }
    function initT1C() {
        console.log("Start initializing T1C");
        var configoptions = new T1CSdk.T1CConfigOptions(
            environment.t1cApiUrl,
            environment.t1cApiPort,
            environment.t1cRpcPort,
            undefined,
            undefined,
            pkcs11,
            undefined,
            undefined,
            undefined,
            undefined,
            undefined,
            undefined,
            undefined,
            true,
            undefined,
            undefined,
            undefined,
            undefined,
            "3.0.0",
            undefined,
        );
        config = new T1CSdk.T1CConfig(configoptions);
        T1CSdk.T1CClient.initialize(config).then(res => {
            client = res;
            core = client.core();
            core.version().then(versionResult => console.log("T1C running on core "+ versionResult));
            getPkcs11Configuration();
            getSlots(); //get slots
        }, err => {
            console.log("T1C error:", err)
        });
    }
    name = Safenet
    library = /usr/local/lib/libeTPkcs11.dylib
    showInfo=true
    slot=0
    const selectedFile = document.querySelector("#pkcs11ConfigFile").files[0];
    var reader = new FileReader();
    reader.onload = function(evt) {
        client.pkcs11Generic().uploadConfig(btoa(evt.target.result))
            .then(res => {
                // Display something in the UI
            })
            .catch(err => {
                // Display something in the UI
            })
    };
    reader.readAsText(selectedFile);
    client.pkcs11Generic().getConfig()
            .then(res => {
                // Display current config in UI
            }, err => {
                // error code 806 will be thrown when no config present
            })
    client.pkcs11Generic().clearConfig()
            .then(res => {
                // clear success
            })
            .catch(err => {
                // display error
            })
    client.pkcs11Generic().os()
            .then(res => {
                // OS information
            })
            .catch(err => {
                // display error
            })
    client.pkcs11Generic().info()
            .then(res => {
                // Library information
            })
            .catch(err => {
                // display error
            })
    client.pkcs11Genericfo().slots()
            .then(res => {
                // Array of all slots available
            })
            .catch(err => {
                // display error
            })
    client.pkcs11Genericfo().slotsWithTokenPresent()
            .then(res => {
                // Array of all slots available with token present
            })
            .catch(err => {
                // display error
            })
    client.pkcs11Genericfo().slotInfo(slotId)
            .then(res => {
                // Slot information
            })
            .catch(err => {
                // display error
            })
    client.pkcs11Genericfo().token(slotId)
            .then(res => {
                // Token information
            })
            .catch(err => {
                // display error
            })
    const verifyPinData = {
        pin: "****"
    }
    client.pkcs11Genericfo().getAliases(slotId, verifyPinData)
            .then(res => {
                // Token information
            })
            .catch(err => {
                // display error
            })
    const verifyPinData = {
        pin: "****"
    }
    client.pkcs11Genericfo().getPrivateKeyType(slotId, alias, verifyPinData)
            .then(res => {
                // Token information
            })
            .catch(err => {
                // display error
            })
    const verifyPinData = {
        pin: "****"
    }
    client.pkcs11Genericfo().getCertificates(slotId, alias, verifyPinData)
            .then(res => {
                // certificates array
            })
            .catch(err => {
                // display error
            })
    const signData = {
        algorithm: 'sha256', 
        data: "E1uHACbPvhLew0gGmBH83lvtKIAKxU2/RezfBOsT6Vs=", 
        pin: "****"
    }
    client.pkcs11Genericfo().sign(slotId, alias, signData)
            .then(res => {
                // sign response
            })
            .catch(err => {
                // display error
            })
    const verifyPinData = {
        pin: "****"
    }
    client.pkcs11Genericfo().verifyPin(slotId, alias, verifyPinData)
            .then(res => {
                // boolean wether verify was success
            })
            .catch(err => {
                // display error
            })
    T1CSdk.T1CClient.initialize(config).then(res => {
      client = res;
    }, err => {
        console.error(error)
    });
    var crelan = client.crelan(reader_id);
    function callback(err,data) {
        if(err){console.log("Error:",JSON.stringify(err, null, '  '));}
        else {console.log(JSON.stringify(data, null, '  '));}
    }
    crelan.readData(callback)
    var coreService = client.core();
    core.readersCardAvailable(callback);
    var crelan = client.crelan(reader_id);
    client.crelan(reader_id).readData(callback);
    function callback(err,data) {
        if(err){
            console.log("Error:",JSON.stringify(err, null, '  '));
        }
        else {
            console.log(JSON.stringify(data, null, '  '));
        }
    }
    {
      "data": [
          {
            "aid": "A0000000048002", 
            "name": "MAESTRO", 
            "priority": 1
          },{
            "aid": "A0000000048008", 
            "name": "MASTERCARD",
            "priority": 1
          }
        ],
      "success": true
    }
    client.crelan(reader_id).readApplicationData(callback);
    function callback(err,data) {
        if(err){
            console.log("Error:",JSON.stringify(err, null, '  '));
        }
        else {
            console.log(JSON.stringify(data, null, '  '));
        }
    }
    {
     "country": "BE",
     "countryCode": "0056",
     "effectiveDate": "190201",
     "expirationDate": "241231",
     "language": "nlen",
     "name": "",
     "pan": "670...001"
    }
    // Application ID can be retrieved with the Applications endpoint
    var aid = "..."
    
    client.crelan(reader_id).issuerPublicCertificate(aid, callback);
    function callback(err,data) {
        if(err){
            console.log("Error:",JSON.stringify(err, null, '  '));
        }
        else {
            console.log(JSON.stringify(data, null, '  '));
        }
    }
    {
      "data": {
        "data": "base64 encoded data", 
        "exponent": "base64 encoded data", 
        "remainder": "base64 encoded data"
      }, 
      "success": true
    }
    // Application ID can be retrieved with the Applications endpoint
    var aid = "..."
    
    client.c(reader_id).iccPublicCertificate(aid, callback);
    function callback(err,data) {
        if(err){
            console.log("Error:",JSON.stringify(err, null, '  '));
        }
        else {
            console.log(JSON.stringify(data, null, '  '));
        }
    }
    {
     "certificate": "dxL8JnkxHneX36tdQCzz...HC3Wpt/qppk008q9OMDgVp0F7NJjCC2mXg3b/qD7c09WFXUwZ+XdkmIefhoZT/kme4QEoD49+ppQiqSeCaRjn6N0OetcjleWkPej8vE0QG4mLlG/edWTVbfMGbED9Kbjf4ooauNnq+iAVwgHedsDpdDWJLhV8sDSLQgZ1B3fMQuyZIaD79+X+H9fbhmJg+j7Lr638srglWM9VlthaWjRbFH2HzNEiQ9sOE20lmj6WM6zdYas9+Z4hcwZqWbeiTeIJDwDc6w==",
     "exponent": "AQAB",
     "remainder": ""
    }
    var data = {
        "pin": "...."
    }
    client.crelan(reader_id).verifyPin(data, callback);
    {
     "verified": true
    }
    var data = {}
    client.crelan(reader_id).verifyPin(data, callback);
    {
     "verified": true
    }
      $("#buttonValidate").on('click', function () {
          var _body={};
          _body.pin = $("#psw").val(); //only when no pin-pad available
          var crelan = connector.crelan(reader_id);
          crelan.verifyPin(_body, validationCallback);
      });
    {
      "code": 301,
      "description": "Wrong pin, 2 tries remaining",
      "success": false
    }
    {
      "code": 301,
      "description": "Wrong pin, 1 try remaining",
      "success": false
    }
    const data = {
        txId: "Tx1",
        data: "E1uHACbPvhLew0gGmBH83lvtKIAKxU2/RezfBOsT6Vs=",
        language: "fr"
    }
    const bulk = false;
    crelan.sign(data, bulk).then(res => {
    }, err => {
        console.error(err)
    })
    {
        "success": true,
        "data": {
          "data": "..."
        }    
    }
    function callback(err,data) {
        if(err){
            console.log("Error:",JSON.stringify(err, null, '  '));
        }
        else {
            console.log(JSON.stringify(data, null, '  '));
        }
    }
    {
      success: false,
      description: "some error description",
      code: "some error code"
    }
    The Belgian eID container facilitates communication with card readers with inserted Belgian eID smart card. The T1C-JS client library provides function to communicate with the smart card and facilitates integration into a web or native application. This document describes the functionality provided by the Belgian eID container on the T1C-GCL (Generic Connector Library).

    hashtag
    Interface

    hashtag
    Models

    All model information can be found in the Token typings model page

    hashtag
    Get Belgian eID container object

    Initialise a Trust1Connector client:

    Get the Belgian eID container service:

    Call a function for the Belgian eID container:

    hashtag
    Obtain the Reader-ID

    The constructor for the Belgian eID expect as the parameter to be a valid reader-ID. A reader-ID can be obtained from the exposed core functionality, for more information see Core services responds with available card-readers, available card in a card-reader, etc. For example: In order to get all connected card-readers, with available cards:

    This function call returns:

    We notice that a card object is available in the response in the context of a detected reader. The reader in the example above is Bit4id miniLector, has no pin-pad capabilities, and there is a card detected with given ATR and description "Belgian eID Card". An ATR (Answer To Reset) identifies the type of a smart-card. The reader, has a unique ID, reader_id; this reader_id must be used in order to request functionalities for the Belgian eID card. This must be done upon instantiation of the Belgian eID container:

    All methods for beid will use the selected reader - identified by the reader_id.

    hashtag
    Cardholder Information

    The card holder is the person identified using the Belgian eID card. It's important to note that all data must be validated in your backend. Data validation can be done using the appropriate certificate (public key).

    hashtag
    Biometric data

    Contains all card holder related data, excluding the card holder address and photo. The service can be called:

    An example callback:

    Response:

    hashtag
    Address

    Contains the card holder's address. The service can be called:

    Response:

    hashtag
    Picture

    Contains the card holder's picture stored on the smart card. The service can be called:

    Response:

    hashtag
    Token info

    The token info contains generic information about the card and it's capabilities. This information includes the serial number, file types for object directory files, algorithms implemented on the card, etc.

    Response

    hashtag
    Certificates

    Exposes all the certificates publicly available on the smart card.

    hashtag
    Root Certificate

    Contains the 'root certificate' stored on the smart card. The root certificate is used to sign the 'citizen CA certificate'. When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not. The service can be called:

    Response:

    hashtag
    Authentication Certificate

    Contains the 'authentication certificate' stored on the smart card. The 'authentication certificate' contains the public key corresponding to the private RSA authentication key. The 'authentication certificate' is needed for pin validation and authentication. When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not The service can be called:

    Response:

    hashtag
    Intermediate Certificate (citizen)

    Contains the citizen certificate stored on the smart card. The 'citizen certificate' is used to sign the 'authentication certificate' and the 'non-repudiation certificate'. When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not The service can be called:

    Response:

    hashtag
    Non-repudiation Certificate

    Contains the 'non-repudiation certificate' stored on the smart card. The 'non-repudiation certificate' contains the public key corresponding the private RSA non-repudiation key. When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not The service can be called:

    Response:

    hashtag
    Encryption Certificate (RRN)

    Contains the 'encryption certificate' stored on the smart card. The 'encryption certificate' corresponds to the private key used to sign the 'biometric' and 'Address' data. When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not The service can be called:

    Response:

    hashtag
    Data Filter

    hashtag
    Filter Card Holder Data

    All data on the smart card can be dumped at once, or using a filter. In order to read all data at once:

    Response:

    The filter can be used to ask a list of custom data containers. For example, we want to read only the biometric data

    Response:

    hashtag
    Filter Certificates

    All certificates on the smart card can be dumped at once, or using a filter. In order to read all certificates at once:

    Response:

    The filter can be used to ask a list of custom data containers. For example, we want to read only the rootCertificate

    Response:

    hashtag
    Sign Data

    Data can be signed using the Belgian eID smart card. To do so, the T1C-GCL facilitates in:

    • Retrieving the certificate chain (citizen-certificate, root-certificate and non-repudiation certificate)

    • Perform a sign operation (private key stays on the smart card)

    • Return the signed hash

    To get the certificates necessary for signature validation in your back-end:

    Response:

    Depending on the connected smart card reader. A sign can be executed in 2 modes:

    • Using a connected card reader with 'pin-pad' capabilities (keypad and display available)

    • Using a connected card reader without 'pin-pad' capabilities (no keypad nor display available)

    Security consideration: In order to sign a hash, security considerations prefer using a 'pin-pad'.

    hashtag
    Signing with a Crelan card reader

    When signing with a crelan card reader, it is additionally possible to optionally specify a transaction ID and the language. If the card reader is not a Crelan reader, these values will be ignored. This applies to all signing methods described below.

    circle-exclamation

    Crelan card readers only support nl, fr, and de as languages

    hashtag
    Sign Hash without pin-pad

    When the web or native application is responsible for showing the password input, the following request is used to sign a given hash:

    Response is a base64 encoded signed hash:

    The 'authenticationreference' property can contain the following values: sha1, sha256, sha512, md5.

    hashtag
    Sign Hash with pin-pad

    When the pin entry is done on the pin-pad, the following request is used to sign a given hash:

    Response is a base64 encoded signed hash:

    The 'algorithm_reference' property can contain the following values: sha1, sha256, sha512, md5.

    The core services lists connected readers, and if they have pin-pad capability. You can find more information in the Core Service documentation on how to verify card reader capabilities.

    hashtag
    Bulk Signing

    It is possible to bulk sign data without having to re-enter the PIN by adding an optional bulk parameter set to true to the request. Subsequent sign requests will not require the PIN to be re-entered until a request with bulk being set to false is sent, or the Bulk Sign Reset method is called.

    triangle-exclamation

    When using bulk signing, great care must be taken to validate that the first signature request was successful prior to sending subsequent requests. Failing to do this will likely result in the card being blocked.

    hashtag
    Bulk PIN Reset

    The PIN set for bulk signing can be reset by calling this method.

    Response will look like:

    hashtag
    Calculate Hash

    In order to calculate a hash from the data to sign, you need to know the algorithm you will use in order to sign.

    You can use the following online tool to calculate the SHA256: calculate SHA256arrow-up-right

    Hexadecimal result:

    Notice that the length of the SHA256 is always the same. Now we need to convert the hexadecimal string to a base64-encoded string, another online tool can be used for this example: hex to base64 converterarrow-up-right

    Base64-encoded result:

    Now we can sign the data:

    Result:

    Note: If you want to convert a binary signed hash to HEX (for development) you can use for example an online hexdump tool:

    http://www.fileformat.info/tool/hexdump.htmarrow-up-right

    hashtag
    Verify PIN

    hashtag
    Verify PIN without pin-pad

    When the web or native application is responsible for showing the password input, the following request is used to verify a card holder PIN:

    Response:

    hashtag
    Verify PIN with pin-pad

    When the pin entry is done on the pin-pad, the following request is used to verify a given PIN:

    Response:

    hashtag
    Verify PIN - retries left

    In order to inform a user upon the PIN retries left, the Belgian eID doesn't provide a request to retrieve this information. After an unsuccessful PIN verification, the error code indicates the number of retries left. For example, when executing:

    Note that, when the user has at least one retry left, entering a correct PIN resets the PIN retry status.

    hashtag
    Authentication

    The T1C-GCL is able to authenticate a card holder based on a challenge. The challenge can be:

    • provided by an external service

    • provided by the smart card An authentication can be interpreted as a signature use case, the challenge is signed data, that can be validated in a back-end process.

      External Challenge

      An external challenge is provided in the data property of the following example:

      Response:

      Take notice that the PIN property can be omitted when using a smart card reader with pin-pad capabilities. The 'algorithm_reference' property can contain the following values: sha1, sha256, sha512, md5.

      Generated Challenge

      A server generated challenge can be provided to the JavaScript library. In order to do so, an additional contract must be provided with the 'OCV API' (Open Certificate Validation API).

    hashtag
    Get valid algorithms to use for Sign or Authenticate

    Via the Trust1Connector modules you are able to retrieve available algorithms to use for Signing or Authenticate

    The response you can expect is a list of algorithms, an example can be found below (the values below are purely examplatory)

    circle-info

    The File-exchange payload limit is set to 50 MB. If your needs exceed this please contact support

    hashtag
    Notifications

    The File Exchange container allows the application to choose whether to notify the users in the application context, or to delegate notification to the T1C. The T1C uses the underlying operating system to notify users

    hashtag
    Context and scope

    The context of a type mapping is defined by the following concepts:

    • applicationid (property of Type class): a string value denoting the application identifier. This is the root context for entity mapping

    • entity: a string value denoting the root entity for types mapping

    • type: a string value denoting a file typing, related to the absolute path mapped by an user, this value abstracts absolute paths from an application perspective

    The following image depicts the file exchange object model:

    hashtag
    Type Mapping

    A 'Type' in the context of the File Exchange container, is a label, used by an application, to abstract the absolute path reference of the local file system. A 'Type' allows the application to perform file transfers, without the notion of the local file system organization. The File Exchange container maps the absolute path, chose by a user, on the application scoped label. We call this action a 'type mapping', this is, an absolute path, in the context of an application, is references by a label.

    A user can chose to 'persist' the Type mapping, or can decide to assign an absolute path for each individual transaction.

    hashtag
    Type subfolders

    Subfolders can be managed by the application. All subfolder are relative paths and when requested can be created, optionally recursively, by the File Exchange API. It's important to understand:

    • Type mapping : correlates to absolute paths on a local file system

    • Type subfolders: correlates to relative paths on a local file system

    The File Exchange container maintains the mapping for absolute paths. Relative paths will be created when used in the specified use case. Neither absolute paths or relative paths will result in deletion on the local file system! When deleting a 'type' (aka absolute path), the type will be removed from the File Exchange container, but the references directory will still exist on the user's file system.

    In the File Exchange API, the parameter relpath refers to an array of strings denoting a directory path.

    hashtag
    Responses

    The File Exchange API can be integrated using Promises or callbacks. Both are returning the same result.

    hashtag
    Interface

    hashtag
    Objects

    hashtag
    Enums

    The following enumerators have been exported by the File Exchange container:

    Enum

    Values

    Description

    FileSort

    ASC, DESC

    Used for sorting files. ASC = ascending, DESC = descending

    TypeStatus

    MAPPED, UNMAPPED

    Use to inform the application if a Type has been mapped to an absolute path by the user.

    hashtag
    Classes

    hashtag
    Function Descriptions

    The following functions are available in the T1C-JS library:

    JavaScript API

    Function

    Input

    Output

    Description

    download

    entity, type, file, filename, relpath, implicitCreationType, notifyOnCompletion

    success value

    Creates a file named filename at the type location, optionally in relative folder denoted by relpath, with file contents file. Optionally notifies user upon completion.

    upload

    entity, type, filename, relpath, notifyOnCompletion

    array buffer

    Uploads a file named filename, from the type location, optionally in relative folder denoted with relpath. Optionally notifies user upon completion.

    listTypes

    hashtag
    Error Responses

    The error codes mentioned are added to the File Exchange container. The exception handling follows the framework exception handling and are extensions of status codes mentioned on:

    Status codes / error handelingchevron-right

    Certigna

    circle-exclamation

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks

    hashtag
    Introduction

    The following page describes how you can integrate the Certigna module exposed on the Trust1Connector onto your web application.

    hashtag
    Interface

    circle-info

    Be aware that for certigna only the following functions are supported at this time:

    • authenticate

    • sign

    hashtag
    Models

    All model information can be found in the

    hashtag
    Initialise the Trust1Connector JS

    Initialise a Trust1Connector client with a valid configuration:

    hashtag
    Obtain the Reader information

    In order to get all connected card-readers, with available cards:

    This function call returns:

    Using the generic interface can be done as follows;

    Because we're using the generic interface we can define the module variable upfront since we know we want to use the certigna integration.

    hashtag
    Certificates

    Exposes all the certificates publicly available on the smart card.

    hashtag
    Authentication Certificate

    Contains the 'authentication certificate' stored on the smart card. The 'authentication certificate' contains the public key corresponding to the private RSA authentication key. The 'authentication certificate' is needed for pin validation and authentication. When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not The service can be called:

    Response:

    hashtag
    Non-repudiation Certificate

    Contains the 'non-repudiation certificate' stored on the smart card. The 'non-repudiation certificate' contains the public key corresponding the private RSA non-repudiation key. When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not The service can be called:

    Response:

    hashtag
    Filter Certificates

    All certificates on the smart card can be dumped at once, or using a filter. In order to read all certificates at once:

    Response:

    The filter can be used to ask a list of custom data containers. For example, we want to read only the rootCertificate

    Response:

    hashtag
    Sign Data

    To get the certificates necessary for signature validation in your back-end:

    Response:

    Depending on the connected smart card reader. A sign can be executed in 2 modes:

    • Using a connected card reader with 'pin-pad' capabilities (keypad and display available)

    • Using a connected card reader without 'pin-pad' capabilities (no keypad nor display available)

    Security consideration: In order to sign a hash, security considerations prefer using a 'pin-pad'.

    hashtag
    Sign Hash without pin-pad

    When the web or native application is responsible for showing the password input, the following request is used to sign a given hash:

    Response is a base64 encoded signed hash:

    The 'authenticationreference' property can contain the following values: sha1, sha256, sha512, md5.

    hashtag
    Sign Hash with pin-pad

    When the pin entry is done on the pin-pad, the following request is used to sign a given hash:

    Response is a base64 encoded signed hash:

    The 'algorithm_reference' property can contain the following values: sha1, sha256, sha512, md5.

    The core services lists connected readers, and if they have pin-pad capability. You can find more information in the Core Service documentation on how to verify card reader capabilities.

    hashtag
    Bulk Signing

    It is possible to bulk sign data without having to re-enter the PIN by adding an optional bulk parameter set to true to the request. Subsequent sign requests will not require the PIN to be re-entered until a request with bulk being set to false is sent, or the method is called.

    triangle-exclamation

    When using bulk signing, great care must be taken to validate that the first signature request was successful prior to sending subsequent requests. Failing to do this will likely result in the card being blocked.

    hashtag
    Bulk PIN Reset

    The PIN set for bulk signing can be reset by calling this method.

    Response will look like:

    hashtag
    Verify PIN

    hashtag
    Verify PIN without pin-pad

    When the web or native application is responsible for showing the password input, the following request is used to verify a card holder PIN:

    Response:

    hashtag
    Verify PIN with pin-pad

    When the pin entry is done on the pin-pad, the following request is used to verify a given PIN:

    Response:

    hashtag
    Authentication

    The T1C-GCL is able to authenticate a card holder based on a challenge. The challenge can be:

    • provided by an external service

    • provided by the smart card An authentication can be interpreted as a signature use case, the challenge is signed data, that can be validated in a back-end process.

      External Challenge

      An external challenge is provided in the data property of the following example:

    Response:

    Take notice that the PIN property can be omitted when using a smart card reader with pin-pad capabilities.

    hashtag
    Get valid algorithms to use for Sign or Authenticate

    Via the Trust1Connector generic modules you are able to retrieve available algorithms to use for Signing or Authenticate

    The response you can expect is a list of algorithms, an example can be found below (the values below are purely examplatory)

    Jcop3

    circle-exclamation

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

    hashtag
    Introduction

    The following page describes how you can integrate the Jcop3 module exposed on the Trust1Connector onto your web application.

    hashtag
    Interface

    hashtag
    Models

    All model information can be found in the

    hashtag
    Initialise the Trust1Connector JS

    Initialise a Trust1Connector client with a valid configuration:

    hashtag
    Obtain the Reader information

    In order to get all connected card-readers, with available cards:

    This function call returns:

    Using the generic interface can be done as follows;

    Because we're using the generic interface we can define the module variable upfront since we know we want to use the jcop3 integration.

    hashtag
    Certificates

    Exposes all the certificates publicly available on the smart card.

    hashtag
    Authentication Certificate

    Contains the 'authentication certificate' stored on the smart card. The 'authentication certificate' contains the public key corresponding to the private RSA authentication key. The 'authentication certificate' is needed for pin validation and authentication. When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not The service can be called:

    Response:

    hashtag
    Non-repudiation Certificate

    Contains the 'non-repudiation certificate' stored on the smart card. The 'non-repudiation certificate' contains the public key corresponding the private RSA non-repudiation key. When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not The service can be called:

    Response:

    hashtag
    Encryption Certificate

    Contains the 'encryption certificate' stored on the smart card. The 'encryption certificate' corresponds to the private key used to sign the 'biometric' and 'Address' data. When additional parsing of the certificate is needed you can add a boolean to indicate if you want to parse the certificate or not The service can be called:

    Response:

    hashtag
    Filter Certificates

    All certificates on the smart card can be dumped at once, or using a filter. In order to read all certificates at once:

    Response:

    The filter can be used to ask a list of custom data containers. For example, we want to read only the rootCertificate

    Response:

    hashtag
    Sign Data

    Data can be signed using the Jcop3 smart card. To do so, the T1C-GCL facilitates in:

    To get the certificates necessary for signature validation in your back-end:

    Response:

    Depending on the connected smart card reader. A sign can be executed in 2 modes:

    • Using a connected card reader with 'pin-pad' capabilities (keypad and display available)

    • Using a connected card reader without 'pin-pad' capabilities (no keypad nor display available)

    Security consideration: In order to sign a hash, security considerations prefer using a 'pin-pad'.

    hashtag
    Sign Hash without pin-pad

    When the web or native application is responsible for showing the password input, the following request is used to sign a given hash:

    Response is a base64 encoded signed hash:

    The 'authenticationreference' property can contain the following values: sha1, sha256, sha512, md5.

    hashtag
    Sign Hash with pin-pad

    circle-info

    Check the before signing with a defined algorithm

    When the pin entry is done on the pin-pad, the following request is used to sign a given hash:

    Response is a base64 encoded signed hash:

    The 'algorithm_reference' property can contain the following values: sha1, sha256, sha512, md5.

    The core services lists connected readers, and if they have pin-pad capability. You can find more information in the Core Service documentation on how to verify card reader capabilities.

    hashtag
    Bulk Signing

    It is possible to bulk sign data without having to re-enter the PIN by adding an optional bulk parameter set to true to the request. Subsequent sign requests will not require the PIN to be re-entered until a request with bulk being set to false is sent, or the method is called.

    triangle-exclamation

    When using bulk signing, great care must be taken to validate that the first signature request was successful prior to sending subsequent requests. Failing to do this will likely result in the card being blocked.

    hashtag
    Bulk PIN Reset

    The PIN set for bulk signing can be reset by calling this method.

    Response will look like:

    hashtag
    Verify PIN

    circle-info

    Verify pin only check the global sign pin at this moment

    hashtag
    Verify PIN without pin-pad

    When the web or native application is responsible for showing the password input, the following request is used to verify a card holder PIN:

    Response:

    hashtag
    Verify PIN with pin-pad

    When the pin entry is done on the pin-pad, the following request is used to verify a given PIN:

    Response:

    hashtag
    Authentication

    The T1C-GCL is able to authenticate a card holder based on a challenge. The challenge can be:

    • provided by an external service

    • provided by the smart card An authentication can be interpreted as a signature use case, the challenge is signed data, that can be validated in a back-end process.

      External Challenge

      An external challenge is provided in the data property of the following example:

    Response:

    Take notice that the PIN property can be omitted when using a smart card reader with pin-pad capabilities.

    hashtag
    Get valid algorithms to use for Sign or Authenticate

    Via the Trust1Connector modules you are able to retrieve available algorithms to use for Signing or Authenticate

    The response you can expect is a list of algorithms, an example can be found below (the values below are purely examplatory)

    PKCS11 Objects

    circle-exclamation

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

    hashtag
    Introduction

    Remote loading

    circle-exclamation

    Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

    hashtag
    Introduction

    var data = {
      "pin": "...",
      "algorithm_reference": "sha1",
      "data":"I2e+u/sgy7fYgh+DWA0p2jzXQ7E="
    }
    client.beid(reader_id).authenticate(data, callback);
    export interface AbstractEidBE {
      allData(filters?: string[] | Options, callback?: (error: T1CLibException, data: TokenAllDataResponse) => void): Promise<TokenAllDataResponse>;
      allCerts(parseCerts?: boolean, filters?: string[] | Options, callback?: (error: T1CLibException, data: TokenAllCertsResponse) => void): Promise<TokenAllCertsResponse>;
      biometric(callback?: (error: T1CLibException, data: TokenBiometricDataResponse) => void): Promise<TokenBiometricDataResponse>;
      tokenData(callback?: (error: T1CLibException, data: TokenDataResponse) => void): Promise<TokenDataResponse>;
      address(callback?: (error: T1CLibException, data: TokenAddressResponse) => void): Promise<TokenAddressResponse>;
      picture(callback?: (error: T1CLibException, data: TokenPictureResponse) => void): Promise<TokenPictureResponse>;
      rootCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      intermediateCertificates(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      authenticationCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      nonRepudiationCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      encryptionCertificate(parseCerts?: boolean, callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      verifyPin(body: TokenVerifyPinData, callback?: (error: T1CLibException, data: TokenVerifyPinResponse) => void): Promise<TokenVerifyPinResponse>;
      authenticate(body: TokenAuthenticateOrSignData, callback?: (error: T1CLibException, data: TokenAuthenticateResponse) => void): Promise<TokenAuthenticateResponse>;
      sign(body: TokenAuthenticateOrSignData, bulk?: boolean, callback?: (error: T1CLibException, data: TokenSignResponse) => void): Promise<TokenSignResponse>;
      allAlgoRefs(callback?: (error: T1CLibException, data: TokenAlgorithmReferencesResponse) => void): Promise<TokenAlgorithmReferencesResponse>
      resetBulkPin(callback?: (error: T1CLibException, data: BoolDataResponse) => void): Promise<BoolDataResponse>;
    }
    T1CSdk.T1CClient.initialize(config).then(res => {
        client = res;
    }, err => {
        console.error(error)
    });
    var beid = client.beid(reader_id);
    function callback(err,data) {
        if(err){console.log("Error:",JSON.stringify(err, null, '  '));}
        else {console.log(JSON.stringify(data, null, '  '));}
    }
    beid.biometric(callback);
    var core = client.core();
    core.readersCardAvailable(callback);
    {
      "data": [
        {
          "card": {
            "atr": "3B9813400AA503010101AD1311",
            "description": ["Belgian eID Card"]
          },
          "id": "57a3e2e71c48cee9",
          "name": "Bit4id miniLector",
          "pinpad": false
        }
      ],
      "success": true
    }
    var beid = client.beid(reader_id);
    client.beid(reader_id).biometric(callback);
    function callback(err,data) {
        if(err){
            console.log("Error:",JSON.stringify(err, null, '  '));
        }
        else {
            console.log(JSON.stringify(data, null, '  '));
        }
    }
    {
     "birthDate": "15 JUL  1993",
     "birthLocation": "Roeselare",
     "cardDeliveryMunicipality": "Avelgem",
     "cardNumber": "592..8233",
     "cardValidityDateBegin": "27.05.2015",
     "cardValidityDateEnd": "27.05.2025",
     "chipNumber": "U0xHk...EstwAjEpJQQg==",
     "documentType": "01",
     "firstNames": "Gilles Frans",
     "name": "Platteeuw",
     "nationalNumber": "930...154",
     "nationality": "Belg",
     "nobleCondition": "",
     "pictureHash": "Fqva9YCp...JKyn8=",
     "rawData": "AQw1OTIxMjQwNTgy...TARFBar2vWAqTW+axEIuyskBgFySsp/",
     "sex": "M",
     "signature": "hKys9WMjUm4ipg...14xUCg/98Y9/gP/vgG7JTRZJoKgDXLLTvLZO4qlfA==",
     "specialStatus": "0",
     "thirdName": "J",
     "version": "0"
    }
    client.beid(reader_id).address(callback);
    {
     "municipality": "Hoeselt",
     "rawData": "ARJLZXJrc...AAAAAA==",
     "signature": "mhPyeRg25H...w==",
     "streetAndNumber": "Kerkstraat X",
     "version": "0",
     "zipcode": "3730"
    }
    client.beid(reader_id).picture(callback);
    {
      "data": "/9j/4AAQSkZJRgABA...59aVpcklSDzyKUTEDGK//9k=",
      "success": true
    }
    {
      "data": {
        "eid_compliant":48,
        "electrical_perso_interface_version":0,
        "electrical_perso_version":3,
        "graphical_perso_version":7,
        "label":"BELPIC",
        "prn_generation":4,
        "raw_data":"MCcCAQAEEFNMSU4z...JFTFBJQwMCBDCeBAcDAAA=",
        "serial_number":"534C494E..1231C",
        "version":0,
        "version_rfu":0
        },
        "success": true
    }
    client.beid(reader_id).rootCertificate(parseCertsBoolean, callback);
    {
        "certificate": {
            "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
            "parsedCertificate": {...}
        },
        // OR if multiple certificates
        "certificates" [
            {
                "certificate": {
                    "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
                    "parsedCertificate": {...}
                }
            }
        ]
    }
    client.beid(reader_id).authenticationCertificate(parseCertsBoolean, callback);
    {
        "certificate": {
            "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
            "parsedCertificate": {...}
        },
        // OR if multiple certificates
        "certificates" [
            {
                "certificate": {
                    "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
                    "parsedCertificate": {...}
                }
            }
        ]
    }
    client.beid(reader_id).intermediateCertificates(parseCertsBoolean, callback);
    {
        "certificate": {
            "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
            "parsedCertificate": {...}
        },
        // OR if multiple certificates
        "certificates" [
            {
                "certificate": {
                    "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
                    "parsedCertificate": {...}
                }
            }
        ]
    }
    client.beid(reader_id).nonRepudiationCertificate(parseCertsBoolean, callback);
    {
        "certificate": {
            "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
            "parsedCertificate": {...}
        },
        // OR if multiple certificates
        "certificates" [
            {
                "certificate": {
                    "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
                    "parsedCertificate": {...}
                }
            }
        ]
    }
    client.beid(reader_id).encryptionCertificate(parseCertsBoolean, callback);
    {
        "certificate": {
            "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
            "parsedCertificate": {...}
        },
        // OR if multiple certificates
        "certificates" [
            {
                "certificate": {
                    "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
                    "parsedCertificate": {...}
                }
            }
        ]
    }
    var filter = [];
    client.beid(reader_id).allData({ filters: filter}, callback);
    {
     "picture": {
      "picture": "/9j/4AAQSkZJRgABAgEBLAEsAAD/.../wAALCADIAIwBAREA/8QA0gAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoLEAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/2gAIAQEAAD8A9JpKKWiikooooopaKSilooooopKr3d9bWaFriVEwM4J5Ncjq3jUxkixQADozjJNcze+L9WndWF20OOCI/lzRb+KtYjhIN67Z7vyf1qT/AIS3Wc5F2OnQgY/lWrovjC7hYLqJ86IkksPvCustPEumXbbUuAjYzh+K1UkWRA6MGU9CDkGn0UUUUUUUhOBk8CuY1zxOls/kWjbnH3pAMgewrz7VtWmu7gvJIzZ65NZk1wSBjOagWbn5lB+vagy7+2KlilUE7eRj1qS3ncSEE4X3qwzNs81Dgg9K19G8VXumTLFv8yDOWjb+len6bqMGp2qz2zZU8Ed1PpVyiiiiio5pkgiaSRgqKMkmuH8ReKXlMlpAAkHRnB5b29q4+e5HzAHjPFZkoLyhevH6014XUcjBqAow5xQEYjFPClDxkCnq20AkZ/xqyl2oUK4xu6n0qwgguZQ28K2Ofc1v6Pqs2lSRGJzsLAOv94d69MtriO6gSaFgyMMg1LS0UUlcn491FbfS/sicyzEH6AGvOCzuApPOakt7CWYk7TjNXE0iUNnyyfpVqPQ53XiNwPepYfDMhb94GAq5/wAIzbhc4IPpVK/8OYjzEMmsWbRZ0XIUnHtVRrR4/vqR9RSwQGXdt4Zav2rbFww6DI5ruvBuqIIjaSuMu2Y8/TpXYUtFFIa8r8W6h9v1d9mCqHYuO4FVdM0t7iZWb8a6y10+KNQCOlXFijQfKop6g9hUmw4pjoRzmopEyvIqrJEjDGKpXGnwzoQ68+1YNxpv2Ry8RPHrVGUqse4MN38Qq7o8o8kOh+dG3AjsRXpejapHqVsDkLMo+dM8/WtOiis/WrxrHTJp1GWAwOeme9eWqqzTln6k5rqNLhWKFcDmtJRk1aSPPWp0i21J5dRSx8VWKVXkQA1WmwvGDzWVegSRsp4zXNT2WwMASSxqa1kNimMBkOB9fWt7QLx4ddgaNCyyLtIHevR6Wiuf8ZsRobAdWcD+dcLYQZlHck/lXWQKEjUVZj69OlXI+manXnvTiADioXPJ4qBhVaQ/NVWbkZ7VlXeDmqRYY27Rn1rOmkDXOwKBgH8av6XOba9guVz8hA2+1epg5GaWiuf8ZqTom4fwyKf5iuS0uFiQcV0MYwgBqxH1FWl6VLGeKcxOOaaRmoZAcVTkBqrOcL61j3B5NVgducVXkeOOXLKMt1p9tIsyjaAMGvVI+I1+gp9FZXiOAT6LcKRnaN35Vy+lhfKJ9Kv+cifeYACpIry3A5kA+tW1uYmXKuD+NSRzDseKl3gjrTS47UhYAGqFxINxqhcSA8ZrPlQmq8kZArNujljkdBUuhAy3cUOOWdRXrY4FLRUN0iSW8iSkBGUg5riLGMrbzxq3IkI3CozpuWZmnkye+6qT6TlmPnkk9M1Smsbq3OUuOOvWtDTrq4j+V5CRn1rpIZy6ZNSbiBz1qneXphFcpqmqzyNiJiBnqKyl+33DDZJL9dxq2i6pDg7mYehNX7a/lx5d5EADwGHUVBeR/MfT2q/4It2n10vtykY3H29K9MpaSsLxKJJo4oI5Ci53NjvWbbweUGAH3sE5qG8DpnqB7CsKNru7umitUKgdXbqay3m1L7cluxlMm/DAqMYrqLfTW5DKAw7joa1LRCnDVNelYo91cXq13NcMfLDbAcA+tVbXTppyzMrNtGSq9RTP7VhgZY44HBP+1k1Zi1LzZNgbOexGCKS8kwQcc1LM4ayeT0Sl8M+IhpDzfuA4kwCe+BXqFldxXtrHcQnKOMjNWKSsfV48zI3qMVVwpIA5xxTpI1bqBVNrRQ25EwfVaja3cybtgz/eK81ahjKrz1pTwR6k1U1aQ/Zm57VhQKDGhAyBWxatHACUXbuHOO9Yt3plol01wkWSTnGazLixaW5EsSbSO4q5HZu6Ey9R0qLUQYNOcdA3FY1vGS4wK9f8NQtBolurdSC2PrWtRWfqoHlI3cHFZUXJJ9TU3U4xxTguKdsyM1FINtQNjcKpauC1uwHORWLYsAAhPStqOPKAjoaHhU8Fc1G0KDouKgmUBTisDXCTBGoxgtk1W02AysoUclgK9it4hDBHGOiKFqWiqWppvtT7EGsgKoGVJB7ip161KoWlY4qrctjGOpqCJd74JqLUlVYic8YrlI22ySSKehzXUWDCa2RxzkVaaMVUnXaDWXdzBVIzziuf1Pc80MS9x1rd8Maa39qxRucqhDtj2r0elopkiCRGRuhGKxJreaFipQlB/EBTA2Dih5tg4ySeAKlUnbufr6VBOpkBA4PassR3NtIZJJ/MB/h24xWDr+rySYihU+/NZULXMkXlrHyepFdfoYaG1RG5IFa7yZTIrNv5gqHmudnn3zgdeazrjL3+7PyggV6J4QgY28ly643YRT64610tFFJTXXcjL6jFc+/BIP8ACcUKoEm888YFI13GuVkbafehZ4uu8UOYpVwGGazp9KtmYs2AfempZQx524pyusRAyKkEuXU9jxWNrUxUsnc1k26F50U9WIFd1F4N08XCzu0rdCUJ4Jro0RY0VEUKqjAA7U+iiikrCvV2Xki9ic1BExDYPOKL6xhvIdrqM9j6VjmwNuNiu6/8CzUiW0uw73bOOCADVO7hulGRIxY9iOKy5RfgnbKB+NLZWWp3EwMtwBHnPU8106xrFGiZzt5JNcpqdyLnVWVOUU81a0GL7TrdsmMgOCfoDmvUaWiiiikrM1aHlJh0HBrNBAcZqcnH0qJ1EnBGaqvGy/dPFU51mfv+tVRaNnLc/Wp0cRLgHmqup35hs2AJ8xxgYrBijKRlm+8eSa6nwLbbryW4b+EYFd5RRRRRRVXURmxlz7fzrmDJ820noavoQ0WCcmlQZpXjBGarMijpzVedBtJNZczbSTmsW6k864BY/Kvaomk3sFB4rtfBO398F6BcV19FFFFFFVr/AJs5fpXLXEJK716imWt5tOxzir6Tqe9JLcAcbhUTTrt4Iqhc3IOQGrA1C/CcZ56VkPOzHr1p0JZ32r07mu/8ELsaYZ5K5rsKKKKSloqtfnFnL9KwkAP41Qv7I53R9ax5ri5tzhg31qm+qzdDzUb6zKBjAqlNqkrZxwTWe8jSOSSSalhiaRgO1a1tAsYA711/hA7bpx6qa7CikpaSio1njZioYZHWs/UdQtmhlgjnjeUYyinJHPes2M5HNPYDbiqr28cvyuoIqjceH7eQ5AI+lZ0vhyME4Z/zqjPoiRZ5aqBslRulXbe3woOKtLGc8itvQJxbXqseh4NdRPqaxpujjMnqAcYHrToNShlAz8h96mkvLeJQ0k8aKe7MBT0uIZF3JNGy+qsCKqajfx2gUFvmJ6ZrB1HxUkSttIGOOtcpfeK5jC8dsxDP1f0+laehxeVp8cjcyTfOxPU1uRmpm6VAchqkEmKjkcYz0rJvGDZrJMe+Tgd6vRwbU6UpTBqS1O2ZT71vRkSJtakaARITyy+3UVyXiXUTvijEqugB+6en1rJi1AqmN7D6Gut8S61a6XKipbieSRSSXPSuBv8AUZbyQlwFXP3VGAKp7q9B0OTzdLtG/wBnH5VtR1Z6ionXnIprDI6VWkjB/i5qnPCMHAqCCAeZyKutGoWqsvBqOM4cH3rcgOQKvRNxisbxB4ettQgaZcRToM7gOv1rgEvzAvl+VE+D1K1//9k="
     },
     "biometric": {
      "birthDate": "15 JUL  1993",
      "birthLocation": "Roeselare",
      "cardDeliveryMunicipality": "Avelgem",
      "cardNumber": "592124058233",
      "cardValidityDateBegin": "27.05.2015",
      "cardValidityDateEnd": "27.05.2025",
      "chipNumber": "...==",
      "documentType": "01",
      "firstNames": "Gilles Frans",
      "name": "Platteeuw",
      "nationalNumber": "...",
      "nationality": "Belg",
      "nobleCondition": "",
      "pictureHash": "...=",
      "rawData": "...+axEIuyskBgFySsp/",
      "sex": "M",
      "signature": ".../OlA44h4YCM/h+J14xUCg/98Y9/.../C/RB2dtVbHwFvDuafmr4ZEshTlZTLidHKlISFvFWOtsLAEPCbl5LjfQwcOKe0pDADtHb4IStBnr+aaE8oHsTaKq66Y+zt+AbwdmWOrMA5URKKf7dZkY7jt3h8KZDw36VjcytUgjxVIdqwHsDkmIjK6mJtakIwybS5wn3RiQj33/vgG7JTRZJoKgDXLLTvLZO4qlfA==",
      "specialStatus": "0",
      "thirdName": "J",
      "version": "0"
     },
     "address": {
      "municipality": "Hoeselt",
      "rawData": "...==",
      "signature": "...+Evety1PnTE4pqXaHgBxIpk+P8kRL5W3zDV+../../..+YoHBC9KqTmSpl5KULxdnKiyCt+2RyJdzE2wyoymjRmysIhJy1wW9PRnx99S1TFqQLuc0tyBmkBPR4aFqmOq4a7zqd0q2Q1g+BbnwJ4d3oa10ia5+0kBXf0THoXv3HYIHlnwhBMfAtWzPnFrYBuAKTwyl7yBF5IFfXFpGWuVZUTJElgNcmNvsHMnAhVwDw==",
      "streetAndNumber": "Kerkstraat X",
      "version": "0",
      "zipcode": "3730"
     }
    }
    var filter = ['biometric'];
    client.beid().allData({ filters: filter }, callback);
    {
     "biometric": {
      "birthDate": "15 JUL  1993",
      "birthLocation": "Roeselare",
      "cardDeliveryMunicipality": "Avelgem",
      "cardNumber": "592124058233",
      "cardValidityDateBegin": "27.05.2015",
      "cardValidityDateEnd": "27.05.2025",
      "chipNumber": "...==",
      "documentType": "01",
      "firstNames": "Gilles Frans",
      "name": "Platteeuw",
      "nationalNumber": "...",
      "nationality": "Belg",
      "nobleCondition": "",
      "pictureHash": "...=",
      "rawData": "...+axEIuyskBgFySsp/",
      "sex": "M",
      "signature": ".../OlA44h4YCM/h+J14xUCg/98Y9/.../C/RB2dtVbHwFvDuafmr4ZEshTlZTLidHKlISFvFWOtsLAEPCbl5LjfQwcOKe0pDADtHb4IStBnr+aaE8oHsTaKq66Y+zt+AbwdmWOrMA5URKKf7dZkY7jt3h8KZDw36VjcytUgjxVIdqwHsDkmIjK6mJtakIwybS5wn3RiQj33/vgG7JTRZJoKgDXLLTvLZO4qlfA==",
      "specialStatus": "0",
      "thirdName": "J",
      "version": "0"
     }
    }
    var filter = [];
    client.beid(reader_id).allCerts(parseCerts, { filters: filter}, callback);
    {
     "rootCertificate": {
      ...
     },
     "authenticationCertificate": {
      ...
     },
     "nonRepudiationCertificate": {
      ...
     },
     "intermediateCertificates": {
      ...
     },
     "encryptionCertificate": {
      ...
     }
    }
    var filter = ['rootCertificate'];
    client.beid(reader_id).allCerts(parseCerts, { filters: filter}, callback);
    {
     "rootCertificate": {
      ...
     }
    }
    var filter = null;
    client.beid(reader_id).allCerts(parseCerts, { filters: filter}, callback);
    {
     "rootCertificate": {
      ...
     },
     "authenticationCertificate": {
      ...
     },
     "nonRepudiationCertificate": {
      ...
     },
     "intermediateCertificates": {
      ...
     },
     "encryptionCertificate": {
      ...
     }
    }
    var data = {
          "pin":"...",
          "algorithmReference":"sha1",
          "data":"I2e+u/sgy7fYgh+DWA0p2jzXQ7E=",
          "osDialog": true,
          "txId": "1234",
          "language": "fr"
    }
    client.beid(reader_id).sign(data, callback);
    var data = {
          "pin":"...",
          "algorithmReference":"sha1",
          "data":"I2e+u/sgy7fYgh+DWA0p2jzXQ7E=",
          "osDialog": true
    }
    client.beid(reader_id).sign(data, callback);
    {
      "success": true,
      "data": "W7wqvWA8m9SBALZPxN0qUCZfB1O/WLaM/silenLzSXXmeR+0nzB7hXC/Lc/fMru82m/AAqCuGTYMPKcIpQG6MtZ/SGVpZUA/71jv3D9CatmGYGZc52cpcb7cqOVT7EmhrMtwo/jyUbi/Dy5c8G05owkbgx6QxnLEuTLkfoqsW9Q="
    }
    var data = {
          "algorithmReference":"sha1",
          "data":"I2e+u/sgy7fYgh+DWA0p2jzXQ7E=",
          "osDialog": false
    }
    client.beid(reader_id).sign(data, callback);
    {
        "success": true,
        "data": "W7wqvWA8m9SBALZPxN0qUCZfB1O/WLaM/silenLzSXXmeR+0nzB7hXC/Lc/fMru82m/AAqCuGTYMPKcIpQG6MtZ/SGVpZUA/71jv3D9CatmGYGZc52cpcb7cqOVT7EmhrMtwo/jyUbi/Dy5c8G05owkbgx6QxnLEuTLkfoqsW9Q="
    }
    const data = {
        algorithm: "sha256",
        data: "E1uHACbPvhLew0gGmBH83lvtKIAKxU2/RezfBOsT6Vs=",
        pin: "1234"
    }
    const bulk = true;
    beid.sign(data, bulk).then(res => {
    }, err => {
        console.error(err)
    })
    beid.resetBulkPin().then(res => {
    }, err => {
        console.error(err)
    })
    {
        "success": true,
        "data": true
    }
    This is sample text to demonstrate siging with Belgian eID
    135b870026cfbe12dec348069811fcde5bed28800ac54dbf45ecdf04eb13e95b
    E1uHACbPvhLew0gGmBH83lvtKIAKxU2/RezfBOsT6Vs=
    var data = {
          "pin":"...",
          "algorithmReference":"sha256",
          "data":"E1uHACbPvhLew0gGmBH83lvtKIAKxU2/RezfBOsT6Vs="
    }
    client.beid(reader_id).signData(data, callback);
    {
      "data": "C7SG5eix1+lzMcZXgL0bCL+rLxKhd8ngrSj6mvlgooWH7CloEU13Rj8QiQHdhHnZgAi4Q0fCMIqAc4dn9uW9OP+MRitimRpYZcaDsGrUehPi/JpOD1e+ko7xKZ67ijUU4KTmG4HXc114oJ7xxx3CGL7TNFfvuEphLbbZa+9IZSSnYDOOENJqhggqqu7paSbLJrxC2zaeMxODKb5WSexHnZH6NnLPl2OmvPTYtxiTUMrLbFRsDRAziF6/VQkgM8/xOm+1/9Expv5DSLRY8RQ+wha6/nMlJjx50JszYIj2aBQKp4AOxPVdPewVGEWF4NF9ffrPLrOA2v2d7t5M4q7yxA==",
      "success": true
    }
    var data = {
          "pin":"..."
    }
    client.beid(reader_id).verifyPin(data, callback);
    {
      "verified": true
    }
    var data = {}
    client.beid(reader_id).verifyPin(data, callback);
    {
      "verified": true
    }
      $("#buttonValidate").on('click', function () {
          var _body={};
          _body.pin = $("#psw").val(); //only when no pin-pad available
          var beid = connector.beid(reader_id);
          beid.verifyPin(_body, validationCallback);
      });
    The calculated digest of the hash is prefixed with:
    DigestInfo ::= SEQUENCE {
          digestAlgorithm AlgorithmIdentifier,
          digest OCTET STRING
      }
    Make sure this has been taken into consideration in order to validate the signature in a backend process.
    generic.allAlgoRefs(module, callback);
    {
        "success": true,
        "data": ["sha1", "sha256"]
    }
    interface AbstractFileExchange {
        download(entity: string, type: string, file: Blob, fileName: string, relPath?: [string], implicitCreationType?: boolean, notifyOnCompletion?: boolean, callback?: (error: T1CLibException, data: FileListResponse) => void): Promise<DataResponse>;
        upload(entity: string, type: string, fileName: string, rel_path?: [string], notifyOnCompletion?: boolean, callback?: (error: T1CLibException, data: FileListResponse) => void): Promise<Blob>;
        listTypes(entity?: string, page?: Page, callback?: (error: T1CLibException, data: TypeListResponse) => void): Promise<TypeListResponse>;
        listType(entity: string, type: string, callback?: (error: T1CLibException, data: TypeResponse) => void): Promise<TypeResponse>;
        listTypeContent(entity: string, type: string, relPath?: [string], page?: Page, callback?: (error: T1CLibException, data: FileListResponse) => void): Promise<FileListResponse>;
        listContent(entity: string, page?: Page, callback?: (error: T1CLibException, data: FileListResponse) => void): Promise<FileListResponse>;
        existsType(entity: string, type: string, callback?: (error: T1CLibException, data: BoolDataResponse) => void): Promise<BoolDataResponse>;
        existsFile(entity: string, type: string, relPath: [string], callback?: (error: T1CLibException, data: BoolDataResponse) => void): Promise<BoolDataResponse>;
        getAccessMode(entity: string, type: string, relPath?: [string], callback?: (error: T1CLibException, data: DataResponse) => void): Promise<DataResponse>;
        createDir(entity: string, type: string, relPath: [string], recursive?: boolean, callback?: (error: T1CLibException, data: FileResponse) => void): Promise<FileResponse>;
        copyFile(entity: string, fromType: string, toType: string, fileName: string, newfileName: string, fromrelPath?: [string], toRelPath?: [string], callback?: (error: T1CLibException, data: FileResponse) => void): Promise<FileResponse>;
        moveFile(entity: string, fromType: string, toType: string, fileName: string, fromrelPath?: [string], toRelPath?: [string], callback?: (error: T1CLibException, data: FileResponse) => void): Promise<FileResponse>;
        renameFile(entity: string, type: string, fileName: string, newfileName: string, relPath?: [string], callback?: (error: T1CLibException, data: FileResponse) => void): Promise<FileResponse>;
        getFileInfo(entity: string, type: string, fileName: string, relPath?: [string], callback?: (error: T1CLibException, data: FileResponse) => void): Promise<FileResponse>;
        createType(entity: string, type: string, initPath?: [string], modal?: boolean, timeout?: number, callback?: (error: T1CLibException, data: TypeResponse) => void): Promise<TypeResponse>;
        createTypeDirs(entity: string, type: string, rel_path: [string], modal?: boolean, timeout?: number, callback?: (error: T1CLibException, data: FileListResponse) => void): Promise<FileListResponse>;
        updateType(entity: string, type: string, timeout?: number, callback?: (error: T1CLibException, data: TypeResponse) => void): Promise<TypeResponse>;
        deleteType(entity: string, type: string, callback?: (error: T1CLibException, data: boolean) => void): Promise<boolean>;
    }
    enum FileSort {ASC, DESC}
    enum TypeStatus {MAPPED,UNMAPPED}
    class T1CResponse {
        constructor(public success: boolean, public data?: any) {}
    }
    
    class ListFilesRequest {
        constructor(public path: string, public extensions: string[]) {}
    }
    
    export class File {
        constructor(public extension: string,
                    public name: string,
                    public path: string,
                    public relPath: string[],
                    public type: string,
                    public entity: string,
                    public size: number,
                    public lastModificationTime: string,
                    public isDir: boolean,
                    public access: string) {}
    }
    
    class FileListResponse extends T1CResponse {
        constructor(public data: FileList, public success: boolean) {
        super(success, data);
        }
    }
    
    class FileList {
        constructor(public files: File[], public total: number) {}
    }
    
    class FileResponse extends T1CResponse {
        constructor(public data: File, public success: boolean) {
            super(success, data);
        }
    }
    
    class TypeListResponse extends T1CResponse {
        constructor(public data: TypeList, public success: boolean) {
            super(success, data);
        }
    }
    
    class TypeResponse extends T1CResponse {
        constructor(public data: Type, public success: boolean){
            super(success, data);
        }
    }
    
    class Type {
        constructor(public entity: string, public type: string, public path: string, access: string, status: TypeStatus, public files: number, public appid?: string) {}
    }
    
    class TypeList{
        constructor(public types: Type[], public total: number) {}
    }
    
    class Page {
        constructor (public start: number, public size: number, public sort: FileSort) {}
    }
    
    class DataArrayResponse extends T1CResponse {
        constructor(public data: string[], public success: boolean) {
            super(success, data);
        }
    }
    
    class DataResponse extends T1CResponse {
        constructor(public data: string, public success: boolean) {
            super(success, data);
        }
    }
    
    class RestException {
        constructor(public status: number, public code: string, public description: string, public client?: GCLClient) {
            ObjectUtil.removeNullAndUndefinedFields(this);
        }
    }
    

    verifyPin

  • AuthenticationCertificate

  • NonRepudiationCertificate

  • AllCerts(auth, nonrep)

  • allAlgoRefs

  • resetBulkPin

  • Token typings model page
    Bulk Sign Reset
    Token typings model page
    valid algorithm options
    Bulk Sign Reset
    The PKCS #11 standard defines a platform-independent API to cryptographic tokens, such as hardware security modules (HSM), smart cards, and names the API itself "Cryptoki" (from "cryptographic token interface" and pronounced as "crypto-key" - but "PKCS #11" is often used to refer to the API as well as the standard that defines it). The API defines most commonly used cryptographic object types (RSAX.509 keys, DES/Triple DES Certificates/keys, etc.) and all the functions needed to use, create/generate, modify and delete those objects. This container relies on a PKCS#11 a library which handles the communication with the token/card. This can be a vendor specific library or an opensource one, please select the correct one depending on the type of token/card you are using.

    hashtag
    Interface Summary

    The Abstract PKCS #11 smartcard interface is summarised in the following snippet:

    hashtag
    Pkcs11 object models

    hashtag
    Get the PKCS #11 container object

    For more information on how to configure the JS client library see Configuration.

    circle-info

    Depending on the OS you need to provide a valid location to the desired PKCS11 library to be used.

    Call a function for the PKCS #11 container:

    hashtag
    Reading data

    hashtag
    Slots

    This methods returns the available slots on the system.

    An example response:

    hashtag
    Slots with tokens present

    This method is similar the the slots endpoint but only returns a list of slots where a token is present.

    An example response:

    hashtag
    Token

    This methods returns the token information for a slot.

    An example response:

    hashtag
    Certificates

    This methods allows you to retrieve the certificates from the PKCS #11 token.

    Response:

    hashtag
    Signing data

    To successfully sign data, we need the following parameters:

    • Slot ID of the token to use

    • Certificate ID of the signing certificate

    • PIN code

    • Hashed data to sign

    • Hashing algorithm used

    The slot id can be found using either a call to slots, slotsWithTokenPresent. Once the slot id is found, the certificates can be retrieved with a call to certificates. This then returns the certificate id. Now we can combine this with the PIN code and hashed data + hashing algorithm (SHA1, SHA256, SHA384, SHA512) to create the final signData call:

    hashtag
    signData call

    Returns signed data for provided input data.

    An example response:

    hashtag
    Error Handling

    hashtag
    Error Object

    The functions specified are asynchronous and always need a callback function. The callback function will reply with a data object in case of success, or with an error object in case of an error. An example callback:

    The error object returned:

    {
    "success": true,
    "data": "W7wqvWA8m9SBALZPxN0qUCZfB1O/WLaM/silenLzSXXmeR+0nzB7hXC/Lc/fMru82m/AAqCuGTYMPKcIpQG6MtZ/SGVpZUA/71jv3D9CatmGYGZc52cpcb7cqOVT7EmhrMtwo/jyUbi/Dy5c8G05owkbgx6QxnLEuTLkfoqsW9Q="
    }
    export interface AbstractEidGeneric {
    //  getModuleDescription(module: string, callback?: (error: T1CLibException, data: DataObjectResponse) => void): Promise<DataObjectResponse>;
    //  allData(module: string, filters?: string[] | Options, callback?: (error: T1CLibException, data: TokenAllDataResponse) => void): Promise<TokenAllDataResponse>;
      allCerts(module: string, parseCerts?: boolean,  filters?: string[] | Options, callback?: (error: T1CLibException, data: TokenAllCertsResponse) => void): Promise<TokenAllCertsResponse>;
    //  biometric(module: string, callback?: (error: T1CLibException, data: TokenBiometricDataResponse) => void): Promise<TokenBiometricDataResponse>;
    //  tokenData(module: string, callback?: (error: T1CLibException, data: TokenDataResponse) => void): Promise<TokenDataResponse>;
    //  address(module: string, callback?: (error: T1CLibException, data: TokenAddressResponse) => void): Promise<TokenAddressResponse>;
    //  picture(module: string, callback?: (error: T1CLibException, data: TokenPictureResponse) => void): Promise<TokenPictureResponse>;
    //  rootCertificate(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
    //  intermediateCertificates(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      authenticationCertificate(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      nonRepudiationCertificate(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
    //  encryptionCertificate(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      verifyPin(module: string, body: TokenVerifyPinData, callback?: (error: T1CLibException, data: TokenVerifyPinResponse) => void): Promise<TokenVerifyPinResponse>;
      authenticate(module: string, body: TokenAuthenticateOrSignData, callback?: (error: T1CLibException, data: TokenAuthenticateResponse) => void): Promise<TokenAuthenticateResponse>;
      sign(module: string, body: TokenAuthenticateOrSignData, bulk?: boolean, callback?: (error: T1CLibException, data: TokenSignResponse) => void): Promise<TokenSignResponse>;
      allAlgoRefs(module: string, callback?: (error: T1CLibException, data: TokenAlgorithmReferencesResponse) => void): Promise<TokenAlgorithmReferencesResponse>
      resetBulkPin(module: string, callback?: (error: T1CLibException, data: BoolDataResponse) => void): Promise<BoolDataResponse>;
    }
    T1CSdk.T1CClient.initialize(config).then(res => {
        client = res;
    }, err => {
        console.error(error)
    });
    var core = client.core();
    core.readersCardAvailable(callback);
    {
      "data": [
        // List of reader with cards found
      ],
      "success": true
    }
    const module = "certigna";
    var generic = client.generic(selected_reader.id);
    generic.authenticationCertificate(module, parseCertsBoolean, callback);
    {
        "certificate": {
            "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
            "parsedCertificate": {...}
        },
        // OR if multiple certificates
        "certificates" [
            {
                "certificate": {
                    "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
                    "parsedCertificate": {...}
                }
            }
        ]
    }
    generic.nonRepudiationCertificate(module, parseCertsBoolean, callback);
    {
        "certificate": {
            "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
            "parsedCertificate": {...}
        },
        // OR if multiple certificates
        "certificates" [
            {
                "certificate": {
                    "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
                    "parsedCertificate": {...}
                }
            }
        ]
    }
    var filter = [];
    generic.allCerts(module, parseCerts, { filters: filter}, callback);
    {
        "certificate": {
            "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
            "parsedCertificate": {...}
        },
        // OR if multiple certificates
        "certificates" [
            {
                "certificate": {
                    "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
                    "parsedCertificate": {...}
                }
            }
        ]
    }
    var filter = ['authenticationCertificate'];
    generic.allCerts(module, { filters: filter}, callback);
    {
        "certificate": {
            "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
            "parsedCertificate": {...}
        },
        // OR if multiple certificates
        "certificates" [
            {
                "certificate": {
                    "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
                    "parsedCertificate": {...}
                }
            }
        ]
    }
    var filter = null;
    generic.allCerts(module, { filters: filter}, callback);
    {
     "authenticationCertificate": {
      ...
     },
     "nonRepudiationCertificate": {
      ...
     }
    }
    var data = {
          "pin":"...",
          "algorithmReference":"sha1",
          "data":"I2e+u/sgy7fYgh+DWA0p2jzXQ7E=",
          "osDialog": true
    }
    generic.sign(module, data, callback);
    {
      "success": true,
      "data": "W7wqvWA8m9SBALZPxN0qUCZfB1...0nzB7hXC/Lc/fMru82m/AAqCuGTYMPKcIpQG6MtZ/SGVpZUA/71jv3D9CatmGYGZc52cpcb7cqOVT7EmhrMtwo/jyUbi/Dy5c8G05owkbgx6QxnLEuTLkfoqsW9Q="
    }
    var data = {
          "algorithmReference":"sha1",
          "data":"I2e+u/sgy7fYgh+DWA0p2jzXQ7E=",
          "osDialog": false
    }
    generic.sign(module, data, callback);
    {
        "success": true,
        "data": "W7wqvWA8m...hXC/Lc/fMru82m/AAqCuGTYMPKcIpQG6MtZ/SGVpZUA/71jv3D9CatmGYGZc52cpcb7cqOVT7EmhrMtwo/jyUbi/Dy5c8G05owkbgx6QxnLEuTLkfoqsW9Q="
    }
    const data = {
        algorithm: "sha256",
        data: "E1uHACbPvhLew0gGmBH83lvtKIAKxU2/RezfBOsT6Vs=",
        pin: "1234"
    }
    const bulk = true;
    generic.sign(module, data, bulk).then(res => {
    }, err => {
        console.error(err)
    })
    generic.resetBulkPin(module).then(res => {
    }, err => {
        console.error(err)
    })
    {
        "success": true,
        "data": true
    }
    var data = {
          "pin":"..."
    }
    generic.verifyPin(module, data, callback);
    {
      "verified": true
    }
    var data = {}
    generic.verifyPin(module, data, callback);
    {
      "verified": true
    }
    var data = {
      "pin": "...",
      "algorithm_reference": "sha1",
      "data":"I2e+u/sgy7fYgh+DWA0p2jzXQ7E="
    }
    generic.authenticate(module, data, callback);
    {
    "success": true,
    "data": "W7wqvWA8m9SBALZPxN0qUCZfB1O/WLaM/silenLzSXXmeR+0nzB7hXC/Lc/fMru82m/AAqCuGTYMPKcIpQG6MtZ/SGVpZUA/71jv3D9CatmGYGZc52cpcb7cqOVT7EmhrMtwo/jyUbi/Dy5c8G05owkbgx6QxnLEuTLkfoqsW9Q="
    }
    generic.allAlgoRefs(module, callback);
    {
        "success": true,
        "data": ["sha1", "sha256"]
    }
    export interface AbstractEidGeneric {
    //  getModuleDescription(module: string, callback?: (error: T1CLibException, data: DataObjectResponse) => void): Promise<DataObjectResponse>;
    //  allData(module: string, filters?: string[] | Options, callback?: (error: T1CLibException, data: TokenAllDataResponse) => void): Promise<TokenAllDataResponse>;
      allCerts(module: string, parseCerts?: boolean,  filters?: string[] | Options, callback?: (error: T1CLibException, data: TokenAllCertsResponse) => void): Promise<TokenAllCertsResponse>;
    //  biometric(module: string, callback?: (error: T1CLibException, data: TokenBiometricDataResponse) => void): Promise<TokenBiometricDataResponse>;
    //  tokenData(module: string, callback?: (error: T1CLibException, data: TokenDataResponse) => void): Promise<TokenDataResponse>;
    //  address(module: string, callback?: (error: T1CLibException, data: TokenAddressResponse) => void): Promise<TokenAddressResponse>;
    //  picture(module: string, callback?: (error: T1CLibException, data: TokenPictureResponse) => void): Promise<TokenPictureResponse>;
    //  rootCertificate(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
    //  intermediateCertificates(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      authenticationCertificate(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      nonRepudiationCertificate(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      encryptionCertificate(module: string, parseCerts?: boolean,  callback?: (error: T1CLibException, data: TokenCertificateResponse) => void): Promise<TokenCertificateResponse>;
      verifyPin(module: string, body: TokenVerifyPinData, callback?: (error: T1CLibException, data: TokenVerifyPinResponse) => void): Promise<TokenVerifyPinResponse>;
      authenticate(module: string, body: TokenAuthenticateOrSignData, callback?: (error: T1CLibException, data: TokenAuthenticateResponse) => void): Promise<TokenAuthenticateResponse>;
      sign(module: string, body: TokenAuthenticateOrSignData, bulk?: boolean, callback?: (error: T1CLibException, data: TokenSignResponse) => void): Promise<TokenSignResponse>;
      allAlgoRefs(module: string, callback?: (error: T1CLibException, data: TokenAlgorithmReferencesResponse) => void): Promise<TokenAlgorithmReferencesResponse>
      resetBulkPin(module: string, callback?: (error: T1CLibException, data: BoolDataResponse) => void): Promise<BoolDataResponse>;
    }
    T1CSdk.T1CClient.initialize(config).then(res => {
        client = res;
    }, err => {
        console.error(error)
    });
    var core = client.core();
    core.readersCardAvailable(callback);
    {
      "data": [
        // List of reader with cards found
      ],
      "success": true
    }
    const module = "jcop3";
    var generic = client.generic(selected_reader.id);
    generic.authenticationCertificate(module, parseCertsBoolean, callback);
    {
        "certificate": {
            "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
            "parsedCertificate": {...}
        },
        // OR if multiple certificates
        "certificates" [
            {
                "certificate": {
                    "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
                    "parsedCertificate": {...}
                }
            }
        ]
    }
    generic.nonRepudiationCertificate(module, parseCertsBoolean, callback);
    {
        "certificate": {
            "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
            "parsedCertificate": {...}
        },
        // OR if multiple certificates
        "certificates" [
            {
                "certificate": {
                    "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
                    "parsedCertificate": {...}
                }
            }
        ]
    }
    generic.encryptionCertificate(module, parseCertsBoolean, callback);
    {
        "certificate": {
            "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
            "parsedCertificate": {...}
        },
        // OR if multiple certificates
        "certificates" [
            {
                "certificate": {
                    "certificate": "MIIFjjCCA3agAwIBAgIIO...xg==",
                    "parsedCertificate": {...}
                }
            }
        ]
    }
    var filter = [];
    generic.allCerts(module, parseCerts, { filters: filter}, callback);
    {
     "authenticationCertificate": {
      ...
     },
     "nonRepudiationCertificate": {
     ...
     },
     "encryptionCertificate": {
     ...
     }
    }
    var filter = ['authenticationCertificate'];
    generic.allCerts(module, { filters: filter}, callback);
    {
     "authenticationCertificate": {
      ...
     }
    }
    var filter = null;
    generic.allCerts(module, { filters: filter}, callback);
    {
     "authenticationCertificate": {
      ...
     },
     "nonRepudiationCertificate": {
      ...
     }
    }
    var data = {
          "pin":"...",
          "algorithmReference":"sha1",
          "data":"I2e+u/sgy7fYgh+DWA0p2jzXQ7E=",
          "osDialog": true,
          "id": "id.."
    }
    generic.sign(module, data, callback);
    {
      "success": true,
      "data": "W7wqvWA8m9SBALZPxN0qUCZfB1...0nzB7hXC/Lc/fMru82m/AAqCuGTYMPKcIpQG6MtZ/SGVpZUA/71jv3D9CatmGYGZc52cpcb7cqOVT7EmhrMtwo/jyUbi/Dy5c8G05owkbgx6QxnLEuTLkfoqsW9Q="
    }
    var data = {
          "algorithmReference":"sha1",
          "data":"I2e+u/sgy7fYgh+DWA0p2jzXQ7E=",
          "osDialog": false,
          "id": "id.."
    }
    generic.sign(module, data, callback);
    {
        "success": true,
        "data": "W7wqvWA8m...hXC/Lc/fMru82m/AAqCuGTYMPKcIpQG6MtZ/SGVpZUA/71jv3D9CatmGYGZc52cpcb7cqOVT7EmhrMtwo/jyUbi/Dy5c8G05owkbgx6QxnLEuTLkfoqsW9Q="
    }
    const data = {
        algorithm: "sha256",
        data: "E1uHACbPvhLew0gGmBH83lvtKIAKxU2/RezfBOsT6Vs=",
        pin: "1234",
        id: "id.."
    }
    const bulk = true;
    generic.sign(module, data, bulk).then(res => {
    }, err => {
        console.error(err)
    })
    generic.resetBulkPin(module).then(res => {
    }, err => {
        console.error(err)
    })
    {
        "success": true,
        "data": true
    }
    var data = {
          "pin":"..."
    }
    generic.verifyPin(module, data, callback);
    {
      "verified": true
    }
    var data = {}
    generic.verifyPin(module, data, callback);
    {
      "verified": true
    }
    var data = {
      "pin": "...",
      "algorithm_reference": "sha1",
      "data":"I2e+u/sgy7fYgh+DWA0p2jzXQ7E=",
      "id": "id.."
    }
    generic.authenticate(module, data, callback);
    {
    "success": true,
    "data": "W7wqvWA8m9SBALZPxN0qUCZfB1O/WLaM/silenLzSXXmeR+0nzB7hXC/Lc/fMru82m/AAqCuGTYMPKcIpQG6MtZ/SGVpZUA/71jv3D9CatmGYGZc52cpcb7cqOVT7EmhrMtwo/jyUbi/Dy5c8G05owkbgx6QxnLEuTLkfoqsW9Q="
    }
    generic.verifyPin(module, data, callback);
    generic.allAlgoRefs(module, callback);
    {
        "success": true,
        "data": ["sha1", "sha256"]
    }
    export interface AbstractPkcs11 {
        certificates(slotId: string, parseCerts?: boolean, callback?: (error: T1CLibException, data: Pkcs11ObjectCertificatesResponse) => void): Promise<Pkcs11ObjectCertificatesResponse>;
        signData(data: Pkcs11SignData, callback?: (error: T1CLibException, data: Pkcs11ObjectSignResponse) => void): Promise<Pkcs11ObjectSignResponse>;
        slots(callback?: (error: T1CLibException, data: Pkcs11ObjectSlotsResponse) => void): Promise<Pkcs11ObjectSlotsResponse>;
        slotsWithTokenPresent(callback?: (error: T1CLibException, data: Pkcs11ObjectSlotsResponse) => void): Promise<Pkcs11ObjectSlotsResponse>;
        token(slotId: string, callback?: (error: T1CLibException, data: Pkcs11ObjectTokenResponse) => void): Promise<Pkcs11ObjectTokenResponse>;
    }
    export class Pkcs11ObjectInfoResponse extends DataObjectResponse {
        constructor(public data: Pkcs11Info, public success: boolean) {
            super(data, success);
        }
    }
    
    export class Pkcs11ObjectSign {
        constructor(public data: string) {
        }
    }
    
    export class Pkcs11ObjectSignResponse {
        constructor(public data: Pkcs11ObjectSign, public success: boolean) {
        }
    }
    
    export class Pkcs11ObjectSlots {
        constructor(public slots: Pkcs11Slot[]) {
        }
    }
    
    export class Pkcs11ObjectSlotsResponse {
        constructor(public data: Pkcs11ObjectSlots, public success: boolean) {
        }
    }
    
    
    export class Pkcs11ObjectCertificates {
        constructor(public certificates: Pkcs11ObjectCertificate[]) {}
    }
    
    
    export class Pkcs11ObjectCertificate {
        constructor(public id: string, public certificate: string, public parsed?: Certificate) {}
    }
    
    export class Pkcs11ObjectCertificatesResponse {
        constructor(public data: Pkcs11ObjectCertificates, public success: boolean) {
        }
    }
    
    export class Pkcs11SignData {
        constructor(public slotId: string,
                    public certificateId: string,
                    public algorithm: string,
                    public data: string,
                    public pin?: string,
                    public osDialog?: boolean) {}
    }
    
    export class Pkcs11ObjectTokenResponse {
        constructor(public data: Pkcs11TokenInfo, public success: boolean) {
        }
    }
    
    export class Pkcs11SetConfigResponse {
        constructor(public data: string, public success: boolean) {
        }
    }
    
    export class Pkcs11Slots {
        constructor(public slots: Pkcs11Slot[]) {
        }
    }
    
    export class Pkcs11Slot {
        constructor(public slot: number,
                    public description: string) {
        }
    }
    
    export class Pkcs11TokenInfo {
        constructor(public slot: string,
                    public label: string,
                    public manufacturerId: string,
                    public model: string,
                    public serialNumber: string,
                    public flags: string,
                    public ulMaxSessionCount: number,
                    public ulSessionCount: number,
                    public ulMaxRwSessionCount: number,
                    public ulMaxPinLen: number,
                    public ulMinPinLen: number,
                    public ulTotalPublicMemory: number,
                    public ulFreePublicMemory: number,
                    public ulTotalPrivateMemory: number,
                    public ulFreePrivateMemory: number,
                    public hardwareVersion: string,
                    public firmwareVersion: string) {
        }
    }
    const winLocation = "C:\\Windows\\System32\\eTPKCS11.dll"
    const macLocation = "/usr/local/lib/libeTPkcs11.dylib";
    
    T1CSdk.T1CClient.initialize(config).then(res => {
      client = res;
      console.log("Client config: ", client.localConfig)
      core = client.core();
      
      // Depending on the OS select the appropriate location of the library
      const pkcs11 = client.pkcs11(winLocation);
      
    }, err => {});
    
    const slotId = 0;
    
    pkcs11.certificates(slotId, true).then(res => {
        console.log(JSON.stringify(data, null, '  '));
    }, err => {
        console.log("Error:",JSON.stringify(err, null, '  '));
    });
    pkcs11.slots();
    {
        "data":
        [
            {
                "slot": 0,
                "description": "eToken 5100",
            },
            {
                "slot": 1,
                "description": "",
            }
        ]
        "success": true    
    }
    pkcs11.slotsWithTokenPresent(callback);
    {
        "data":
        [
            {
                "slot": 0,
                "description": "eToken 5100"
            }
        ]
        "success": true    
    }
    pkcs11.token(slot_id, callback);
    {
        "data":
        {
            "slot": 1,
            "label": "Token Label",
            "manufacturerId": "Gemalto",
            "model": "Safenet Token e5100",
            "serialNumber": "1234567890",
            "flags": 7,
            "maxSessionCount": 10,
            "sessionCount": 1,
            "maxRwSessionCount": 5,
            "rwSessionCount": 1,
            "maxPinLength": 20,
            "minPinLength": 8,
            "totalPublicMemory": 10000,
            "freePublicMemory": 5000,
            "totalPrivateMemory": 1000,
            "freePrivateMemory": 50,
            "hardwareVersion": "1",
            "firmwareVersion": "1"
        },
        "success": true    
    }
    // retrieve certificates for token in slot_id 0
    pkcs11.certificates(0, false);
    {
      "data": [
        {
          "certificate": "MIIFjjCCA3agAwI...rTBDdrlEWVaLrY+M+xeIctrC0WnP7u4xg==",
          "id": "E8CE05618E79A79825722AE067EC0029851D860D"
        },
        {
          "certificate": "MIIFjjCCA3agAwI...rTBDdrlEWVaLrY+M+xeIctrC0WnP7u4xg==",
          "id": "9F8F1CD68867526B1DF919832219B217282D2B0B"
        }
      ],
      "success": true
    }
    var signDataPayload = {
        slotId: 1,
        certificateId: "9F8F1CD68867526B1DF919832219B217282D2B0B",
        pin: "thepincodeforthetoken",
        data: "hashed data"
        algorithm: "sha256"
    }
    
    pkcs11.signData(signDataPayload, callback);
    {
        "data": "L3BWs7lvoajPg5tC9GEmlSMdXMcDkNDUVVvt+KFqbJbXkJdI3DGoM3IOeXLaeTCxKmJ33/QQApL1nEAMuHY38V41czyswfSdpnqeex3EisXKkiYHeNzt9AXeoxDtsWbGkejKqru6X4xzAy/1SnccjZ2BQB/uUwyfyyweFjbZAGCLfTzWraCxG0ud2c8itsjmsBgXSuGjLqxKIJXbtuX22gd0nc4LeZLA91sxaoNFBCEVlOgJ/oJncFylf6T/Tz9R4VOA9kSf6NB1tAMsFEsihgjZafu/rzlrOfzZw4YY/T32LKY4Y2zNnDhJAucqflZjopGadDvkkSmTvxxEJuE+Bw==",
        "success": true    
    }
    function callback(err,data) {
        if(err){
            console.log("Error:",JSON.stringify(err, null, '  '));
        }
        else {
            console.log(JSON.stringify(data, null, '  '));
        }
    }
    {
      success: false,
      description: "some error description",
      code: "some error code"
    }
    The ReLo (Remote Loading) container is provided through the T1C (Trust1Connector) in order to provide a secured communication channel to executed APDU commands that are generated from a back-end service (which can be optionally signed by a HSM).

    The ReLo provides smart card operations, like for example:

    • open/close session

    • execute APDUs (single or in bulk)

    • retrieve card/card reader features

    • verify if card present

    • retrieve ATR

    • ...

    hashtag
    Communication Flow

    The ReLo-API is an example back-end service implementing different smart card or token profiles (there is no limitation to smart cards). The T1V (Trust1Vault) is a Trust1Team product operating as a secured vault, and integrating with a HSM.

    hashtag
    Available functions

    The following functions are available in the library:

    JavaScript API

    Function

    Input

    Output

    Description

    openSession

    session timeout in seconds

    sessionId

    Opens a remote session, the session will be accessible through a session-id. The T1C will keep the session open and reusable.

    command

    tx, sessionId (optional)

    command response

    A single command to be executed remotely. When no session is available, a new session will be opened and immediately closed after execution of the command.

    commands

    hashtag
    ReaderId

    The readerId is passed to theremoteloading handler object on initialization. For example, opening a session on reader with idf56c0ffe15a07d09

    hashtag
    Callback/Promise

    All function return Promises by default.

    If you prefer callbacks, each function also has an optional parameter to pass in a callback function. If a callback function is provided, the function will still return a promise, but the callback function will be called when the promise resolves/gets rejected.

    hashtag
    SessionID is optional

    For any function that accepts a sessionIdparameter, the parameter is optional. If a sessionId is provided, the corresponding session will be used for the request and then will be _kept open_once the request completes. This means that if this was the last request that needed to be made, the session needs to be explicitly closed with a call tocloseSession.

    If no sessionId is provided, the request will still complete, but the GCL will set up a new session, perform the required action and then close the session. This means that there is _no open session_once the request completes.

    When a wrong sessionID is sent in a request, an error message will be returned. The status code will be 'invalid sessionID' or 'no active session'

    hashtag
    Interface

    hashtag
    Objects

    hashtag
    Detailed Function Overview

    hashtag
    openSession

    Opens a new session. Returns the sessionId, which will need to be stored by the client application for later use.

    hashtag
    Interface

    hashtag
    Parameters

    • timeout (optional): session timeout in seconds. If not provided, will default to value set in GCLConfig. Must be a number > 0.

    hashtag
    Output

    hashtag
    command

    Sends a command to the reader for execution.

    hashtag
    Interface

    command(tx: string, sessionId?: string, callback: (error, data))

    hashtag
    Parameters

    • tx: command-string to be executed

    • sessionId (optional): sessionId to use. Required if the session needs to be kept open after the request completes.

    hashtag
    Output

    hashtag
    ccid

    Activates a specific CCID feature if it is available on the reader

    hashtag
    Interface

    ccid(feature: string, command: string, sessionId?: string, callback?: (error, data))

    hashtag
    Parameters

    • feature: feature to check

    • command: command to send to the ccid reader (hex format)

    • sessionId (optional): sessionId to use. Required if the session needs to be kept open after the request completes.

    hashtag
    Output

    hashtag
    closeSession

    Closes currently open session.

    hashtag
    Interface

    closeSession(callback?: (error, data))

    hashtag
    Parameters

    • none

    hashtag
    Output

    hashtag
    isPresent

    Checks if the card for this session is still present.

    If no sessionId is provided, checks if a card is present in the reader.

    hashtag
    Interface

    isPresent(sessionId?: string, callback?: (error, data))

    hashtag
    Parameters

    • sessionId (optional): sessionId to use. Required if the session needs to be kept open after the request completes.

    hashtag
    Output

    hashtag
    atr

    Retrieves the ATR for the card currently in the reader.

    hashtag
    Interface

    atr(sessionId?: string, callback?: (error, data))

    hashtag
    Parameters

    • sessionId (optional): sessionId to use. Required if the session needs to be kept open after the request completes.

    hashtag
    Output

    hashtag
    ccidFeatures

    Returns a list of available CCID features for the current reader.

    hashtag
    Interface

    ccidFeatures(sessionId?: string, callback?: (error, data))

    hashtag
    Parameters

    • sessionId (optional): sessionId to use. Required if the session needs to be kept open after the request completes.

    hashtag
    Output

    hashtag
    apdu

    Executes an APDU call on the current reader. The difference with the commandfunction is that theapdu function takes an APDU object, whereas commandtakes a string.

    hashtag
    Interface

    apdu(apdu: ApduObject, sessionId?: string, callback?: (error, data))

    hashtag
    Parameters

    • apdu: object containing the APDU to be executed

    • sessionId (optional): sessionId to use. Required if the session needs to be kept open after the request completes.

    APDU Object interface:

    hashtag
    Output

    hashtag
    Bulk Actions

    For the apduand commandfunctions, it is possible to send an array of apdu's/commands.

    hashtag
    apdus (bulk)

    Executes an array of APDU calls on the current reader.

    hashtag
    Interface

    apdus(apdu: ApduObject[], sessionId?: string, callback?: (error, data))

    hashtag
    Parameters

    • apdu: array containing the APDU objects to be executed

    • sessionId (optional): sessionId to use. Required if the session needs to be kept open after the request completes.

    APDU Object interface:

    hashtag
    Output

    hashtag
    commands (bulk)

    Executes an array of commands on the current reader.

    hashtag
    Interface

    commands(tx: string[], sessionId?: string, callback?: (error, data))

    hashtag
    Parameters

    • tx

      : array containing the command strings to be executed

    • sessionId

      (optional)

      : sessionId to use. Required if the session needs to be kept open after the request completes.

    hashtag
    Output

    entity, page

    list of type objects

    Returns a list of existing types. The type object contains information about the mapping of absolute paths. Paging can be used optionally by using the page parameter.

    listType

    entity, type

    type object

    Returns the targeted type object.

    listTypeContent

    entity, type, relpath, page

    list of file objects

    Returns a list of file objects for the targeted type. A file can be a directory or a binary file. The relpath refers to the directory path where files should be searched for.

    listContent

    entity, page

    list of file objects

    Returns a list of file objects for all known types. The list will contain all files that are present in defined types.

    existsType

    entity, type

    boolean

    Verifies if type exists. Be aware that a type can exist, but no mapping has been persisted by the user.

    existsFile

    entity, type, relpath

    boolean

    Verifies if a file exists on the local file system.

    getAccessMode

    entity, type, relpath, filename

    access mode

    Returns the access mode for a file or directory. The param relpath can be used to target a nested file or directory.

    createDir

    entity, type, relpath, recursive

    file object

    Returns the created file object (which in this use case is always a directory). When recursive is set to true, the all subfolders will be created.

    copyFile

    entity, fromType, toType, filename, newfilename, fromrelpath, torelpath

    file object

    Copy a file or directory on the local file system.

    moveFile

    entity, fromType, toType, filename, fromrelpath, torelpath

    file object

    Move a file or directory on the local file system.

    renameFile

    entity, type, filename, newfilename, relpath

    file object

    Rename a file or directory

    getFileInfo

    entity, type, filename, relpath

    file object

    Returns the targeted file information

    createType

    entity, type, timeoutInSeconds, initabspath

    type object

    Creates a new type mapping, with optional initial path (migration support). When the path is not found on the local system, the user will be prompted with a file chooser.

    createTypeDirs

    entity, type, relpath, showModal, timeoutInSeconds

    type object

    Creates new subfolders for a type mapping. If the type mapping is not existing, the user will be prompted with a file chooser.

    updateType

    entity, type, timeoutInSeconds

    type object

    Prompt the user to force renewal of type mapping. The user will be presented with file chooser, even when the mapping exists already.

    deleteType

    entity, type

    boolean

    Removes the type mapping, but does not delete directories or files from the local system.

    interface AbstractRemoteLoading {
        atr(sessionId?: string, callback?: (error: T1CLibException, data: DataResponse) => void): Promise<DataResponse>;
        apdu(apdu: APDU, sessionId?: string, callback?: (error: T1CLibException, data: CommandResponse) => void): Promise<CommandResponse>;
        apdus(apdu: APDU[], sessionId?: string, callback?: (error: T1CLibException, data: CommandsResponse) => void): Promise<CommandsResponse>;
        ccid(feature: CCIDFeature, command: string, sessionId?: string, callback?: (error: T1CLibException, data: CommandResponse) => void): Promise<CommandResponse>;
        ccidFeatures(sessionId?: string, callback?: (error: T1CLibException, data: DataResponse) => void): Promise<DataResponse>;
        command(tx: string, sessionId?: string, callback?: (error: T1CLibException, data: CommandResponse) => void): Promise<CommandResponse>;
        commands(tx: string[], sessionId?: string, callback?: (error: T1CLibException, data: CommandsResponse) => void): Promise<CommandsResponse>;
        closeSession(sessionId?: string, callback?: (error: T1CLibException, data: DataResponse) => void): Promise<DataResponse>;
        isPresent(sessionId?: string, callback?: (error: T1CLibException, data: BoolDataResponse) => void): Promise<BoolDataResponse>;
        openSession(timeout?: number, callback?: (error: T1CLibException, data: DataResponse) => void): Promise<DataResponse>;
    }
    export enum CCIDFeature {
        VERIFY_PIN_DIRECT = 'VERIFY_PIN_DIRECT',
        MODIFY_PIN_DIRECT = 'MODIFY_PIN_DIRECT',
        GET_TLV_PROPERTIES = 'GET_TLV_PROPERTIES'
    }
    openSession(timeout?: number, callback?: (error, data))
    {
        data: string // sessionId string
        success: boolean
    }
    {
        data: {
            tx: string, // input
            rx?: string, // output
            sw: string  // status word
        }
        success: boolean
    }
    {
        data: string // ccid response
        success: boolean
    }
    {
        success: true
    }
    {
        data: boolean // true if present, false if not
        success: boolean
    }
    {
        data: string // ATR string
        success: boolean
    }
    {
        data: Ccid[]
        success: boolean
    }
    {
        cla: string
        ins: string
        p1: string
        p2: string
        data?: string
        le?: string
    }
    {
        data: {
            tx: string, // input
            rx?: string, // output
            sw: string  // status word
        }
        success: boolean
    }
    {
        cla: string
        ins: string
        p1: string
        p2: string
        data?: string
        le?: string
    }
    {
        data: {
            tx: string, // input
            rx?: string, // output
            sw: string  // status word
        }[] // Array of response objects
        success: boolean
    }
    {
        data: {
            tx: string, // input
            rx?: string, // output
            sw: string  // status word
        }[] // Array of response objects
        success: boolean
    }

    tx[], sessionId (optional)

    command response[]

    One or more command to be executed remotely and sequentially. When no session is available, a new session will be opened and immediately closed after execution of the commands.

    ccid

    feature, command, sessionId (optional)

    ccid response

    Trigger a specific CCID feature.

    closeSession

    N/A

    N/A

    Close a session. When no session is available, a new session will be opened and closed. The T1C will be in its initial state.

    isPresent

    sessionId (optional)

    boolean

    Verify if a card is present. When no session is available, a new session will be opened and closed. The T1C will be in its initial state.

    atr

    sessionId (optional)

    ATR for card

    Retrieve ATR from card. When no session is available, a new session will be opened and closed. The T1C will be in its initial state.

    ccidFeatures

    sessionId (optional)

    list of features

    List of card readers features available for CCID. When no session is available, a new session will be opened and closed. The T1C will be in its initial state.

    apdu

    apdu object, sessionId (optional)

    apdu response

    Execute a single APDU command. When no session is available, a new session will be opened and closed. The T1C will be in its initial state.

    apdus

    apdu[], sessionId (optional)

    apdu response[]

    Execute one or more APDU commands (APDU bulk). When no session is available, a new session will be opened and closed. The T1C will be in its initial state.

    https://www.npmjs.com/package/t1c-sdk-jswww.npmjs.comchevron-right