C# 클래스 CardShop.Auth.UserAuth

상속: IUserAuth
파일 보기 프로젝트 열기: egreene/PracticeGDVP

공개 메소드들

메소드 설명
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