Reading ID in browser using Javascript

233 views
Skip to first unread message

Jari Van de Vel

unread,
Jan 28, 2024, 3:52:33 AM1/28/24
to eID Middleware Dev
Hi there


I am in need for a solution in which a person using my application can insert their id card and it will then show their basic data (name, surname, ...) however information on this is very hard to find. And external providers require paid subscriptions because you can use their implementation to sign documents / sign in / ...
I just need to see the public data, so no pin code entry needed as well.

Anyone who's done some similar digging and found something? Or is it that impossible and should i give in to paid subscriptions.

Kind regards
Jari

Wouter Verhelst

unread,
Mar 4, 2024, 2:52:51 AM3/4/24
to Jari Van de Vel, eID Middleware Dev
Hi Jari,

An overview of the available options can be found here:


Hope this helps,

Van: eid-middl...@googlegroups.com <eid-middl...@googlegroups.com> namens Jari Van de Vel <jari.van....@gmail.com>
Verzonden: woensdag 24 januari 2024 18:15
Aan: eID Middleware Dev <eid-middl...@googlegroups.com>
Onderwerp: [eid-mw-dev] Reading ID in browser using Javascript
 
CAUTION: This email originated from outside of the organization.
Do not click links or open attachments unless you recognize the sender and you expect to receive them.
When in doubt, please report to CSIRT via the Report Message > Phishing button.

--
You received this message because you are subscribed to the Google Groups "eID Middleware Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eid-middleware-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eid-middleware-dev/da064f99-4903-43cb-b5ec-b36b2e29ae54n%40googlegroups.com.

A. L.

unread,
Feb 12, 2025, 9:43:48 AMFeb 12
to eID Middleware Dev
Hello,
you can develop a windows service that listen through http 
This way you can call service data through http in ajax 
You have to retrieve the client IP from controller to call service or you will have CORS error.
then in a subquery ajax you can call windows service and get data for your browser. And if you have to send datas to controller directly you can add a sub sub query into succes.

Here is an ajax sample : 

$('#lireCarteIdentite').click(function (e) {
    let ip;
    $.ajax({
        url: '/Home/GetClientIP',
        type: 'POST',
        success: function (response) {
            if (response) {
                ip = response.ip;

                let url;
                if (ip === '::1') {
                    url = "http://localhost:5000/eid";
                }
                else {
                    url = "http://" + ip + ":5000/eid";
                }

                $.ajax({
                    url: url, // Middleware eID local
                    type: "GET",
                    dataType: "json",
                    success: function (data) {
                        $("#result").html(`
                            <p><strong>Nom:</strong> ${data.nom}</p>
                            <p><strong>Prénom:</strong> ${data.prenom}</p>
                            <p><strong>NISS:</strong> ${data.niss}</p>
                        `);
                        return;
                    },
                    error: function (xhr, status, error) {
                        console.error("Erreur AJAX:");
                        console.error("Status:", status);
                        console.error("Erreur:", error);
                        console.error("Réponse complète:", xhr.responseText);
                        alert("Erreur AJAX: " + status + "\nDétails: " + xhr.responseText);
                    }
                });
            }
        },
        error: function () {
            $('#cardInfo').html('<p>Erreur lors de la lecture de la carte.</p>');
        }
    });

});

Reply all
Reply to author
Forward
0 new messages