C# Class ScrewTurn.Wiki.LoginTools

Implements login tools.
显示文件 Open project: mono/ScrewTurnWiki Class Usage Examples

Public Methods

Method Description
SetLoginCookie ( string username, string loginKey, System.DateTime expiration ) : void

Sets the login cookie.

SetupSession ( UserInfo user ) : void

Sets up a user session.

TryAutoLogin ( ) : void

Tries to automatically login the current user.

TryRedirect ( bool goHome ) : void

Tries to redirect the user to any specified URL.

VerifyReadPermissionsForCurrentNamespace ( ) : void

Verifies read permissions for the current user, redirecting to the appropriate page if no valid permissions are found.

Method Details

SetLoginCookie() public static method

Sets the login cookie.
public static SetLoginCookie ( string username, string loginKey, System.DateTime expiration ) : void
username string The username.
loginKey string The login key.
expiration System.DateTime The expiration date/time.
return void

SetupSession() public static method

Sets up a user session.
public static SetupSession ( UserInfo user ) : void
user UserInfo The user (null for anonymous).
return void

TryAutoLogin() public static method

Tries to automatically login the current user.
public static TryAutoLogin ( ) : void
return void

TryRedirect() public static method

Tries to redirect the user to any specified URL.
public static TryRedirect ( bool goHome ) : void
goHome bool A value indicating whether to redirect to the home page if no explicit redirect URL is found.
return void

VerifyReadPermissionsForCurrentNamespace() public static method

Verifies read permissions for the current user, redirecting to the appropriate page if no valid permissions are found.
public static VerifyReadPermissionsForCurrentNamespace ( ) : void
return void