浏览代码

Use SecurityException for auth failure

Joshua M. Boniface 6 年之前
父节点
当前提交
20e2cb2d86
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Emby.Server.Implementations/Library/InvalidAuthProvider.cs

+ 2 - 1
Emby.Server.Implementations/Library/InvalidAuthProvider.cs

@@ -4,6 +4,7 @@ using System.Text;
 using System.Threading.Tasks;
 using System.Threading.Tasks;
 using MediaBrowser.Controller.Authentication;
 using MediaBrowser.Controller.Authentication;
 using MediaBrowser.Controller.Entities;
 using MediaBrowser.Controller.Entities;
+using MediaBrowser.Controller.Net;
 
 
 namespace Emby.Server.Implementations.Library
 namespace Emby.Server.Implementations.Library
 {
 {
@@ -15,7 +16,7 @@ namespace Emby.Server.Implementations.Library
 
 
         public Task<ProviderAuthenticationResult> Authenticate(string username, string password)
         public Task<ProviderAuthenticationResult> Authenticate(string username, string password)
         {
         {
-            throw new Exception("User Account cannot login with this provider. The Normal provider for this user cannot be found");
+            throw new SecurityException("User Account cannot login with this provider. The Normal provider for this user cannot be found");
         }
         }
 
 
         public Task<bool> HasPassword(User user)
         public Task<bool> HasPassword(User user)