C# Класс ScrewTurn.Wiki.LoginTools

Implements login tools.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

SetLoginCookie() публичный статический Метод

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.
Результат void

SetupSession() публичный статический Метод

Sets up a user session.
public static SetupSession ( UserInfo user ) : void
user UserInfo The user (null for anonymous).
Результат void

TryAutoLogin() публичный статический Метод

Tries to automatically login the current user.
public static TryAutoLogin ( ) : void
Результат void

TryRedirect() публичный статический Метод

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.
Результат void

VerifyReadPermissionsForCurrentNamespace() публичный статический Метод

Verifies read permissions for the current user, redirecting to the appropriate page if no valid permissions are found.
public static VerifyReadPermissionsForCurrentNamespace ( ) : void
Результат void