Sample Credential Providers

发布时间:2017-7-9 7:27:54编辑 分享查询网我要评论
本篇文章主要介绍了"Sample Credential Providers",主要涉及到Sample Credential Providers方面的内容,对于Sample Credential Providers感兴趣的同学可以参考一下。



Terms of Use

Release Notes


The SampleCredentialProvider Codebase

Project Structure

Common Tasks For Extending SampleCredentialProvider

Tips & Tricks

Automating The Deployment Process

Developing With CredUI

Debugging LogonUI

If Your System Becomes Unstable





Default Tiles

Wrapping Existing Credential Providers

Credential Provider Architecture



Appendix A – Frequently Asked Questions

Terms of Use

This code and information is provided "as is" without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

Information in this document, including URL and other Internet Web site references, is subject to change without notice.  Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred.  Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document.  Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.


Copyright (c) Microsoft Corporation. All rights reserved.

Microsoft, Windows Vista, Windows XP, and Visual Studio are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.


In this document, we’ll take a look at some custom Windows Vista credential provider samples. Specifically, we’ll cover the following topics:

1.    Understanding the base SampleCredentialProvider codebase.

2.    Common tasks for extending the base SampleCredentialProvider codebase.

3.    SampleAllControlsCredentialProvider, which exposes each possible UI control.

4.    SampleCredentialFilter, which demonstrates the ICredentialProviderFilter interface.

5.    SampleCredUICredentialProvider, which supports CredUI.

6.    SampleHardwareEventCredentialProvider, which supports asynchronous events.

7.    SampleWrapExistingCredentialProvider, which wraps the default username/password credential provider in Windows Vista.

Release Notes

This is the fourth release of the samples.  The first release targeted the February CTP.  The second release targeted Beta2 and added additional samples.  The third release updates those samples for Vista RTM.  This fourth release updates the samples for Windows 7.


Out of the box, SampleCredentialProvider provides a DLL project that exposes the two COM interfaces required to develop a credential provider: ICredentialProvider and ICredentialProviderCredential. ICredentialProvider exposes the functionality to enumerate available credentials, and ICredentialProviderCredential exposes the functionality required for each specific credential during the authentication process.

The SampleCredentialProvider Codebase

The SampleCredentialProvider project provides a working baseline credential provider. This sample is hardcoded to expose two accounts: Administrator and Guest.  The following screenshot shows what this might look like on a domain joined machine.


Project Structure

The SampleCredentialProvider project includes a small set of files, each with their own purpose: