diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-07-11 22:31:08 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-07-11 22:31:08 -0400 |
| commit | b5641013cea8542d3a992fb11811347e761a1f50 (patch) | |
| tree | edf14d9448f57e7e567668b6b1915844d9c5de58 /MediaBrowser.Server.Implementations/Session/SessionManager.cs | |
| parent | 59de5c0d14fbf0c09926e37dce0c2e6de69000dd (diff) | |
Add api key functions
Diffstat (limited to 'MediaBrowser.Server.Implementations/Session/SessionManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Session/SessionManager.cs | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs index 338bf8959..1d1910e40 100644 --- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs +++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs @@ -1210,15 +1210,15 @@ namespace MediaBrowser.Server.Implementations.Session /// <returns>Task{SessionInfo}.</returns> /// <exception cref="System.UnauthorizedAccessException">Invalid user or password entered.</exception> /// <exception cref="UnauthorizedAccessException"></exception> - public async Task<AuthenticationResult> AuthenticateNewSession(string username, - string password, - string clientType, - string appVersion, - string deviceId, - string deviceName, + public async Task<AuthenticationResult> AuthenticateNewSession(string username, + string password, + string clientType, + string appVersion, + string deviceId, + string deviceName, string remoteEndPoint) { - var result = (IsLocalhost(remoteEndPoint) && string.Equals(clientType, "Dashboard", StringComparison.OrdinalIgnoreCase)) || + var result = (IsLocalhost(remoteEndPoint) && string.Equals(clientType, "Dashboard", StringComparison.OrdinalIgnoreCase)) || await _userManager.AuthenticateUser(username, password).ConfigureAwait(false); if (!result) @@ -1332,6 +1332,11 @@ namespace MediaBrowser.Server.Implementations.Session } } + public Task RevokeToken(string token) + { + return Logout(token); + } + private bool IsLocalhost(string remoteEndpoint) { if (string.IsNullOrWhiteSpace(remoteEndpoint)) |
