Class Credential
A Credential containing information needed to log into a resource. This is primarily defined as a unique CredentialId with an associated Password that's linked to it.
Inheritance
System.Object
Credential
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace:Microsoft.SqlTools.ServiceLayer.Credentials.Contracts
Assembly:Microsoft.SqlTools.ServiceLayer.dll
Syntax
public class Credential
Constructors
| Improve this Doc View SourceCredential()
Default Constructor
Declaration
public Credential()
Credential(String)
Constructor used when only credentialId is known
Declaration
public Credential(string credentialId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | credentialId | CredentialId |
Credential(String, String)
Constructor
Declaration
public Credential(string credentialId, string password)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | credentialId | CredentialId |
| System.String | password | Password |
Properties
| Improve this Doc View SourceCredentialId
A unique ID to identify the credential being saved.
Declaration
public string CredentialId { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Password
The Password stored for this credential.
Declaration
public string Password { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Methods
| Improve this Doc View SourceValidateForLookup(Credential)
Validates the credential has all the properties needed to look up the password
Declaration
public static void ValidateForLookup(Credential credential)
Parameters
| Type | Name | Description |
|---|---|---|
| Credential | credential |
ValidateForSave(Credential)
Validates the credential has all the properties needed to save a password
Declaration
public static void ValidateForSave(Credential credential)
Parameters
| Type | Name | Description |
|---|---|---|
| Credential | credential |