开发者

Working with credential provider sample of Windows 7 SDK

开发者 https://www.devze.com 2023-02-05 20:32 出处:网络
I am developing a custom windows login so that user either can user webcam (face recognition) or username a开发者_Python百科nd password. I am able to show a window with all required control at login s

I am developing a custom windows login so that user either can user webcam (face recognition) or username a开发者_Python百科nd password. I am able to show a window with all required control at login screen but I don't understand how to authenticate with provided username name and password. Window uses GetSerialize() function for this purpose.

GetSerialization(
__out CREDENTIAL_PROVIDER_GET_SERIALIZATION_RESPONSE* pcpgsr,
__out CREDENTIAL_PROVIDER_CREDENTIAL_SERIALIZATION* pcpcs, 
__deref_out_opt PWSTR* ppwszOptionalStatusText, 
__in CREDENTIAL_PROVIDER_STATUS_ICON* pcpsiOptionalStatusIcon
)

above is function signature. As you can see system uses CREDENTIAL_PROVIDER_GET_SERIALIZATION_RESPONSE* and CREDENTIAL_PROVIDER_CREDENTIAL_SERIALIZATION* pointer to get info about username and password. How I can call this for authentication. Or is there any alternative method for doing this at the time of login.


I wonder whether you have solved this by now?

You don't call GetSerialization(), that's called by Windows (e.g. by WinLogon to perform an interactive logon). You just have to fill the serialization response and the serialized credential. If you pass back a response saying that you have successfully collected a credential from the user then the serialized data is passed to the Local Security Authority for checking.

If you actually want to get the credentials into your own application you can do so using CredUIPromptForWindowsCredentials.

0

精彩评论

暂无评论...
验证码 换一张
取 消