AuthenticablePrincipal 类

定义

封装可以对其进行身份验证的主体所通用的帐户和联系人数据。Encapsulates the account and contact data common to principals that can be authenticated.

public ref class AuthenticablePrincipal : System::DirectoryServices::AccountManagement::Principal
[System.DirectoryServices.AccountManagement.DirectoryRdnPrefix("CN")]
[System.Security.SecurityCritical(System.Security.SecurityCriticalScope.Everything)]
public class AuthenticablePrincipal : System.DirectoryServices.AccountManagement.Principal
type AuthenticablePrincipal = class
    inherit Principal
Public Class AuthenticablePrincipal
Inherits Principal
继承
AuthenticablePrincipal
派生
属性

构造函数

AuthenticablePrincipal(PrincipalContext)

使用指定的上下文初始化 AuthenticablePrincipal 类的新实例。Initializes a new instance of the AuthenticablePrincipal class by using the specified context. 此构造函数由派生类构造函数调用以初始化基类,不适合直接在代码中使用。This constructor is called by derived-class constructors to initialize the base class and is not intended for use directly from your code.

AuthenticablePrincipal(PrincipalContext, String, String, Boolean)

使用指定的上下文、SAM 帐户名、密码和启用的值初始化 AuthenticablePrincipal 类的新实例。Initializes a new instance of the AuthenticablePrincipal class by using the specified context, SAM account name, password, and enabled value. 此构造函数由派生类构造函数调用以初始化基类,不适合直接在代码中使用。This constructor is called by derived-class constructors to initialize the base class and is not intended for use directly from your code.

属性

AccountExpirationDate

获取或设置一个可以为 null 的 DateTime,用于指定帐户过期的日期和时间。Gets or sets a Nullable DateTime that specifies the date and time that the account expires.

AccountLockoutTime

获取一个可以为 null 的 DateTime,用于指定帐户被锁定的日期和时间。Gets the Nullable DateTime that specifies the date and time that the account was locked out.

AdvancedSearchFilter

返回一个 AdvancedFilters 对象,供与按示例查询一起使用,以便在将该对象传递给 PrincipalSearcher 之前设置只读属性。Returns an AdvancedFilters object for use with Query By Example to set read-only properties before passing the object to the PrincipalSearcher.

AllowReversiblePasswordEncryption

获取或设置一个布尔值,该值指定是否为此帐户启用可逆密码加密。Gets or sets a Boolean value that specifies whether reversible password encryption is enabled for this account.

BadLogonCount

获取对此帐户使用不正确的凭据进行登录的尝试次数。Gets the number of logon attempts using incorrect credentials for this account.

Certificates

获取包含此账户的 X509 证书的 X509Certificate2CollectionGets a X509Certificate2Collection that contains the X509 certificates for this account.

Context

获取与主体关联的主体上下文。Gets a principal context that is associated with the principal.

(继承自 Principal)
ContextRaw

获取与此主体关联的主体上下文。Gets a principal context that is associated with this principal.

(继承自 Principal)
ContextType

获取上下文类型枚举值,该值指定与此主体关联的主体上下文的类型。Gets the context type enumeration value that specifies the type of principal context associated with this principal.

(继承自 Principal)
DelegationPermitted

获取或设置一个可以为 null 的布尔值,该值指定是否可以委托帐户。Gets or sets a Nullable Boolean value that specifies whether the account may be delegated.

Description

获取或设置主体的说明。Gets or sets the description of the principal.

(继承自 Principal)
DisplayName

获取或设置此主体的显示名称。Gets or sets the display name for this principal.

(继承自 Principal)
DistinguishedName

获取此主体的可分辨名称 (DN)。Gets the distinguished name (DN) for this principal.

(继承自 Principal)
Enabled

获取或设置一个可以为 null 的布尔值,该值指定是否支持此帐户进行身份验证。Gets or sets a Nullable Boolean value that specifies whether this account is enabled for authentication.

Guid

获取与此主体关联的 GUID。Gets the GUID associated with this principal.

(继承自 Principal)
HomeDirectory

获取或设置此帐户的主目录。Gets or sets the home directory for this account.

HomeDrive

获取或设置此帐户的主驱动器。Gets or sets the home drive for this account.

LastBadPasswordAttempt

获取一个可以为 null 的 DateTime,用于指定最后一次对此帐户进行不正确的密码尝试的日期和时间。Gets the Nullable DateTime that specifies the date and time of the last incorrect password attempt on this account.

LastLogon

获取一个可以为 null 的 DateTime,用于指定最后一次登录此帐户的日期和时间。Gets the Nullable DateTime that specifies the date and time of the last logon for this account.

LastPasswordSet

获取一个可以为 null 的 DateTime,用于指定最后一次为此帐户设置密码的日期和时间。Gets the Nullable DateTime that specifies the last date and time that the password was set for this account.

Name

获取或设置此主体的名称。Gets or sets the name of this principal.

(继承自 Principal)
PasswordNeverExpires

获取或设置一个布尔值,该值指定此帐户的密码是否会过期。Gets or sets a Boolean value that specifies whether the password expires for this account.

PasswordNotRequired

获取或设置一个布尔值,该值指定此帐户是否需要密码。Gets or sets a Boolean value that specifies whether a password is required for this account.

PermittedLogonTimes

获取或设置主体可以登录的次数。Gets or sets the times when the principal can logon.

PermittedWorkstations

获取允许此主体登录的工作站的列表。Gets the list of workstations that this principal is permitted to log into.

SamAccountName

获取或设置此主体的 SAM 帐户名。Gets or sets the SAM account name for this principal.

(继承自 Principal)
ScriptPath

获取或设置此帐户的脚本路径。Gets or sets the script path for this account.

Sid

获取主体的安全 ID (SID)。Gets the Security ID (SID) of the principal.

(继承自 Principal)
SmartcardLogonRequired

获取或设置一个布尔值,该值指定登录帐户是否需要智能卡。Gets or sets a Boolean value that specifies whether a smartcard is required to log on to the account.

StructuralObjectClass

获取结构对象类目录特性。Gets the structural object class directory attribute.

(继承自 Principal)
UserCannotChangePassword

获取或设置一个布尔值,指定用户是否可以更改此帐户的密码。Gets or sets a Boolean value that specifies whether the user can change the password for this account. 请勿将其与 ComputerPrincipal 一起使用。Do not use this with a ComputerPrincipal.

UserPrincipalName

获取或设置与此主体关联的用户主体名称 (UPN)。Gets or sets the user principal name (UPN) associated with this principal.

(继承自 Principal)

方法

ChangePassword(String, String)

将帐户旧密码更改为新密码。Changes the account password from the old password to the new password. 请勿将其与 ComputerPrincipal 一起使用。Do not use this with a ComputerPrincipal.

CheckDisposedOrDeleted()

确定是否已对此类调用 Dispose()Delete() 方法。Determines whether the Dispose() or Delete() methods have been called on this class. 此方法由从此主体类派生的类调用。This method is called by classes that derive from this principal class.

(继承自 Principal)
Delete()

从存储区中删除主体对象。Deletes the principal object from the store.

(继承自 Principal)
Dispose()

处置 Principal 对象的当前实例。Disposes the current instance of the Principal object.

(继承自 Principal)
Equals(Object)

返回一个布尔值,该值指定提供的对象是否等于当前对象。Returns a Boolean value that specifies whether the supplied object is equal to the current object.

(继承自 Principal)
ExpirePasswordNow()

使此帐户的密码过期。Expires the password for this account. 这会强制用户在下次登录时更改其密码。This will force the user to change his/her password at the next logon.

ExtensionGet(String)

检索扩展类对象的属性。Retrieves an attribute of an extended class object.

(继承自 Principal)
ExtensionSet(String, Object)

设置扩展类中特性的值。Sets the value of an attribute in an extended class.

(继承自 Principal)
FindByBadPasswordAttempt(PrincipalContext, DateTime, MatchType)

返回身份验证主体对象的集合,这些对象具有在指定日期和时间范围内进行不正确密码尝试的记录。Returns a collection of authentication principal objects that have an incorrect password try recorded in the specified date and time range.

FindByBadPasswordAttempt<T>(PrincipalContext, DateTime, MatchType)

返回一个对象 PrincipalSearchResult<T> 集合,对象在指定的日期和时间范围内有一次错误密码尝试。Returns a PrincipalSearchResult<T> collection of objects that have a bad password attempt within the specified date and time range. 这是想要实现此功能的扩展类的模板函数。This is the template function for extended classes that wish to implement this functionality.

FindByExpirationTime(PrincipalContext, DateTime, MatchType)

返回身份验证主体对象的集合,这些对象拥有记录在指定日期和时间范围内的帐户过期时间。Returns a collection of authentication principal objects that have an account expiration time recorded in the specified date and time range.

FindByExpirationTime<T>(PrincipalContext, DateTime, MatchType)

返回一个对象 PrincipalSearchResult<T> 集合,对象在指定的日期和时间范围内具有到期日期。Returns a PrincipalSearchResult<T> collection of objects that have an expiration time within the specified date and time range. 这是想要实现此功能的扩展类的模板函数。This is the template function for extended classes that wish to implement this functionality.

FindByLockoutTime(PrincipalContext, DateTime, MatchType)

返回身份验证主体对象的集合,这些对象在指定日期和时间范围内记录帐户锁定时间。Returns a collection of authentication principal objects that have an account lockout time recorded in the specified date and time range.

FindByLockoutTime<T>(PrincipalContext, DateTime, MatchType)

返回一个对象 PrincipalSearchResult<T> 集合,对象在指定的日期和时间范围内有一个锁定时间。Returns a PrincipalSearchResult<T> collection of objects that have a lockout time within the specified date and time range. 这是想要实现此功能的扩展类的模板函数。This is the template function for extended classes that wish to implement this functionality.

FindByLogonTime(PrincipalContext, DateTime, MatchType)

返回身份验证主体对象的集合,这些对象在指定日期和时间范围内记录帐户登录。Returns a collection of authentication principal objects that have an account logon recorded in the specified date and time range.

FindByLogonTime<T>(PrincipalContext, DateTime, MatchType)

返回一个对象 PrincipalSearchResult<T> 集合,对象在指定的日期和时间范围内有登录时间。Returns a PrincipalSearchResult<T> collection of objects that have a logon time within the specified date and time range. 这是想要实现此功能的扩展类的模板函数。This is the template function for extended classes that wish to implement this functionality.

FindByPasswordSetTime(PrincipalContext, DateTime, MatchType)

返回身份验证主体对象集合,对象拥有在指定日期和时间范围内的帐户密码设置的记录。Returns a collection of authentication principal objects that have an account password set recorded in the specified date and time range.

FindByPasswordSetTime<T>(PrincipalContext, DateTime, MatchType)

返回对象的 PrincipalSearchResult<T> 集合,对象在指定的日期和时间范围内有密码设置时间。Returns a PrincipalSearchResult<T> collection of objects that have a password set time within the specified date and time range. 这是想要实现此功能的扩展类的模板函数。This is the template function for extended classes that wish to implement this functionality.

GetGroups()

返回组对象的集合,这些对象指定当前主体是其成员的组。Returns a collection of group objects that specify the groups of which the current principal is a member.

(继承自 Principal)
GetGroups(PrincipalContext)

返回组对象的集合,主体是这些对象的成员,并且这些对象存在于由指定的上下文参数提供的存储区中。Returns a collection of group objects that the principal is a member of and that exist in the store provided by the specified context parameter.

(继承自 Principal)
GetHashCode()

检索从主体对象的内容创建的哈希,适合在哈希算法和哈希表这样的数据结构中使用。Retrieves the hash created from the contents of the principal object, suited for use in hashing algorithms and data structures like a hash table.

(继承自 Principal)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
GetUnderlyingObject()

返回基础 DirectoryEntry 对象,其将提供主体对象的联系人数据。Returns the underlying DirectoryEntry object that provides the contact data for the principal object.

(继承自 Principal)
GetUnderlyingObjectType()

返回基础对象类型。Returns the underlying object type.

(继承自 Principal)
IsAccountLockedOut()

返回一个布尔值,该值指定帐户当前是否处于锁定状态。Returns a Boolean value that specifies whether the account is currently locked out.

IsMemberOf(GroupPrincipal)

返回一个布尔值,该值指定该主体是否是指定组的成员。Returns a Boolean value that specifies whether the principal is a member of the specified group.

(继承自 Principal)
IsMemberOf(PrincipalContext, IdentityType, String)

返回一个布尔值,该值指定该主体是否是由标识类型和值指定的组的成员。Returns a Boolean value that specifies whether the principal is a member of the group specified by identity type and value.

(继承自 Principal)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
RefreshExpiredPassword()

刷新过期的密码。Refreshes an expired password.

Save()

将对主体对象所做的更改保存到存储区中。Saves the changes that were made on the principal object to the store. 如果它是一个新主体对象,则此方法会将其插入到存储区中。If this is a new principal object, this method inserts it into the store.

(继承自 Principal)
Save(PrincipalContext)

将对主体对象所做的更改保存到存储区中。Saves the changes that were made on the principal object to the store. 如果它是一个新主体对象,则此方法会将其插入到指定上下文中。If this is a new principal object, this method inserts it into the specified context. 如果已保持主体,则会将该主体从原来的上下文移动到指定的上下文中。If the principal has already been persisted, it is moved from the original context to the specified context.

(继承自 Principal)
SetPassword(String)

将帐户密码设置为指定的值。Sets the account password to the specified value.

ToString()

返回当前主体对象的用户友好字符串表示形式。Returns a user friendly string representation of the current principal object.

(继承自 Principal)
UnlockAccount()

如果当前帐户已锁定,则解锁该帐户。Unlocks the account if it is currently locked out.

适用于