diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-09-25 22:31:13 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-09-25 22:31:13 -0400 |
| commit | ebc95ffb9af1d8fabe94c2686af8e816018e34ef (patch) | |
| tree | 643fefb89fc04b62bdec0f278464c7d1a01698c5 /MediaBrowser.Server.Implementations/Session/SessionManager.cs | |
| parent | c31aab2d642cbcee7061e0cf385083a2ee6aa23e (diff) | |
update access denied exceptions
Diffstat (limited to 'MediaBrowser.Server.Implementations/Session/SessionManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Session/SessionManager.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs index d9c3ed7a6..d164874dc 100644 --- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs +++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs @@ -29,6 +29,7 @@ using System.Globalization; using System.Linq; using System.Threading; using System.Threading.Tasks; +using MediaBrowser.Controller.Net; namespace MediaBrowser.Server.Implementations.Session { @@ -1276,7 +1277,7 @@ namespace MediaBrowser.Server.Implementations.Session { if (!_deviceManager.CanAccessDevice(user.Id.ToString("N"), request.DeviceId)) { - throw new UnauthorizedAccessException("User is not allowed access from this device."); + throw new SecurityException("User is not allowed access from this device."); } } @@ -1286,7 +1287,7 @@ namespace MediaBrowser.Server.Implementations.Session { EventHelper.FireEventIfNotNull(AuthenticationFailed, this, new GenericEventArgs<AuthenticationRequest>(request), _logger); - throw new UnauthorizedAccessException("Invalid user or password entered."); + throw new SecurityException("Invalid user or password entered."); } var token = await GetAuthorizationToken(user.Id.ToString("N"), request.DeviceId, request.App, request.AppVersion, request.DeviceName).ConfigureAwait(false); |
