Is S7g2 can have HTTPS ..? how to validate the multi logins (different username and different password)

how to validate the multi logins (different username and different password).

 

1. basically i want have two/more user accounts, each user account will have its individual limitation to open pages or edit data ect.

how can we achieve this ..?

 

2. is can i provide my own login page instead of this   if we can where can i modify this..?

3. how can give the login authentication only for the first login rest of the pages would open but when tried to open individual pages it should as for the password how can i do this ..?

Parents
  • Hi amar,

    The authorization procedure using by NetX HTTP Server is provided by the HTTP protocol itself: developer.mozilla.org/.../Authorization

    The login prompt is displayed by the browser and cannot be easily changed. However you may provide your own authorization by displaying a login and a password input widget and then handle the inputs in the request notify callback. To provide access for multiple users, the application should maintain an array of usernames and their corresponding passwords.

    Regards,
    adboc
  • Hi adboc,
    i have my own login page/widget how can handle this at authentication_check() function ..?

    for every pages its asking for the password if mentioned all pages.

    if not mentioned in the authentication_check();

    ip followed by the page is directly opening without the password.

    please help me regarding this asap.
  • Hi amar,

    If you provided your own login page, do not use the authentication_check() function, just return NX_SUCCESS.

    In the request_notify() callback, you should read a login and a password sent by a request, check them and set a cookie using the nx_http_server_callback_generate_response_header (Set-Cookie header), the value should be kind of a token matching the login/password. On the next request, check for the cookie and validate it, unfortunately you should parse the incoming headers on your own.

    Regards,
    adboc
Reply
  • Hi amar,

    If you provided your own login page, do not use the authentication_check() function, just return NX_SUCCESS.

    In the request_notify() callback, you should read a login and a password sent by a request, check them and set a cookie using the nx_http_server_callback_generate_response_header (Set-Cookie header), the value should be kind of a token matching the login/password. On the next request, check for the cookie and validate it, unfortunately you should parse the incoming headers on your own.

    Regards,
    adboc
Children
No Data