Language

UnauthorizedHttpResult Class

Definition

Represents an IResult that when executed will produce an HTTP response with the Unauthorized (401) status code.

public sealed class UnauthorizedHttpResult : Microsoft.AspNetCore.Http.IResult, Microsoft.AspNetCore.Http.IStatusCodeHttpResult
public sealed class UnauthorizedHttpResult : Microsoft.AspNetCore.Http.IResult, Microsoft.AspNetCore.Http.IStatusCodeHttpResult, Microsoft.AspNetCore.Http.Metadata.IEndpointMetadataProvider
type UnauthorizedHttpResult = class
    interface IResult
    interface IStatusCodeHttpResult
type UnauthorizedHttpResult = class
    interface IResult
    interface IEndpointMetadataProvider
    interface IStatusCodeHttpResult
Public NotInheritable Class UnauthorizedHttpResult
Implements IResult, IStatusCodeHttpResult
Public NotInheritable Class UnauthorizedHttpResult
Implements IEndpointMetadataProvider, IResult, IStatusCodeHttpResult
Inheritance
UnauthorizedHttpResult
Implements

Properties

Name Description
StatusCode

Gets the HTTP status code: Status401Unauthorized

Methods

Name Description
ExecuteAsync(HttpContext)

Write an HTTP response reflecting the result.

Explicit Interface Implementations

Name Description
IEndpointMetadataProvider.PopulateMetadata(MethodInfo, EndpointBuilder)

Populates metadata for the related Endpoint and MethodInfo.

IStatusCodeHttpResult.StatusCode

Applies to