프로퍼티 | 타입 | 설명 | |
---|---|---|---|
GuidStringLength | int | ||
HashAlgorithmByteLength | int | ||
HashAlgorithmStringLength | int |
메소드 | 설명 | |
---|---|---|
CalculateFormsAuthTicketHash ( System.Web.Security.FormsAuthenticationTicket formsAuthenticationTicket ) : string |
Calculates the hash of the FormsAuthenticationTicket's properties concatenated together with the salt. This is used as a first line of defense against ticket tampering to potentially avoid an unnecessary read from the Provider.
|
|
ClearAuthCookie ( ) : void |
Sends a blank and expired FormsAuthentication cookie to the client response. This effectively removes the FormsAuthentication cookie and revokes the FormsAuthenticationTicket. It also removes the cookie from the current Request object, preventing subsequent code from being able to access it during the execution of the current request. And just for good measure, it also replaces any existing principal in the current request pipeline with an anonymous one.
|
|
CreateFormsAuthTicket ( string username, string cookiePath, string serverKey, System.DateTime validFromDate, System.DateTime validUntilDate, bool persistent ) : System.Web.Security.FormsAuthenticationTicket |
Creates a FormsAuthenticationTicket for storage on the client. The UserData field contains the server key, which can be used by the server-side Provider to retrieve validation data and additional details about the ticket (e.g. IP address)
|
|
GetAuthCookie ( System.Web.Security.FormsAuthenticationTicket ticket ) : System.Web.HttpCookie |
Creates an HttpCookie containing an encrypted FormsAuthenticationTicket. The ticket must contain an hash and key into the Provider.
|
|
Initialize ( ) : void |
Initializes configuration-related properties and validates configuration.
|
|
SetAuthCookie ( System.Web.Security.FormsAuthenticationTicket clientTicket, bool overwriteRequestCookie, bool writeResponseCookie ) : void |
Encrypts a FormsAuthenticationTicket in an HttpCookie (using GetAuthCookie) and includes it in the current Request's Cookies collection and/or the Response's outbound Cookies collection.
|
|
ValidateFormsAuthTicketHash ( System.Web.Security.FormsAuthenticationTicket formsAuthenticationTicket, string expectedHash ) : bool |
Calculates the hash of the formsAuthenticationTicket and compares it to the expected hash
|
메소드 | 설명 | |
---|---|---|
UserAuthentication ( ) : System |
Static constructor
|
public static CalculateFormsAuthTicketHash ( System.Web.Security.FormsAuthenticationTicket formsAuthenticationTicket ) : string | ||
formsAuthenticationTicket | System.Web.Security.FormsAuthenticationTicket | the formsAuthenticationTicket to /// compute the hash of |
리턴 | string |
public static CreateFormsAuthTicket ( string username, string cookiePath, string serverKey, System.DateTime validFromDate, System.DateTime validUntilDate, bool persistent ) : System.Web.Security.FormsAuthenticationTicket | ||
username | string | User associated with the ticket |
cookiePath | string | Relative path on server in which cookie is valid |
serverKey | string | Provider key |
validFromDate | System.DateTime | Ticket valid from date |
validUntilDate | System.DateTime | Ticket valid to date |
persistent | bool | Ticket can persist across browser sessions |
리턴 | System.Web.Security.FormsAuthenticationTicket |
public static GetAuthCookie ( System.Web.Security.FormsAuthenticationTicket ticket ) : System.Web.HttpCookie | ||
ticket | System.Web.Security.FormsAuthenticationTicket | The FormsAuthenticationTicket to encode |
리턴 | System.Web.HttpCookie |
public static SetAuthCookie ( System.Web.Security.FormsAuthenticationTicket clientTicket, bool overwriteRequestCookie, bool writeResponseCookie ) : void | ||
clientTicket | System.Web.Security.FormsAuthenticationTicket | The FormsAuthenticationTicket to encode |
overwriteRequestCookie | bool | Whether or not to replace the cookie in /// the current Request's Cookies collection. This will trick later executing /// code on the current HTTP request into processing the updated cookie |
writeResponseCookie | bool | Whether or not to write the cookie to the /// browser via the Response's Cookies collection. |
리턴 | void |
public static ValidateFormsAuthTicketHash ( System.Web.Security.FormsAuthenticationTicket formsAuthenticationTicket, string expectedHash ) : bool | ||
formsAuthenticationTicket | System.Web.Security.FormsAuthenticationTicket | The formsAuthenticationTicket to hash |
expectedHash | string | The expected hash value |
리턴 | bool |