C# Class Rock.Security.Authentication.Database

Inheritance: AuthenticationComponent
Afficher le fichier Open project: NewSpring/Rock

Méthodes publiques

Méthode 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

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

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

Authenticate() public méthode

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.
Résultat bool

ChangePassword() public méthode

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.
Résultat bool

EncodePassword() public méthode

Encodes the password.
public EncodePassword ( UserLogin user, string password ) : String
user UserLogin The user.
password string
Résultat String

GenerateLoginUrl() public méthode

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

GenerateUsername() public static méthode

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.
Résultat string

ImageUrl() public méthode

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

IsReturningFromAuthentication() public méthode

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.
Résultat bool

SetPassword() public méthode

Sets the password.
public SetPassword ( UserLogin user, string password ) : void
user UserLogin The user.
password string The password.
Résultat void