diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-03-09 15:40:03 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-03-09 15:40:03 -0400 |
| commit | 1b46fb62c48c86e5f9aed9426a90702e2d392bb6 (patch) | |
| tree | 1920df519e2cb267c7040a8b2a400ee5c4e36b2a /MediaBrowser.Controller | |
| parent | 231f146c8c40ae90f3ab22352af8f01d903aa823 (diff) | |
fix session not found errors
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/Net/ISessionContext.cs | 11 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Session/ISessionManager.cs | 13 |
2 files changed, 18 insertions, 6 deletions
diff --git a/MediaBrowser.Controller/Net/ISessionContext.cs b/MediaBrowser.Controller/Net/ISessionContext.cs index be8d28acc6..167e178671 100644 --- a/MediaBrowser.Controller/Net/ISessionContext.cs +++ b/MediaBrowser.Controller/Net/ISessionContext.cs @@ -1,14 +1,15 @@ using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Session; +using System.Threading.Tasks; namespace MediaBrowser.Controller.Net { public interface ISessionContext { - SessionInfo GetSession(object requestContext); - User GetUser(object requestContext); - - SessionInfo GetSession(IServiceRequest requestContext); - User GetUser(IServiceRequest requestContext); + Task<SessionInfo> GetSession(object requestContext); + Task<User> GetUser(object requestContext); + + Task<SessionInfo> GetSession(IServiceRequest requestContext); + Task<User> GetUser(IServiceRequest requestContext); } } diff --git a/MediaBrowser.Controller/Session/ISessionManager.cs b/MediaBrowser.Controller/Session/ISessionManager.cs index b51b590cf7..234a823460 100644 --- a/MediaBrowser.Controller/Session/ISessionManager.cs +++ b/MediaBrowser.Controller/Session/ISessionManager.cs @@ -1,5 +1,6 @@ using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; +using MediaBrowser.Controller.Security; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Events; using MediaBrowser.Model.Session; @@ -282,8 +283,18 @@ namespace MediaBrowser.Controller.Session /// Gets the session by authentication token. /// </summary> /// <param name="token">The token.</param> + /// <param name="remoteEndpoint">The remote endpoint.</param> /// <returns>SessionInfo.</returns> - SessionInfo GetSessionByAuthenticationToken(string token); + Task<SessionInfo> GetSessionByAuthenticationToken(string token, string remoteEndpoint); + + /// <summary> + /// Gets the session by authentication token. + /// </summary> + /// <param name="info">The information.</param> + /// <param name="remoteEndpoint">The remote endpoint.</param> + /// <param name="appVersion">The application version.</param> + /// <returns>Task<SessionInfo>.</returns> + Task<SessionInfo> GetSessionByAuthenticationToken(AuthenticationInfo info, string remoteEndpoint, string appVersion); /// <summary> /// Logouts the specified access token. |
