C# Class nonintanon.Security.WebSecurity

Datei anzeigen Open project: nonintanon/SimpleGuidMembershipProvider

Public Properties

Property Type Description
EnableSimpleMembershipKey string

Private Properties

Property Type Description
CreateAccount string
CreateDefaultSimpleMembershipProvider SimpleMembershipProvider
CreateDefaultSimpleRoleProvider SimpleRoleProvider
CreateUserAndAccount string
GeneratePasswordResetToken string
InitializeMembershipProvider void
InitializeProviders void
InitializeRoleProvider void
IsAccountLockedOutInternal bool
IsUserLoggedOn bool
Login bool
Logout void
PreAppStartInit void
VerifyProvider GuidExtendedMembershipProvider

Public Methods

Method Description
ChangePassword ( string userName, string currentPassword, string newPassword ) : bool
ConfirmAccount ( string accountConfirmationToken ) : bool
ConfirmAccount ( string userName, string accountConfirmationToken ) : bool
GetCreateDate ( string userName ) : System.DateTime
GetLastPasswordFailureDate ( string userName ) : System.DateTime
GetPasswordChangedDate ( string userName ) : System.DateTime
GetPasswordFailuresSinceLastSuccess ( string userName ) : int
GetUserId ( string userName ) : System.Guid
GetUserIdFromPasswordResetToken ( string token ) : System.Guid
InitializeDatabaseConnection ( string connectionStringName, string userTableName, string userIdColumn, string userNameColumn, bool autoCreateTables ) : void
InitializeDatabaseConnection ( string connectionString, string providerName, string userTableName, string userIdColumn, string userNameColumn, bool autoCreateTables ) : void
IsAccountLockedOut ( string userName, int allowedPasswordAttempts, TimeSpan interval ) : bool
IsAccountLockedOut ( string userName, int allowedPasswordAttempts, int intervalInSeconds ) : bool
IsConfirmed ( string userName ) : bool
IsCurrentUser ( string userName ) : bool
RequireAuthenticatedUser ( ) : void
RequireRoles ( ) : void
RequireUser ( Guid userId ) : void
RequireUser ( string userName ) : void
ResetPassword ( string passwordResetToken, string newPassword ) : bool
UserExists ( string userName ) : bool

Private Methods

Method Description
CreateAccount ( string userName, string password, bool requireConfirmationToken = false ) : string
CreateDefaultSimpleMembershipProvider ( string name, MembershipProvider currentDefault ) : SimpleMembershipProvider
CreateDefaultSimpleRoleProvider ( string name, System.Web.Security.RoleProvider currentDefault ) : SimpleRoleProvider
CreateUserAndAccount ( string userName, string password, object propertyValues = null, bool requireConfirmationToken = false ) : string
GeneratePasswordResetToken ( string userName, int tokenExpirationInMinutesFromNow = 1440 ) : string
InitializeMembershipProvider ( SimpleMembershipProvider simpleMembership, DatabaseConnectionInfo connect, string userTableName, string userIdColumn, string userNameColumn, bool createTables ) : void
InitializeProviders ( DatabaseConnectionInfo connect, string userTableName, string userIdColumn, string userNameColumn, bool autoCreateTables ) : void
InitializeRoleProvider ( SimpleRoleProvider simpleRoles, DatabaseConnectionInfo connect, string userTableName, string userIdColumn, string userNameColumn, bool createTables ) : void
IsAccountLockedOutInternal ( GuidExtendedMembershipProvider provider, string userName, int allowedPasswordAttempts, TimeSpan interval ) : bool
IsUserLoggedOn ( Guid userId ) : bool
Login ( string userName, string password, bool persistCookie = false ) : bool
Logout ( ) : void
PreAppStartInit ( ) : void
VerifyProvider ( ) : GuidExtendedMembershipProvider

Method Details

ChangePassword() public static method

public static ChangePassword ( string userName, string currentPassword, string newPassword ) : bool
userName string
currentPassword string
newPassword string
return bool

ConfirmAccount() public static method

public static ConfirmAccount ( string accountConfirmationToken ) : bool
accountConfirmationToken string
return bool

ConfirmAccount() public static method

public static ConfirmAccount ( string userName, string accountConfirmationToken ) : bool
userName string
accountConfirmationToken string
return bool

GetCreateDate() public static method

public static GetCreateDate ( string userName ) : System.DateTime
userName string
return System.DateTime

GetLastPasswordFailureDate() public static method

public static GetLastPasswordFailureDate ( string userName ) : System.DateTime
userName string
return System.DateTime

GetPasswordChangedDate() public static method

public static GetPasswordChangedDate ( string userName ) : System.DateTime
userName string
return System.DateTime

GetPasswordFailuresSinceLastSuccess() public static method

public static GetPasswordFailuresSinceLastSuccess ( string userName ) : int
userName string
return int

GetUserId() public static method

public static GetUserId ( string userName ) : System.Guid
userName string
return System.Guid

GetUserIdFromPasswordResetToken() public static method

public static GetUserIdFromPasswordResetToken ( string token ) : System.Guid
token string
return System.Guid

InitializeDatabaseConnection() public static method

public static InitializeDatabaseConnection ( string connectionStringName, string userTableName, string userIdColumn, string userNameColumn, bool autoCreateTables ) : void
connectionStringName string
userTableName string
userIdColumn string
userNameColumn string
autoCreateTables bool
return void

InitializeDatabaseConnection() public static method

public static InitializeDatabaseConnection ( string connectionString, string providerName, string userTableName, string userIdColumn, string userNameColumn, bool autoCreateTables ) : void
connectionString string
providerName string
userTableName string
userIdColumn string
userNameColumn string
autoCreateTables bool
return void

IsAccountLockedOut() public static method

public static IsAccountLockedOut ( string userName, int allowedPasswordAttempts, TimeSpan interval ) : bool
userName string
allowedPasswordAttempts int
interval TimeSpan
return bool

IsAccountLockedOut() public static method

public static IsAccountLockedOut ( string userName, int allowedPasswordAttempts, int intervalInSeconds ) : bool
userName string
allowedPasswordAttempts int
intervalInSeconds int
return bool

IsConfirmed() public static method

public static IsConfirmed ( string userName ) : bool
userName string
return bool

IsCurrentUser() public static method

public static IsCurrentUser ( string userName ) : bool
userName string
return bool

RequireAuthenticatedUser() public static method

public static RequireAuthenticatedUser ( ) : void
return void

RequireRoles() public static method

public static RequireRoles ( ) : void
return void

RequireUser() public static method

public static RequireUser ( Guid userId ) : void
userId Guid
return void

RequireUser() public static method

public static RequireUser ( string userName ) : void
userName string
return void

ResetPassword() public static method

public static ResetPassword ( string passwordResetToken, string newPassword ) : bool
passwordResetToken string
newPassword string
return bool

UserExists() public static method

public static UserExists ( string userName ) : bool
userName string
return bool

Property Details

EnableSimpleMembershipKey public_oe static_oe property

public static string EnableSimpleMembershipKey
return string