ICredentialProvider interface (credentialprovider.h)
Exposes methods used in the setup and manipulation of a credential provider. All credential providers must implement this interface.
Inheritance
The ICredentialProvider interface inherits from the IUnknown interface. ICredentialProvider also has these types of members:
Methods
The ICredentialProvider interface has these methods.
ICredentialProvider::Advise Allows a credential provider to initiate events in the Logon UI or Credential UI through a callback interface. |
ICredentialProvider::GetCredentialAt Gets a specific credential. |
ICredentialProvider::GetCredentialCount Gets the number of available credentials under this credential provider. |
ICredentialProvider::GetFieldDescriptorAt Gets metadata that describes a specified field. |
ICredentialProvider::GetFieldDescriptorCount Retrieves the count of fields in the needed to display this provider's credentials. |
ICredentialProvider::SetSerialization Sets the serialization characteristics of the credential provider. |
ICredentialProvider::SetUsageScenario Defines the scenarios for which the credential provider is valid. Called whenever the credential provider is initialized. |
ICredentialProvider::UnAdvise Used by the Logon UI or Credential UI to advise the credential provider that event callbacks are no longer accepted. |
Remarks
This interface is how you will interact with the Logon UI and the Credential UI for your app.
An instantiated credential provider is maintained for the entire lifetime of a Logon UI. Because of this, the Logon UI can maintain the state of a credential provider. In particular, it remembers which provider and tile provided a credential. This means that you can potentially store state information when you are using a CREDENTIAL_PROVIDER_USAGE_SCENARIO of CPUS_LOGON, CPUS_UNLOCK_WORKSTATION, and CPUS_CHANGE_PASSWORD. This is not the case with the Credential UI. The Credential UI creates a new instance of the provider every time an application calls CredUIPromptForWindowsCredentials. Because of this, the Credential UI cannot remember a credential provider's state.
Be aware that a CREDENTIAL_PROVIDER_CREDENTIAL_SERIALIZATION generated in one scenario might be saved and used in a subsequent usage scenario. Because of this, it is necessary to make sure your ICredentialProvider implementation is robust enough to handle this scenario.
Windows 8 adds new functionality in the credential providers API, primarily the ability to group credentials by user.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | credentialprovider.h |
See also
CREDENTIAL_PROVIDER_USAGE_SCENARIO
Credential Provider driven Windows Logon Experience