C# Класс GSF.Security.LdapSecurityProvider

Represents an ISecurityProvider that uses Active Directory for its backend data store and credential authentication.
A Security Identifier can also be specified in IncludedResources instead of a role name in the format of 'SID:<Security Identifier>' (Example: SID:S-1-5-21-19610888-1443184010-1631745340-269783).
Наследование: SecurityProviderBase
Показать файл Открыть проект

Открытые методы

Метод Описание
Authenticate ( string password ) : bool

Authenticates the user.

ChangePassword ( string oldPassword, string newPassword ) : bool

Changes user password in the backend data store.

This method always returns false under Mono deployments.

LdapSecurityProvider ( string username ) : System

Initializes a new instance of the LdapSecurityProvider class.

LoadSettings ( ) : void

Loads saved LdapSecurityProvider settings from the config file if the SecurityProviderBase.PersistSettings property is set to true.

RefreshData ( ) : bool

Refreshes the UserData from the backend data store.

ResetPassword ( string securityAnswer ) : bool

Resets user password in the backend data store.

SaveSettings ( ) : void

Saves LdapSecurityProvider settings to the config file if the SecurityProviderBase.PersistSettings property is set to true.

TranslateRole ( string role ) : string

Performs a translation of the specified user role.

UpdateData ( ) : bool

Updates the UserData in the backend data store.

Защищенные методы

Метод Описание
GetLdapPath ( ) : string

Gets the LDAP path.

LdapSecurityProvider ( string username, bool canRefreshData, bool canUpdateData, bool canResetPassword, bool canChangePassword ) : System

Initializes a new instance of the LdapSecurityProvider class.

RefreshData ( List groupCollection, int providerID ) : bool

Refreshes the UserData from the backend data store loading user groups into desired collection.

Описание методов

Authenticate() публичный Метод

Authenticates the user.
public Authenticate ( string password ) : bool
password string Password to be used for authentication.
Результат bool

ChangePassword() публичный Метод

Changes user password in the backend data store.
This method always returns false under Mono deployments.
public ChangePassword ( string oldPassword, string newPassword ) : bool
oldPassword string User's current password.
newPassword string User's new password.
Результат bool

GetLdapPath() защищенный Метод

Gets the LDAP path.
protected GetLdapPath ( ) : string
Результат string

LdapSecurityProvider() публичный Метод

Initializes a new instance of the LdapSecurityProvider class.
public LdapSecurityProvider ( string username ) : System
username string Name that uniquely identifies the user.
Результат System

LdapSecurityProvider() защищенный Метод

Initializes a new instance of the LdapSecurityProvider class.
protected LdapSecurityProvider ( string username, bool canRefreshData, bool canUpdateData, bool canResetPassword, bool canChangePassword ) : System
username string Name that uniquely identifies the user.
canRefreshData bool true if the security provider can refresh from the backend data store, otherwise false.
canUpdateData bool true if the security provider can update in the backend data store, otherwise false.
canResetPassword bool true if the security provider can reset user password, otherwise false.
canChangePassword bool true if the security provider can change user password, otherwise false.
Результат System

LoadSettings() публичный Метод

Loads saved LdapSecurityProvider settings from the config file if the SecurityProviderBase.PersistSettings property is set to true.
public LoadSettings ( ) : void
Результат void

RefreshData() публичный Метод

Refreshes the UserData from the backend data store.
public RefreshData ( ) : bool
Результат bool

RefreshData() защищенный Метод

Refreshes the UserData from the backend data store loading user groups into desired collection.
protected RefreshData ( List groupCollection, int providerID ) : bool
groupCollection List Target collection for user groups.
providerID int Unique provider ID used to distinguish cached user data that may be different based on provider.
Результат bool

ResetPassword() публичный Метод

Resets user password in the backend data store.
Always
public ResetPassword ( string securityAnswer ) : bool
securityAnswer string Answer to the user's security question.
Результат bool

SaveSettings() публичный Метод

Saves LdapSecurityProvider settings to the config file if the SecurityProviderBase.PersistSettings property is set to true.
public SaveSettings ( ) : void
Результат void

TranslateRole() публичный Метод

Performs a translation of the specified user role.
public TranslateRole ( string role ) : string
role string The user role to be translated.
Результат string

UpdateData() публичный Метод

Updates the UserData in the backend data store.
Always
public UpdateData ( ) : bool
Результат bool