Core Service

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 correctly in order to access the all resource.

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)
    List card-readers (with active card)
    Get card-reader
    List card-readers (with active cards)
    List card-readers (with or without active card)
Executing these functionality is explained further.

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, ...
After you've initialized the Trust1Connector you can execute the rest of the Trust1Connector's functionality, for example listing the readers and fetching information from a specific smart card.

List card readers

Returns a list of available card readers. Multiple readers can be connected. Each reader is identified by a unique reader_id.
1
T1CClient.initialize(config).then(res => {
2
var coreService = res.core();
3
core.readers(callback);
4
})
Copied!
The response will contains a list of card readers:
1
{
2
"success": true,
3
"data": [
4
{
5
"id": "57a3e2e71c48cee9",
6
"name": "Bit4id miniLector",
7
"pinpad": false,
8
"card": {
9
"atr": "3B9813400AA503010101AD1311",
10
"description": [
11
"Belgium Electronic ID card (eID)"
12
],
13
"module": "beid"
14
}
15
}
16
]
17
}
Copied!
When multiple readers are attached to a device, the response will show all connected card readers:
1
{
2
"data": [
3
{
4
"id": "ec3109c84ee9eeb5",
5
"name": "Identiv uTrust 4701 F Dual Interface Reader(2)",
6
"pinpad": false
7
},
8
{
9
"card": {
10
"atr": "3B9813400AA503010101AD1311",
11
"description": [
12
"Belgium Electronic ID card"
13
]
14
},
15
"id": "57a3e2e71c48cee9",
16
"name": "Bit4id miniLector",
17
"pinpad": false
18
},
19
{
20
"id": "c8d31f8fed44d952",
21
"name": "Identiv uTrust 4701 F Dual Interface Reader(1)",
22
"pinpad": false
23
}
24
],
25
"success": true
26
}
Copied!
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

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.
1
{
2
"data": [
3
{
4
"card": {
5
"atr": "3B9813400AA503010101AD1311",
6
"description": [
7
"Belgium Electronic ID card"
8
]
9
},
10
"id": "57a3e2e71c48cee9",
11
"name": "Bit4id miniLector",
12
"pinpad": false
13
}
14
],
15
"success": true
16
}
Copied!

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):
1
{
2
"data": [
3
{
4
"card": {
5
"atr": "3B9813400AA503010101AD1311",
6
"description": [
7
"Belgium Electronic ID card"
8
]
9
},
10
"id": "57a3e2e71c48cee9",
11
"name": "Bit4id miniLector",
12
"pinpad": false
13
}
14
],
15
"success": true
16
}
Copied!

List Card-Readers - Explained Example

The following example is the response for List card-readers on a device with 4 different card-readers attached:
1
{
2
"data": [
3
{
4
"id": "ec3109c84ee9eeb5",
5
"name": "Identiv uTrust 4701 F Dual Interface Reader(2)",
6
"pinpad": false
7
},
8
{
9
"card": {
10
"atr": "3B67000000000000009000",
11
"description": [
12
"MisterCash & Proton card",
13
"VISA Card (emitted by Bank Card Company - Belgium)"
14
]
15
},
16
"id": "e5863fcc71478871",
17
"name": "Gemalto Ezio Shield Secure Channel",
18
"pinpad": true
19
},
20
{
21
"card": {
22
"atr": "3B9813400AA503010101AD1311",
23
"description": [
24
"Belgium Electronic ID card"
25
]
26
},
27
"id": "57a3e2e71c48cee9",
28
"name": "Bit4id miniLector",
29
"pinpad": false
30
},
31
{
32
"id": "c8d31f8fed44d952",
33
"name": "Identiv uTrust 4701 F Dual Interface Reader(1)",
34
"pinpad": false
35
}
36
],
37
"success": true
38
}
Copied!
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.

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.
1
GCLClient.initialize(config, function(err, client) {
2
var coreService = client.core();
3
core.readersCardAvailable(callback);
4
});
Copied!
Response:
1
{
2
"data": [
3
{
4
"card": {
5
"atr": "3B9813400AA503010101AD1311",
6
"description": []
7
},
8
"id": "57a3e2e71c48cee9",
9
"name": "Bit4id miniLector",
10
"pinpad": false
11
}
12
],
13
"success": true
14
}
Copied!

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.

Core interface

1
export interface AbstractCore {
2
getImplicitConsent(codeWord: string, durationInDays?: number, callback?: (error?: T1CLibException, data?: T1CClient) => void): Promise<T1CClient>;
3
validateConsent(consent: string, callback?: (error?: T1CLibException, data?: T1CClient) => void): Promise<T1CClient>;
4
updateJWT(jwt: string, callback?: (error: T1CLibException, data?: T1CClient) => void): Promise<T1CClient>
5
info(callback?: (error: T1CLibException, data: InfoResponse) => void): void | Promise<InfoResponse>;
6
reader(reader_id: string, callback?: (error: T1CLibException, data: SingleReaderResponse) => void): Promise<SingleReaderResponse>;
7
readers(callback?: (error: T1CLibException, data: CardReadersResponse) => void): Promise<CardReadersResponse>;
8
readersCardAvailable(callback?: (error: T1CLibException, data: CardReadersResponse) => void): Promise<CardReadersResponse>;
9
readersCardsUnavailable(callback?: (error: T1CLibException, data: CardReadersResponse) => void): Promise<CardReadersResponse>;
10
getUrl(): string;
11
getDevicePublicKey(): void;
12
version(): Promise<string>;
13
}
Copied!
Last modified 14d ago