C# 클래스 TechTalks.API.Security.BasicAuthenticationFilter

상속: System.Web.Http.Filters.AuthorizationFilterAttribute
파일 보기 프로젝트 열기: anuragvaishy-galaxe/TechTalks

공개 메소드들

메소드 설명
BasicAuthenticationFilter ( ) : System
BasicAuthenticationFilter ( bool active ) : System

Overriden constructor to allow explicit disabling of this filter's behavior. Pass false to disable (same as no filter but declarative)

OnAuthorization ( System.Web.Http.Controllers.HttpActionContext actionContext ) : void

Override to Web API filter method to handle Basic Auth check

보호된 메소드들

메소드 설명
OnAuthorizeUser ( string username, string password, System.Web.Http.Controllers.HttpActionContext actionContext ) : bool

Base implementation for user authentication - you probably will want to override this method for application specific logic. The base implementation merely checks for username and password present and set the Thread principal. Override this method if you want to customize Authentication and store user data as needed in a Thread Principle or other Request specific storage.

ParseAuthorizationHeader ( System.Web.Http.Controllers.HttpActionContext actionContext ) : BasicAuthenticationIdentity

Parses the Authorization header and creates user credentials

비공개 메소드들

메소드 설명
Challenge ( System.Web.Http.Controllers.HttpActionContext actionContext ) : void

Send the Authentication Challenge request

메소드 상세

BasicAuthenticationFilter() 공개 메소드

public BasicAuthenticationFilter ( ) : System
리턴 System

BasicAuthenticationFilter() 공개 메소드

Overriden constructor to allow explicit disabling of this filter's behavior. Pass false to disable (same as no filter but declarative)
public BasicAuthenticationFilter ( bool active ) : System
active bool
리턴 System

OnAuthorization() 공개 메소드

Override to Web API filter method to handle Basic Auth check
public OnAuthorization ( System.Web.Http.Controllers.HttpActionContext actionContext ) : void
actionContext System.Web.Http.Controllers.HttpActionContext
리턴 void

OnAuthorizeUser() 보호된 메소드

Base implementation for user authentication - you probably will want to override this method for application specific logic. The base implementation merely checks for username and password present and set the Thread principal. Override this method if you want to customize Authentication and store user data as needed in a Thread Principle or other Request specific storage.
protected OnAuthorizeUser ( string username, string password, System.Web.Http.Controllers.HttpActionContext actionContext ) : bool
username string
password string
actionContext System.Web.Http.Controllers.HttpActionContext
리턴 bool

ParseAuthorizationHeader() 보호된 메소드

Parses the Authorization header and creates user credentials
protected ParseAuthorizationHeader ( System.Web.Http.Controllers.HttpActionContext actionContext ) : BasicAuthenticationIdentity
actionContext System.Web.Http.Controllers.HttpActionContext
리턴 BasicAuthenticationIdentity