Table of Contents

Class MsalAuthenticationProviderDelegatingHandler

Namespace
OneImlx.Terminal.Authentication.Msal
Assembly
OneImlx.Terminal.Authentication.dll

Delegating handler that authenticates an HTTP request using an Microsoft.Kiota.Abstractions.Authentication.IAuthenticationProvider.

public class MsalAuthenticationProviderDelegatingHandler : DelegatingHandler, IDisposable
Inheritance
MsalAuthenticationProviderDelegatingHandler
Implements
Inherited Members

Constructors

MsalAuthenticationProviderDelegatingHandler(IAuthenticationProvider, ILogger<MsalAuthenticationProviderDelegatingHandler>)

Initializes a new instance of the MsalAuthenticationProviderDelegatingHandler class.

public MsalAuthenticationProviderDelegatingHandler(IAuthenticationProvider authenticationProvider, ILogger<MsalAuthenticationProviderDelegatingHandler> logger)

Parameters

authenticationProvider IAuthenticationProvider

The authentication provider.

logger ILogger<MsalAuthenticationProviderDelegatingHandler>

Methods

PreflightAsync(HttpRequestMessage, CancellationToken)

Performs preflight processing on the HTTP request message.

protected virtual Task PreflightAsync(HttpRequestMessage request, CancellationToken cancellationToken)

Parameters

request HttpRequestMessage

The HTTP request message to be processed.

cancellationToken CancellationToken

A cancellation token to cancel the operation.

Returns

Task

Remarks

This method can be overridden in a derived class to perform custom pre-processing on the request before it is sent. The default implementation does nothing.

SendAsync(HttpRequestMessage, CancellationToken)

Sends an HTTP request to the inner handler to send to the server as an asynchronous operation.

protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)

Parameters

request HttpRequestMessage

The HTTP request message to send to the server.

cancellationToken CancellationToken

A cancellation token to cancel the operation.

Returns

Task<HttpResponseMessage>

A Task<TResult> that represents the asynchronous operation.