C# Class 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).
Inheritance: SecurityProviderBase
Afficher le fichier Open project: GridProtectionAlliance/gsf

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Method Details

Authenticate() public méthode

Authenticates the user.
public Authenticate ( string password ) : bool
password string Password to be used for authentication.
Résultat bool

ChangePassword() public méthode

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.
Résultat bool

GetLdapPath() protected méthode

Gets the LDAP path.
protected GetLdapPath ( ) : string
Résultat string

LdapSecurityProvider() public méthode

Initializes a new instance of the LdapSecurityProvider class.
public LdapSecurityProvider ( string username ) : System
username string Name that uniquely identifies the user.
Résultat System

LdapSecurityProvider() protected méthode

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.
Résultat System

LoadSettings() public méthode

Loads saved LdapSecurityProvider settings from the config file if the SecurityProviderBase.PersistSettings property is set to true.
public LoadSettings ( ) : void
Résultat void

RefreshData() public méthode

Refreshes the UserData from the backend data store.
public RefreshData ( ) : bool
Résultat bool

RefreshData() protected méthode

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.
Résultat bool

ResetPassword() public méthode

Resets user password in the backend data store.
Always
public ResetPassword ( string securityAnswer ) : bool
securityAnswer string Answer to the user's security question.
Résultat bool

SaveSettings() public méthode

Saves LdapSecurityProvider settings to the config file if the SecurityProviderBase.PersistSettings property is set to true.
public SaveSettings ( ) : void
Résultat void

TranslateRole() public méthode

Performs a translation of the specified user role.
public TranslateRole ( string role ) : string
role string The user role to be translated.
Résultat string

UpdateData() public méthode

Updates the UserData in the backend data store.
Always
public UpdateData ( ) : bool
Résultat bool