/*
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
* See https://github.com/openiddict/openiddict-core for more information concerning
* the license and the contributors participating to this project.
*/
using OpenIddict.Validation;
namespace System.Net.Http;
///
/// Exposes companion extensions for the OpenIddict/System.Net.Http integration.
///
public static class OpenIddictValidationSystemNetHttpHelpers
{
///
/// Gets the associated with the current context.
///
/// The transaction instance.
/// The instance or if it couldn't be found.
public static HttpClient? GetHttpClient(this OpenIddictValidationTransaction transaction)
=> transaction.GetProperty(typeof(HttpClient).FullName!);
///
/// Gets the associated with the current context.
///
/// The transaction instance.
/// The instance or if it couldn't be found.
public static HttpRequestMessage? GetHttpRequestMessage(this OpenIddictValidationTransaction transaction)
=> transaction.GetProperty(typeof(HttpRequestMessage).FullName!);
///
/// Gets the associated with the current context.
///
/// The transaction instance.
/// The instance or if it couldn't be found.
public static HttpResponseMessage? GetHttpResponseMessage(this OpenIddictValidationTransaction transaction)
=> transaction.GetProperty(typeof(HttpResponseMessage).FullName!);
}