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

Base class for a provider of role-based security in applications.
Наследование: ISecurityProvider
Показать файл Открыть проект

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

Метод Описание
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.

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

Метод Описание
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.

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

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

When overridden in a derived class, authenticates the user.
public abstract Authenticate ( string password ) : bool
password string Password to be used for authentication.
Результат bool

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

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.
Результат bool

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

Releases all the resources used by the security provider.
public Dispose ( ) : void
Результат void

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

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.
Результат void

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

Initializes the security provider.
public Initialize ( ) : void
Результат void

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

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
Результат void

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

When overridden in a derived class, refreshes the UserData from the backend datastore.
public abstract RefreshData ( ) : bool
Результат bool

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

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.
Результат bool

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

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
Результат void

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

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.
Результат System

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

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

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

When overridden in a derived class, updates the UserData in the backend datastore.
public abstract UpdateData ( ) : bool
Результат bool