Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ApiController.Unauthorized Method

 

Namespace:   System.Web.Http
Assembly:  System.Web.Http (in System.Web.Http.dll)

NameDescription
System_CAPS_protmethodUnauthorized(AuthenticationHeaderValue[])

Creates an UnauthorizedResult (401 Unauthorized) with the specified values.

System_CAPS_protmethodUnauthorized(IEnumerable<AuthenticationHeaderValue>)

Creates an UnauthorizedResult (401 Unauthorized) with the specified values.

Return to top

ApiController.Unauthorized Method (AuthenticationHeaderValue[])

Creates an UnauthorizedResult (401 Unauthorized) with the specified values.

protected internal UnauthorizedResult Unauthorized(
	params AuthenticationHeaderValue[] challenges
)

Parameters

challenges
Type: System.Net.Http.Headers.AuthenticationHeaderValue[]

The WWW-Authenticate challenges.

Return Value

Type: System.Web.Http.Results.UnauthorizedResult

An UnauthorizedResult with the specified values.

Return to top

ApiController.Unauthorized Method (IEnumerable<AuthenticationHeaderValue>)

Creates an UnauthorizedResult (401 Unauthorized) with the specified values.

protected internal virtual UnauthorizedResult Unauthorized(
	IEnumerable<AuthenticationHeaderValue> challenges
)

Parameters

challenges
Type: System.Collections.Generic.IEnumerable<AuthenticationHeaderValue>

The WWW-Authenticate challenges.

Return Value

Type: System.Web.Http.Results.UnauthorizedResult

An UnauthorizedResult with the specified values.

Return to top
Show: