Class WindowsIdentityDefinition
Represents serializable Windows client credentials.
Inherited Members
Namespace: Nevatech.Vsb.Repository.Services.Identities
Assembly: Nevatech.Vsb.Repository.dll
Syntax
public sealed class WindowsIdentityDefinition : IdentityDefinitionBase, IValidator, IExtensibleDataObject
Constructors
WindowsIdentityDefinition()
Initializes an empty instance.
Declaration
public WindowsIdentityDefinition()
WindowsIdentityDefinition(Identity)
Initializes new instance from provided Identity object.
Declaration
public WindowsIdentityDefinition(Identity identity)
Parameters
| Type | Name | Description |
|---|---|---|
| Identity | identity | Identity object used to populate new instance. |
WindowsIdentityDefinition(NetworkCredential, TokenImpersonationLevel)
Initializes new instance from provided network credentials and allowed Windows impersonation level.
Declaration
public WindowsIdentityDefinition(NetworkCredential networkCredentials, TokenImpersonationLevel allowedImpersonationLevel)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Net.NetworkCredential | networkCredentials | Network credentials which domain, username, and password will be copied to the new instance. |
| System.Security.Principal.TokenImpersonationLevel | allowedImpersonationLevel | Allowed impersonation level for Windows credentials. |
WindowsIdentityDefinition(String, String, String, TokenImpersonationLevel)
Initializes new instance from provided user name, password, domain, and allowed impersonation level.
Declaration
public WindowsIdentityDefinition(string userName, string password, string domain, TokenImpersonationLevel allowedImpersonationLevel)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | userName | User name associated with the credentials. |
| System.String | password | Password for the user name associated with the credentials. |
| System.String | domain | Domain or computer name that verifies the credentials. |
| System.Security.Principal.TokenImpersonationLevel | allowedImpersonationLevel | Allowed impersonation level granted by the client to the service. |
Properties
AllowedImpersonationLevel
Gets the allowed impersonation level granted by the client to the service.
Declaration
public TokenImpersonationLevel AllowedImpersonationLevel { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Security.Principal.TokenImpersonationLevel |
Remarks
This property specifies the impersonation level granted by the client to the server when using Windows SSPI Negotiate authentication. Note that the impersonation level obtained by the server when it impersonates the client token is not solely a function of this setting. It is also a function of the associated privileges and domain settings for the account in which the service is running.
Domain
Gets the domain or computer name that verifies the credentials.
Declaration
public string Domain { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
FriendlyName
Gets or sets the friendly name describing stored identity.
Declaration
public override string FriendlyName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Overrides
Kind
Gets stored identity kind (like X.509 certificate, SPN, etc).
Declaration
public override IdentityKind Kind { get; protected set; }
Property Value
| Type | Description |
|---|---|
| IdentityKind |
Overrides
Password
Gets the password for the user name associated with the credentials.
Declaration
public string Password { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
UserName
Gets the user name associated with the credentials.
Declaration
public string UserName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Methods
GetIdentity()
Returns Identity object populated with the data stored in this instance.
Declaration
public override Identity GetIdentity()
Returns
| Type | Description |
|---|---|
| Identity | Identity object populated with the data stored in this instance. |