Table of Contents

Class HttpAuthenticationContext

Namespace
System.Web.Http.Filters
Assembly
System.Web.Http.dll

Represents an authentication context containing information for performing authentication.

public class HttpAuthenticationContext
Inheritance
HttpAuthenticationContext
Inherited Members

Constructors

HttpAuthenticationContext(HttpActionContext, IPrincipal)

Initializes a new instance of the HttpAuthenticationContext class.

public HttpAuthenticationContext(HttpActionContext actionContext, IPrincipal principal)

Parameters

actionContext HttpActionContext

The action context.

principal IPrincipal

The current principal.

Properties

ActionContext

Gets the action context.

public HttpActionContext ActionContext { get; }

Property Value

HttpActionContext

The action context.

ErrorResult

Gets or sets an action result that will produce an error response (if authentication failed; otherwise, null).

public IHttpActionResult ErrorResult { get; set; }

Property Value

IHttpActionResult

An action result that will produce an error response.

Principal

Gets or sets the authenticated principal.

public IPrincipal Principal { get; set; }

Property Value

IPrincipal

The authenticated principal.

Request

Gets the request message.

public HttpRequestMessage Request { get; }

Property Value

HttpRequestMessage

The request message.