aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Net/IAuthorizationContext.cs
blob: 5c6ca43d1eb34090781884f76d250978943abe64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;

namespace MediaBrowser.Controller.Net
{
    /// <summary>
    /// IAuthorization context.
    /// </summary>
    public interface IAuthorizationContext
    {
        /// <summary>
        /// Gets the authorization information.
        /// </summary>
        /// <param name="requestContext">The request context.</param>
        /// <returns>A task containing the authorization info.</returns>
        Task<AuthorizationInfo> GetAuthorizationInfo(HttpContext requestContext);

        /// <summary>
        /// Gets the authorization information.
        /// </summary>
        /// <param name="requestContext">The request context.</param>
        /// <returns>A <see cref="Task"/> containing the authorization info.</returns>
        Task<AuthorizationInfo> GetAuthorizationInfo(HttpRequest requestContext);
    }
}