C# Класс CardShop.Auth.UserAuth

Наследование: IUserAuth
Показать файл Открыть проект

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

Метод Описание
CreateSession ( ) : void

Creates a new UserAuth for the current session.

FindUser ( IPrincipal principal ) : User
GetUserAuth ( IHttpContext context ) : IUserAuth

Returns an IUserAuth with the specified HttpContext.

HasRole ( ) : bool

Will check to see if the currently-acting user has any of the provided roles. Otherwise, if no roles are specified, the check will merely be to see if the user is logged in.

IsActive ( ) : bool
IsLoggedIn ( ) : bool

Returns whether there is a logged-in user stored in session.

Login ( IPrincipal principal ) : bool
Logout ( ) : void

Logs out the current user.

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

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

Creates a new UserAuth for the current session.
public static CreateSession ( ) : void
Результат void

FindUser() публичный Метод

public FindUser ( IPrincipal principal ) : User
principal IPrincipal
Результат CardShop.Models.User

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

Returns an IUserAuth with the specified HttpContext.
public static GetUserAuth ( IHttpContext context ) : IUserAuth
context IHttpContext
Результат IUserAuth

HasRole() публичный Метод

Will check to see if the currently-acting user has any of the provided roles. Otherwise, if no roles are specified, the check will merely be to see if the user is logged in.
public HasRole ( ) : bool
Результат bool

IsActive() публичный Метод

public IsActive ( ) : bool
Результат bool

IsLoggedIn() публичный Метод

Returns whether there is a logged-in user stored in session.
public IsLoggedIn ( ) : bool
Результат bool

Login() публичный Метод

public Login ( IPrincipal principal ) : bool
principal IPrincipal
Результат bool

Logout() публичный Метод

Logs out the current user.
public Logout ( ) : void
Результат void