I am developing a java web application where we need to communicate with client machine's USB port to check whether card reader is attached or not and to read data from card reader for user’s authentication. If card reader is attached at client’s USB port and card is swiped then read the card data and authenticate the user.

My Question is:

How to check whether card reader is attached and card swiped on client’s machine or not? How to do this client-server communication?

morva14 wrote:I am developing a java web application where we need to communicate with client machine's USB port to check whether card reader is attached or not and to read data from card reader for user’s authentication. If card reader is attached at client’s USB port and card is swiped then read the card data and authenticate the user.

My Question is:

How to check whether card reader is attached and card swiped on client’s machine or not? How to do this client-server communication?

I heard about three options,

1. Create Applet and run in browser

2. Downloading .dll file at client machine which will read card data.

3. Using java script.

I don't know which the feasible solution is and how to implement it.

Number 1 and 2 are possible. number 3 is possible too but not alone. I think the best solution is copying a dll or any package to client machine and by jacascript call it's function. you must consider that maybe different browsers have different solutions.

Have you considered using PKCS#11 if you are looking into web based certificate authentication for clients ?

It is very difficult to get a browser to talk to a smart card directly even with middleware because you have to write a browser plugin that will talk to a native driver which then finally communicates with the Smart Card.

Board Disclaimer

The views and comments posted in these fora are personal and do not necessarily represent the those of the Management of JavaCard OS.

The Management of JavaCard OS does not, under any circumstances whatsoever, accept any responsibility for any advice, or recommentations, made by, or implied by, any member or guest vistor of JavaCard OS that results in any loss whatsoever in any manner to a member of JavaCard OS, or to any other person.

Furthermore, the Management of JavaCard OS is not, and cannot be, responsible for the content of any other Internet site(s) that have been linked to from JavaCard OS.