jellyfin/MediaBrowser.Controller/Net/IAuthService.cs

37 lines
1.2 KiB
C#
Raw Normal View History

#nullable enable
2020-05-20 17:07:53 +00:00
using Jellyfin.Data.Entities;
using MediaBrowser.Model.Services;
using Microsoft.AspNetCore.Http;
2018-12-27 23:27:57 +00:00
namespace MediaBrowser.Controller.Net
{
/// <summary>
/// IAuthService.
/// </summary>
2018-12-27 23:27:57 +00:00
public interface IAuthService
{
/// <summary>
/// Authenticate and authorize request.
/// </summary>
/// <param name="request">Request.</param>
/// <param name="authAttribtutes">Authorization attributes.</param>
void Authenticate(IRequest request, IAuthenticationAttributes authAttribtutes);
2020-05-20 17:07:53 +00:00
/// <summary>
/// Authenticate and authorize request.
/// </summary>
/// <param name="request">Request.</param>
/// <param name="authAttribtutes">Authorization attributes.</param>
/// <returns>Authenticated user.</returns>
User? Authenticate(HttpRequest request, IAuthenticationAttributes authAttribtutes);
/// <summary>
/// Authenticate request.
/// </summary>
/// <param name="request">The request.</param>
/// <returns>Authorization information. Null if unauthenticated.</returns>
AuthorizationInfo Authenticate(HttpRequest request);
2018-12-27 23:27:57 +00:00
}
}