C# Class Rock.Security.Authentication.Database

Inheritance: AuthenticationComponent
ファイルを表示 Open project: NewSpring/Rock

Public Methods

Method Description
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.

Private Methods

Method Description
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

Method Details

Authenticate() public method

Authenticates the specified user name.
public Authenticate ( UserLogin user, string password ) : System.Boolean
user UserLogin The user.
password string The password.
return System.Boolean

Authenticate() public method

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.
return bool

ChangePassword() public method

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.
return bool

EncodePassword() public method

Encodes the password.
public EncodePassword ( UserLogin user, string password ) : String
user UserLogin The user.
password string
return String

GenerateLoginUrl() public method

Generates the login URL.
public GenerateLoginUrl ( HttpRequest request ) : Uri
request System.Web.HttpRequest The request.
return System.Uri

GenerateUsername() public static method

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.
return string

ImageUrl() public method

Gets the URL of an image that should be displayed.
public ImageUrl ( ) : string
return string

IsReturningFromAuthentication() public method

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.
return bool

SetPassword() public method

Sets the password.
public SetPassword ( UserLogin user, string password ) : void
user UserLogin The user.
password string The password.
return void