2021-05-20 20:56:59 -07:00
|
|
|
using System.Threading.Tasks;
|
2020-06-20 09:02:03 -07:00
|
|
|
using Microsoft.AspNetCore.Http;
|
2018-12-27 16:27:57 -07:00
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Net
|
|
|
|
{
|
2020-06-20 09:02:03 -07:00
|
|
|
/// <summary>
|
|
|
|
/// IAuthorization context.
|
|
|
|
/// </summary>
|
2018-12-27 16:27:57 -07:00
|
|
|
public interface IAuthorizationContext
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the authorization information.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="requestContext">The request context.</param>
|
2021-05-20 20:56:59 -07:00
|
|
|
/// <returns>A task containing the authorization info.</returns>
|
|
|
|
Task<AuthorizationInfo> GetAuthorizationInfo(HttpContext requestContext);
|
2020-06-20 09:02:03 -07:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the authorization information.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="requestContext">The request context.</param>
|
2021-05-20 20:56:59 -07:00
|
|
|
/// <returns>A <see cref="Task"/> containing the authorization info.</returns>
|
|
|
|
Task<AuthorizationInfo> GetAuthorizationInfo(HttpRequest requestContext);
|
2018-12-27 16:27:57 -07:00
|
|
|
}
|
|
|
|
}
|