Does CredUIPromptForCredentials retrieve stored password?
- From: Phil Porter <PhilPorter@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 29 Mar 2009 09:41:01 -0700
Hi,
I'm not sure I fully understand the behaviour of CredUIPromptForCredentials
when working with generic credentials.
What I'm after is to only show the dialog if there are no stored credentials
or if the stored credentials fail to authenticate.
For the first call to CredUIPromptForCredentials I'm using the following
flags: CREDUI_FLAGS_GENERIC_CREDENTIALS, CREDUI_FLAGS_EXPECT_CONFIRMATION and
CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX. Then I want to authenticate and then call
CredUIConfirmCredentials. If the authentication fails I would call
CredUIPromptForCredentials again but with CREDUI_FLAGS_ALWAYS_SHOW_UI set as
well.
What happens is that I get a login dialog if there are no stored credentials
and the function returns without showing a dialog if there are stored
credentials. So far so good. What I was hoping for in the latter case was
that the stored password would be returned but that doesn't seem to be the
case - I just get back whatever I passed in.
This doesn't seem to be very useful as there doesn't seem to be any way for
the caller to tell whether the dialog was shown or not. The only way I can
think of using it is to use the lower level CredRead call to get the password
before invoking CredUIPromptForCredentials, at which point I already know
whether there were stored credentials.
Am I missing something here?
Regards,
Phil
.
- Prev by Date: RE: pam on windows
- Next by Date: Re: pam on windows
- Previous by thread: pam on windows
- Index(es):
Relevant Pages
|
Loading