Class LogOnExtensions

Extensions for validating log-on via ajax requests

Inheritance
System.Object
LogOnExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Shell.Web
Assembly: EPiServer.Shell.dll
Version: 8.11.0
Syntax
public static class LogOnExtensions

Methods

AddAjaxLogOnHeaders(HttpContextBase)

Adds validation headers to the response. This is used in ajax scenarios to display a log-on screen without redirecting.

Declaration
public static void AddAjaxLogOnHeaders(this HttpContextBase httpContext)
Parameters
Type Name Description
System.Web.HttpContextBase httpContext

The http context.

IsLogOnRequest(HttpContextBase)

Checks whether the request contains log-on information.

Declaration
public static bool IsLogOnRequest(this HttpContextBase httpContext)
Parameters
Type Name Description
System.Web.HttpContextBase httpContext

The http context containing the request.

Returns
Type Description
System.Boolean

true if the request is a log on request.

SendAjaxLogOnStatus(HttpContextBase, Boolean)

Sends authentication status via json to the client.

Declaration
public static void SendAjaxLogOnStatus(this HttpContextBase httpContext, bool authenticationSuccessful)
Parameters
Type Name Description
System.Web.HttpContextBase httpContext

The http context.

System.Boolean authenticationSuccessful

True if the authentication was successful and the client may continue it's business.

ValidateAjaxLogOn(HttpContextBase, ValidateUserNamePassword)

Validates an a log-on submitted via ajax.

Declaration
public static bool ValidateAjaxLogOn(this HttpContextBase httpContext, ValidateUserNamePassword validationMethod)
Parameters
Type Name Description
System.Web.HttpContextBase httpContext

The http context.

ValidateUserNamePassword validationMethod

The method that will validate the user.

Returns
Type Description
System.Boolean

True if the user was sucessfully validated.