C# 클래스 GSF.Security.AdoSecurityProvider

Represents an ISecurityProvider that uses ADO.NET data source (SQL Server, MySQL, Oracle, etc.) for its backend data store and authenticates internal users against Active Directory and external users against the database.
Minimum expected table schema for ADO Security Provider:
상속: LdapSecurityProvider
파일 보기 프로젝트 열기: GridProtectionAlliance/gsf

공개 메소드들

메소드 설명
AdoSecurityProvider ( string username ) : System

Initializes a new instance of the AdoSecurityProvider class.

Authenticate ( string password ) : bool

Authenticates the user.

ChangePassword ( string oldPassword, string newPassword ) : bool

Changes user password in the backend data store.

ExtractSecurityContext ( IDbConnection connection, Action exceptionHandler ) : DataSet

Extracts the current security context from the database.

LoadSettings ( ) : void

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

RefreshData ( ) : bool

Refreshes the UserData.

보호된 메소드들

메소드 설명
AdoSecurityProvider ( string username, bool canRefreshData, bool canUpdateData, bool canResetPassword, bool canChangePassword ) : System

Initializes a new instance of the AdoSecurityProvider class.

GetLdapPath ( ) : string

Gets the LDAP path.

LogAuthenticationAttempt ( bool loginSuccess ) : bool

Logs user authentication attempt.

LogError ( string source, string message ) : bool

Logs information about an encountered exception to the backend data store.

비공개 메소드들

메소드 설명
AddSecurityContextTable ( IDbConnection connection, DataSet securityContext, string tableName, System.Guid nodeID ) : void
AdoSecurityProvider ( ) : System
CacheLastUserRoles ( object state ) : void
EncodeEscapeSequences ( string value ) : string
UpdatePrimaryKey ( DataTable table, string columnName ) : void

메소드 상세

AdoSecurityProvider() 공개 메소드

Initializes a new instance of the AdoSecurityProvider class.
public AdoSecurityProvider ( string username ) : System
username string Name that uniquely identifies the user.
리턴 System

AdoSecurityProvider() 보호된 메소드

Initializes a new instance of the AdoSecurityProvider class.
protected AdoSecurityProvider ( 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

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.
does not meet password requirements.
public ChangePassword ( string oldPassword, string newPassword ) : bool
oldPassword string User's current password.
newPassword string User's new password.
리턴 bool

ExtractSecurityContext() 공개 정적인 메소드

Extracts the current security context from the database.
public static ExtractSecurityContext ( IDbConnection connection, Action exceptionHandler ) : DataSet
connection IDbConnection Existing database connection used to extract security context.
exceptionHandler Action Exception handler to use for any exceptions encountered while updating security cache.
리턴 System.Data.DataSet

GetLdapPath() 보호된 메소드

Gets the LDAP path.
protected GetLdapPath ( ) : string
리턴 string

LoadSettings() 공개 메소드

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

LogAuthenticationAttempt() 보호된 메소드

Logs user authentication attempt.
protected LogAuthenticationAttempt ( bool loginSuccess ) : bool
loginSuccess bool true if user authentication was successful, otherwise false.
리턴 bool

LogError() 보호된 메소드

Logs information about an encountered exception to the backend data store.
protected LogError ( string source, string message ) : bool
source string Source of the exception.
message string Detailed description of the exception.
리턴 bool

RefreshData() 공개 메소드

Refreshes the UserData.
public RefreshData ( ) : bool
리턴 bool