C# Class Sholo.Web.Security.Analysis.RequestAnalyzer

Utility class to analyze the state of FormsAuthenticationTickets and FormsAuthenticationCookies
ファイルを表示 Open project: scottt732/SholoWebSecurity

Public Methods

Method Description
AnalyzeFormsAuthenticationCookie ( System.Web.HttpCookie cookie ) : FormsAuthenticationCookieAnalysis

Perform analysis of the FormsAuthenticationCookie supplied

AnalyzeFormsAuthenticationTicket ( FormsAuthenticationCookieAnalysis cookieAnalysis, bool enforceServerAuthenticationTicketValidation, RequestLifecyclePhase phase ) : FormsAuthenticationTicketAnalysis

Perform analysis of the FormsAuthenticationTicket supplied

AnalyzeRequest ( System.Web.HttpCookie formsAuthenticationCookie, RequestLifecyclePhase requestPhase, bool saveToContext ) : RequestAnalysis

Creates a new instance of a FormsAuthenticationCookieAnalyzer

AnalyzeServerAuthenticationTicket ( ContextInformation contextInformation, FormsAuthenticationCookieAnalysis cookieAnalysis, FormsAuthenticationTicketAnalysis ticketAnalysis, UserAuthenticationTicket userAuthenticationTicket, bool enforceHostAddressValidation ) : UserAuthenticationTicketAnalysis

Perform analysis of the UserAuthenticationTicket supplied

AnalyzeServerAuthenticationTicket ( ContextInformation contextInformation, FormsAuthenticationCookieAnalysis cookieAnalysis, FormsAuthenticationTicketAnalysis ticketAnalysis, bool enforceHostAddressValidation ) : UserAuthenticationTicketAnalysis

Retrieve and analyze the UserAuthenticationTicket

Compare ( RequestAnalysis before, RequestAnalysis after ) : ComparisonResult

Performs a comparison of analyses taken a different points in the request processing pipeline

GetRequestPhasesWithAnalyses ( ) : RequestLifecyclePhase[]

Retrieve all phases for which a RequestAnalysis has been performed & persisted to HttpContext.Current.Items collection

RetrieveAnalysis ( RequestLifecyclePhase requestPhase ) : RequestAnalysis

Retrieves the saved analysis for the request phase specified

Method Details

AnalyzeFormsAuthenticationCookie() public static method

Perform analysis of the FormsAuthenticationCookie supplied
public static AnalyzeFormsAuthenticationCookie ( System.Web.HttpCookie cookie ) : FormsAuthenticationCookieAnalysis
cookie System.Web.HttpCookie The FormsAuthenticationCookie to validate
return FormsAuthenticationCookieAnalysis

AnalyzeFormsAuthenticationTicket() public static method

Perform analysis of the FormsAuthenticationTicket supplied
public static AnalyzeFormsAuthenticationTicket ( FormsAuthenticationCookieAnalysis cookieAnalysis, bool enforceServerAuthenticationTicketValidation, RequestLifecyclePhase phase ) : FormsAuthenticationTicketAnalysis
cookieAnalysis FormsAuthenticationCookieAnalysis The result of the FormsAuthenticationCookie analysis
enforceServerAuthenticationTicketValidation bool Indicates whether to enforce UserAuthenticationTicket validation
phase RequestLifecyclePhase
return FormsAuthenticationTicketAnalysis

AnalyzeRequest() public static method

Creates a new instance of a FormsAuthenticationCookieAnalyzer
public static AnalyzeRequest ( System.Web.HttpCookie formsAuthenticationCookie, RequestLifecyclePhase requestPhase, bool saveToContext ) : RequestAnalysis
formsAuthenticationCookie System.Web.HttpCookie The formsAuthenticationCookie to inspect
requestPhase RequestLifecyclePhase The phase of the request procesisng lifecycle from which the analysis is being requested
saveToContext bool Whether or not to save the result of the analysis to the HttpContext.Current.Items collection
return RequestAnalysis

AnalyzeServerAuthenticationTicket() public static method

Perform analysis of the UserAuthenticationTicket supplied
public static AnalyzeServerAuthenticationTicket ( ContextInformation contextInformation, FormsAuthenticationCookieAnalysis cookieAnalysis, FormsAuthenticationTicketAnalysis ticketAnalysis, UserAuthenticationTicket userAuthenticationTicket, bool enforceHostAddressValidation ) : UserAuthenticationTicketAnalysis
contextInformation ContextInformation Context information derived from the current request
cookieAnalysis FormsAuthenticationCookieAnalysis The result of the FormsAuthenticationCookie analysis
ticketAnalysis FormsAuthenticationTicketAnalysis The result of the FormsAuthenticationTicket analysis
userAuthenticationTicket Sholo.Web.Security.Authentication.User.UserAuthenticationTicket The UserAuthenticationTicket to inspect
enforceHostAddressValidation bool Indicates whether to enforce that the ticket was provided from the same IP address for which it created
return UserAuthenticationTicketAnalysis

AnalyzeServerAuthenticationTicket() public static method

Retrieve and analyze the UserAuthenticationTicket
public static AnalyzeServerAuthenticationTicket ( ContextInformation contextInformation, FormsAuthenticationCookieAnalysis cookieAnalysis, FormsAuthenticationTicketAnalysis ticketAnalysis, bool enforceHostAddressValidation ) : UserAuthenticationTicketAnalysis
contextInformation ContextInformation Context information derived from the current request
cookieAnalysis FormsAuthenticationCookieAnalysis The result of the FormsAuthenticationCookie analysis
ticketAnalysis FormsAuthenticationTicketAnalysis The result of the FormsAuthenticationTicket analysis
enforceHostAddressValidation bool Indicates whether to enforce that the ticket was provided from the same IP address for which it created
return UserAuthenticationTicketAnalysis

Compare() public static method

Performs a comparison of analyses taken a different points in the request processing pipeline
public static Compare ( RequestAnalysis before, RequestAnalysis after ) : ComparisonResult
before RequestAnalysis The prior analysis
after RequestAnalysis The current analysis
return ComparisonResult

GetRequestPhasesWithAnalyses() public static method

Retrieve all phases for which a RequestAnalysis has been performed & persisted to HttpContext.Current.Items collection
public static GetRequestPhasesWithAnalyses ( ) : RequestLifecyclePhase[]
return RequestLifecyclePhase[]

RetrieveAnalysis() public static method

Retrieves the saved analysis for the request phase specified
public static RetrieveAnalysis ( RequestLifecyclePhase requestPhase ) : RequestAnalysis
requestPhase RequestLifecyclePhase The phase of the request processing to request an analysis for
return RequestAnalysis