C# Class GSF.Security.SecurityProviderBase

Base class for a provider of role-based security in applications.
Inheritance: ISecurityProvider
Afficher le fichier Open project: GridProtectionAlliance/gsf

Méthodes publiques

Méthode Description
Authenticate ( string password ) : bool

When overridden in a derived class, authenticates the user.

ChangePassword ( string oldPassword, string newPassword ) : bool

When overridden in a derived class, changes user password in the backend datastore.

Dispose ( ) : void

Releases all the resources used by the security provider.

Initialize ( ) : void

Initializes the security provider.

LoadSettings ( ) : void

Loads saved security provider settings from the config file if the PersistSettings property is set to true.

RefreshData ( ) : bool

When overridden in a derived class, refreshes the UserData from the backend datastore.

ResetPassword ( string securityAnswer ) : bool

When overridden in a derived class, resets user password in the backend datastore.

SaveSettings ( ) : void

Saves security provider settings to the config file if the PersistSettings property is set to true.

TranslateRole ( string role ) : string

Performs a translation of the specified user role.

UpdateData ( ) : bool

When overridden in a derived class, updates the UserData in the backend datastore.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the security provider and optionally releases the managed resources.

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

Initializes a new instance of the security provider.

Method Details

Authenticate() public abstract méthode

When overridden in a derived class, authenticates the user.
public abstract Authenticate ( string password ) : bool
password string Password to be used for authentication.
Résultat bool

ChangePassword() public abstract méthode

When overridden in a derived class, changes user password in the backend datastore.
public abstract ChangePassword ( string oldPassword, string newPassword ) : bool
oldPassword string User's current password.
newPassword string User's new password.
Résultat bool

Dispose() public méthode

Releases all the resources used by the security provider.
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

Releases the unmanaged resources used by the security provider and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
Résultat void

Initialize() public méthode

Initializes the security provider.
public Initialize ( ) : void
Résultat void

LoadSettings() public méthode

Loads saved security provider settings from the config file if the PersistSettings property is set to true.
has a value of null or empty string.
public LoadSettings ( ) : void
Résultat void

RefreshData() public abstract méthode

When overridden in a derived class, refreshes the UserData from the backend datastore.
public abstract RefreshData ( ) : bool
Résultat bool

ResetPassword() public abstract méthode

When overridden in a derived class, resets user password in the backend datastore.
public abstract ResetPassword ( string securityAnswer ) : bool
securityAnswer string Answer to the user's security question.
Résultat bool

SaveSettings() public méthode

Saves security provider settings to the config file if the PersistSettings property is set to true.
has a value of null or empty string.
public SaveSettings ( ) : void
Résultat void

SecurityProviderBase() protected méthode

Initializes a new instance of the security provider.
protected SecurityProviderBase ( 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

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 abstract méthode

When overridden in a derived class, updates the UserData in the backend datastore.
public abstract UpdateData ( ) : bool
Résultat bool