C# Class ScrewTurn.Wiki.LoginTools

Implements login tools.
Afficher le fichier Open project: mono/ScrewTurnWiki Class Usage Examples

Méthodes publiques

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

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

SetupSession() public static méthode

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

TryAutoLogin() public static méthode

Tries to automatically login the current user.
public static TryAutoLogin ( ) : void
Résultat void

TryRedirect() public static méthode

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

VerifyReadPermissionsForCurrentNamespace() public static méthode

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