C# Класс Rock.Security.Authentication.Database

Наследование: AuthenticationComponent
Показать файл Открыть проект

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

Метод Описание
Authenticate ( UserLogin user, string password ) : System.Boolean

Authenticates the specified user name.

Authenticate ( HttpRequest request, string &userName, string &returnUrl ) : bool

Authenticates the user based on a request from a third-party provider. Will set the username and returnUrl values.

ChangePassword ( UserLogin user, string oldPassword, string newPassword, string &warningMessage ) : bool

Changes the password.

EncodePassword ( UserLogin user, string password ) : String

Encodes the password.

GenerateLoginUrl ( HttpRequest request ) : Uri

Generates the login URL.

GenerateUsername ( string firstName, string lastName, int tryCount ) : string

Generates the username.

ImageUrl ( ) : string

Gets the URL of an image that should be displayed.

IsReturningFromAuthentication ( HttpRequest request ) : bool

Tests the Http Request to determine if authentication should be tested by this authentication provider.

SetPassword ( UserLogin user, string password ) : void

Sets the password.

Приватные методы

Метод Описание
AuthenticateBcrypt ( UserLogin user, string password ) : bool
AuthenticateSha1 ( UserLogin user, string password ) : bool
Database ( ) : System

Initializes the Database class.

EncodeBcrypt ( string password ) : string
EncodePassword ( UserLogin user, string password, byte encryptionKey ) : string

Encodes the password.

EncodeSha1 ( System.Guid userGuid, string password, byte encryptionKey ) : string
SetNewPassword ( UserLogin user, string rawPassword ) : UserLogin

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

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

Authenticates the specified user name.
public Authenticate ( UserLogin user, string password ) : System.Boolean
user UserLogin The user.
password string The password.
Результат System.Boolean

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

Authenticates the user based on a request from a third-party provider. Will set the username and returnUrl values.
public Authenticate ( HttpRequest request, string &userName, string &returnUrl ) : bool
request System.Web.HttpRequest The request.
userName string Name of the user.
returnUrl string The return URL.
Результат bool

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

Changes the password.
Cannot change password on external service type
public ChangePassword ( UserLogin user, string oldPassword, string newPassword, string &warningMessage ) : bool
user UserLogin The user.
oldPassword string The old password.
newPassword string The new password.
warningMessage string The warning message.
Результат bool

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

Encodes the password.
public EncodePassword ( UserLogin user, string password ) : String
user UserLogin The user.
password string
Результат String

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

Generates the login URL.
public GenerateLoginUrl ( HttpRequest request ) : Uri
request System.Web.HttpRequest The request.
Результат System.Uri

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

Generates the username.
public static GenerateUsername ( string firstName, string lastName, int tryCount ) : string
firstName string The first name.
lastName string The last name.
tryCount int The try count.
Результат string

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

Gets the URL of an image that should be displayed.
public ImageUrl ( ) : string
Результат string

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

Tests the Http Request to determine if authentication should be tested by this authentication provider.
public IsReturningFromAuthentication ( HttpRequest request ) : bool
request System.Web.HttpRequest The request.
Результат bool

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

Sets the password.
public SetPassword ( UserLogin user, string password ) : void
user UserLogin The user.
password string The password.
Результат void