UserInfoContextMiddleware Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the UserInfoContextMiddleware class.
public UserInfoContextMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Func<Microsoft.AspNetCore.Http.HttpContext,System.Threading.Tasks.Task<Azure.AI.AgentServer.Core.Tools.Models.UserInfo?>>? userResolver = default);
new Azure.AI.AgentServer.Core.Server.Middleware.UserInfoContextMiddleware : Microsoft.AspNetCore.Http.RequestDelegate * Func<Microsoft.AspNetCore.Http.HttpContext, System.Threading.Tasks.Task<Azure.AI.AgentServer.Core.Tools.Models.UserInfo>> -> Azure.AI.AgentServer.Core.Server.Middleware.UserInfoContextMiddleware
Public Sub New (next As RequestDelegate, Optional userResolver As Func(Of HttpContext, Task(Of UserInfo)) = Nothing)
Parameters
- next
- RequestDelegate
The next middleware in the pipeline.
- userResolver
- Func<HttpContext,Task<UserInfo>>
Optional custom user resolver function. If not provided, uses the default header-based resolver that extracts user info from x-aml-oid and x-aml-tid headers.