Skip to main content

Definition

Assembly: Microsoft.Restier.AspNetCore.dll Namespace: Microsoft.Restier.AspNetCore.Middleware Inheritance: System.Object

Syntax

Microsoft.Restier.AspNetCore.Middleware.RestierClaimsPrincipalMiddleware

Summary

Fixes the issue outlined in https://github.com/OData/WebApi/issues/2294

Remarks

Solution adapted from https://stackoverflow.com/questions/71338662/ihttpcontextaccessor-httpcontext-is-null-after-execution-falls-out-of-the-useoda

Constructors

.ctor

The default constructor for the middleware.

Syntax

public RestierClaimsPrincipalMiddleware(Microsoft.AspNetCore.Http.RequestDelegate requestDelegate)

Parameters

NameTypeDescription
requestDelegateMicrosoft.AspNetCore.Http.RequestDelegate-

.ctor Inherited

Inherited from object

Syntax

public Object()

Methods

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

InvokeAsync

Syntax

public System.Threading.Tasks.Task InvokeAsync(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Http.IHttpContextAccessor contextAccessor)

Parameters

NameTypeDescription
httpContextMicrosoft.AspNetCore.Http.HttpContext-
contextAccessorMicrosoft.AspNetCore.Http.IHttpContextAccessorThe IHttpContextAccessor injected from DI for the current request,

Returns

Type: System.Threading.Tasks.Task

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?