login by using digital signature e-token

Answered
0
0

Hi everyone,

I want users to login by using their digital signature e-token (digital certificate, usb token); i.e the user plugin his e-token in the client machine and open the login page of my wisej application. At login page he will enter his username and apply his digital signature for login. At server side I want to verify his digital signature along with his username (I previously stored his public key to compare with).

So, again: I want to be able to read (receive) on server the public key from the client usb e-token it use.

I managed to configure IIS to ask for client certificate. The problem is that I don’t know how to access it from code. Normally, I would try a call to Request.GetClientCertificate(). But using wisej, I don’t seem to have access to it. Can anyone show me a way to access it? Or another method for describe purpose?

  • You must to post comments
Best Answer
0
0

If HttpContext.Current returns a value in Page.OnLoad() when deployed it means that the IIS server setup doesn’t have WebSocket enabled. Wisej works either way. But when WebSocket is enabled, the HttpContext is only available when the session starts (in Program.Main) since the first load is HTTP. After that it switches to WebSocket and the HttpContext is not available.

Additionally, Wisej includes automatic impersionation (see https://wisej.com/docs/2.1/html/Configuration.htm “impersonate” setting in Default.json). When impersonate is true, the app uses the client’s credentials. The user info is available at Application.UserIdentity, Application.User, Environment.UserName, Environment.UserDomain.

HTH

  • You must to post comments
Best Answer
0
0

When the application start you can access the Request object like this: HttpContext.Current.Request.

  • You must to post comments
0
0

HttpContext.Current return null. Am I doing anything wrong? I’m trying to access it on the Load event on my first page.

    • Guest
    • Apr 14, 2020 - 8:03 am
    Sorry, it returns null just from debugging environment. On runtime it works.
  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.