简体   繁体   中英

Modify Windows Logon UI (Credential Provider) using Pgina in c#

I am trying to use Pgina-fork to modify windows logon. Instead of using username and password, I want to login user with a single field authentication that doesn't use a password . I am done with custom plugin modifications and building procedures but am not able to find a way to modify the logon UI. I need to hide the password field and modify other info that is not useful to me. If anyone knows how to do that in the Credential provider source code of Pgina-fork ?

You need to modify pGina Fork source Code for that.

pGina src have a folder named CredentialProvider.. that is what you need

In file credential.cpp you can use this code

            //hide password
            m_fields->fields[m_fields->passwordFieldIdx].fieldStatePair.fieldState = CPFS_HIDDEN;
            if (m_usageScenario == CPUS_CHANGE_PASSWORD) {
                m_fields->fields[CredProv::CPUIFI_NEW_PASSWORD].fieldStatePair.fieldState = CPFS_HIDDEN;
                m_fields->fields[CredProv::CPUIFI_CONFIRM_NEW_PASSWORD].fieldStatePair.fieldState = CPFS_HIDDEN;
            }

This is the block of code which main pGina provides.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM