C# 클래스 Phun.Security.PhunWebSecurity

Not trying to be microsoft websecurity which is horrible. Static?
파일 보기 프로젝트 열기: noogen/phuncms

공개 프로퍼티들

프로퍼티 타입 설명
EnableSimpleMembershipKey string

Private Properties

프로퍼티 타입 설명
CreateAccount string
CreateDefaultSimpleMembershipProvider PhunSimpleMembershipProvider
CreateDefaultSimpleRoleProvider WebMatrix.WebData.SimpleRoleProvider
CreateUserAndAccount string
GeneratePasswordResetToken string
InitializeMembershipProvider void
InitializeProviders void
InitializeRoleProvider void
IsAccountLockedOutInternal bool
IsUserLoggedOn bool
Login bool
Logout void
PreAppStartInit void
VerifyProvider WebMatrix.WebData.ExtendedMembershipProvider

공개 메소드들

메소드 설명
ChangePassword ( string userName, string currentPassword, string newPassword ) : bool

Changes the password.

ConfirmAccount ( string accountConfirmationToken ) : bool

Confirms the account.

ConfirmAccount ( string userName, string accountConfirmationToken ) : bool

Confirms the account.

GetCreateDate ( string userName ) : System.DateTime

Gets the create date.

GetLastPasswordFailureDate ( string userName ) : System.DateTime

Gets the last password failure date.

GetPasswordChangedDate ( string userName ) : System.DateTime

Gets the password changed date.

GetPasswordFailuresSinceLastSuccess ( string userName ) : int

Gets the password failures since last success.

GetUserId ( string userName ) : int

Gets the user id.

GetUserIdFromPasswordResetToken ( string token ) : int

Gets the user id from password reset token.

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

Initializes the database connection.

IsAccountLockedOut ( string userName, int allowedPasswordAttempts, System.TimeSpan interval ) : bool

Determines whether [is account locked out] [the specified user name].

IsAccountLockedOut ( string userName, int allowedPasswordAttempts, int intervalInSeconds ) : bool

Determines whether [is account locked out] [the specified user name].

IsConfirmed ( string userName ) : bool

Determines whether the specified user name is confirmed.

IsCurrentUser ( string userName ) : bool

Determines whether [is current user] [the specified user name].

RequireAuthenticatedUser ( ) : void

Requires the authenticated user.

RequireRoles ( ) : void

Requires the roles.

RequireUser ( int userId ) : void

Requires the user.

RequireUser ( string userName ) : void

Requires the user.

ResetPassword ( string passwordResetToken, string newPassword ) : bool

Resets the password.

UserExists ( string userName ) : bool

Users the exists.

비공개 메소드들

메소드 설명
CreateAccount ( string userName, string password, bool requireConfirmationToken = false ) : string
CreateDefaultSimpleMembershipProvider ( string name, MembershipProvider currentDefault ) : PhunSimpleMembershipProvider

Creates the default simple membership provider.

CreateDefaultSimpleRoleProvider ( string name, System.Web.Security.RoleProvider currentDefault ) : WebMatrix.WebData.SimpleRoleProvider

Creates the default simple role provider.

CreateUserAndAccount ( string userName, string password, object propertyValues = null, bool requireConfirmationToken = false ) : string
GeneratePasswordResetToken ( string userName, int tokenExpirationInMinutesFromNow = 1440 ) : string
InitializeMembershipProvider ( PhunSimpleMembershipProvider simpleMembership, string connectionStringName, string userTableName, string userIdColumn, string userNameColumn, bool createTables ) : void

Initializes the membership provider.

InitializeProviders ( string connectionStringName, string userTableName, string userIdColumn, string userNameColumn, bool autoCreateTables ) : void

Initializes the providers.

InitializeRoleProvider ( PhunSimpleRoleProvider simpleRoles, string connectionStringName, string userTableName, string userIdColumn, string userNameColumn, bool createTables ) : void

Initializes the role provider.

IsAccountLockedOutInternal ( WebMatrix.WebData.ExtendedMembershipProvider provider, string userName, int allowedPasswordAttempts, System.TimeSpan interval ) : bool

Determines whether [is account locked out internal] [the specified provider].

IsUserLoggedOn ( int userId ) : bool
Login ( string userName, string password, bool persistCookie = false ) : bool
Logout ( ) : void
PreAppStartInit ( ) : void

Pres the app start init.

VerifyProvider ( ) : WebMatrix.WebData.ExtendedMembershipProvider

Verifies the provider.

메소드 상세

ChangePassword() 공개 정적인 메소드

Changes the password.
public static ChangePassword ( string userName, string currentPassword, string newPassword ) : bool
userName string Name of the user.
currentPassword string The current password.
newPassword string The new password.
리턴 bool

ConfirmAccount() 공개 정적인 메소드

Confirms the account.
public static ConfirmAccount ( string accountConfirmationToken ) : bool
accountConfirmationToken string The account confirmation token.
리턴 bool

ConfirmAccount() 공개 정적인 메소드

Confirms the account.
public static ConfirmAccount ( string userName, string accountConfirmationToken ) : bool
userName string Name of the user.
accountConfirmationToken string The account confirmation token.
리턴 bool

GetCreateDate() 공개 정적인 메소드

Gets the create date.
public static GetCreateDate ( string userName ) : System.DateTime
userName string Name of the user.
리턴 System.DateTime

GetLastPasswordFailureDate() 공개 정적인 메소드

Gets the last password failure date.
public static GetLastPasswordFailureDate ( string userName ) : System.DateTime
userName string Name of the user.
리턴 System.DateTime

GetPasswordChangedDate() 공개 정적인 메소드

Gets the password changed date.
public static GetPasswordChangedDate ( string userName ) : System.DateTime
userName string Name of the user.
리턴 System.DateTime

GetPasswordFailuresSinceLastSuccess() 공개 정적인 메소드

Gets the password failures since last success.
public static GetPasswordFailuresSinceLastSuccess ( string userName ) : int
userName string Name of the user.
리턴 int

GetUserId() 공개 정적인 메소드

Gets the user id.
public static GetUserId ( string userName ) : int
userName string Name of the user.
리턴 int

GetUserIdFromPasswordResetToken() 공개 정적인 메소드

Gets the user id from password reset token.
public static GetUserIdFromPasswordResetToken ( string token ) : int
token string The token.
리턴 int

InitializeDatabaseConnection() 공개 정적인 메소드

Initializes the database connection.
public static InitializeDatabaseConnection ( string connectionStringName, string userTableName, string userIdColumn, string userNameColumn, bool autoCreateTables ) : void
connectionStringName string Name of the connection string.
userTableName string Name of the user table.
userIdColumn string The user id column.
userNameColumn string The user name column.
autoCreateTables bool if set to true [auto create tables].
리턴 void

IsAccountLockedOut() 공개 정적인 메소드

Determines whether [is account locked out] [the specified user name].
public static IsAccountLockedOut ( string userName, int allowedPasswordAttempts, System.TimeSpan interval ) : bool
userName string Name of the user.
allowedPasswordAttempts int The allowed password attempts.
interval System.TimeSpan The interval.
리턴 bool

IsAccountLockedOut() 공개 정적인 메소드

Determines whether [is account locked out] [the specified user name].
public static IsAccountLockedOut ( string userName, int allowedPasswordAttempts, int intervalInSeconds ) : bool
userName string Name of the user.
allowedPasswordAttempts int The allowed password attempts.
intervalInSeconds int The interval in seconds.
리턴 bool

IsConfirmed() 공개 정적인 메소드

Determines whether the specified user name is confirmed.
public static IsConfirmed ( string userName ) : bool
userName string Name of the user.
리턴 bool

IsCurrentUser() 공개 정적인 메소드

Determines whether [is current user] [the specified user name].
public static IsCurrentUser ( string userName ) : bool
userName string Name of the user.
리턴 bool

RequireAuthenticatedUser() 공개 정적인 메소드

Requires the authenticated user.
public static RequireAuthenticatedUser ( ) : void
리턴 void

RequireRoles() 공개 정적인 메소드

Requires the roles.
public static RequireRoles ( ) : void
리턴 void

RequireUser() 공개 정적인 메소드

Requires the user.
public static RequireUser ( int userId ) : void
userId int The user id.
리턴 void

RequireUser() 공개 정적인 메소드

Requires the user.
public static RequireUser ( string userName ) : void
userName string Name of the user.
리턴 void

ResetPassword() 공개 정적인 메소드

Resets the password.
public static ResetPassword ( string passwordResetToken, string newPassword ) : bool
passwordResetToken string The password reset token.
newPassword string The new password.
리턴 bool

UserExists() 공개 정적인 메소드

Users the exists.
public static UserExists ( string userName ) : bool
userName string Name of the user.
리턴 bool

프로퍼티 상세

EnableSimpleMembershipKey 공개적으로 정적으로 프로퍼티

The enable simple membership key
public static string EnableSimpleMembershipKey
리턴 string