// <copyright file="WebSocketAuthenticationMiddlewareExtensions.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>

namespace Jellyfin.Api.Middleware;

using Microsoft.AspNetCore.Builder;

/// <summary>
/// Extension methods for adding WebSocket authentication to the pipeline.
/// </summary>
public static class WebSocketAuthenticationMiddlewareExtensions
{
    /// <summary>
    /// Adds WebSocket authentication to the application pipeline.
    /// </summary>
    /// <param name="appBuilder">The application builder.</param>
    /// <returns>The updated application builder.</returns>
    public static IApplicationBuilder UseWebSocketAuthentication(this IApplicationBuilder appBuilder)
    {
        return appBuilder.UseMiddleware<WebSocketAuthenticationMiddleware>();
    }
}
