First it seams to be a simple job. Let the user input the name and let the card reader input the UID in the password field.
for login (if the UID is correct) simply call:
Code: Select all
m_loginFrameworkController.startLogin();In QuickTest everything works fine. But on ULC UX it doesn´t. After some debugging, I figure out:
- The QuickTest is always started with the user, which started the gedi (in my case “root”)
- The UlcUx is always started with the default user.
- The start-login Button calls “m_loginFrameworkController.startLogin();“ which calls “m_ui.setUiUser()” (class “OaAuthUI”), which contain the statement “return setUserId(m_user.getId(), m_user.getPassword());”. This statement fails. The statement is called with the card-UID as password.
I´ve try to find a solution / workaround for this problem, but didn´t find a good one … here one of my thoughts:
- Read the user PW from the DPE. Use the PW for setUserId()-Method. => not working because OA save the user password as PBKDF2 Hash. These Hashes are not revertable to the cleartext password (or I couldn´t find a solution for this in the web).
- Login as root in control, before login as the target user. This needs to hardcode the root password in the login panel. Shitty solution.
- Login as an “Login-Helper-User” which is allowed to use the “setUserId()” statement without a password, but not allowed to do a login to the UI. Not working, because only root is allowed to do so.
- Debug the statement “setUserId()” an look whats happening. Not working, because WinCC OA Debugger jumps over the statement. (WinCC OA standard command)
- try to write a own “OaAuthMethodUserdefined” class. Not working, same problem with “setUserId”.