PasswordCredential Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents the password credential store.
public ref class PasswordCredential sealed
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Security.Credentials.ICredentialFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class PasswordCredential final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Activatable(Windows.Security.Credentials.ICredentialFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class PasswordCredential final
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Security.Credentials.ICredentialFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class PasswordCredential
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Security.Credentials.ICredentialFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class PasswordCredential
function PasswordCredential(resource, userName, password)
Public NotInheritable Class PasswordCredential
- Inheritance
- Attributes
Windows requirements
Device family |
Windows 10 (introduced in 10.0.10240.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
Constructors
PasswordCredential() |
Creates and initializes a new, empty instance of the PasswordCredential object. |
PasswordCredential(String, String, String) |
Creates and initializes a new instance of the PasswordCredential object that contains the provided credential data. |
Properties
Password |
Gets or sets the password string of the credential. This value must not be null or empty, otherwise an exception will be thrown. You must call RetrievePassword first to set the initial value of this property. |
Properties |
This API is intended for internal use only should not be used in your code. |
Resource |
Gets or sets the resource of the credential. |
UserName |
Gets or sets the user name of the credential. This value must not be null or empty, otherwise an exception will be thrown. |
Methods
RetrievePassword() |
Populates the password for the credential. After the operation returns successfully, you can get the password from the Password property. |