Browse Source

[Authentication] Added log for token validation error

develop
Robin Thoni 9 years ago
parent
commit
7401309398

+ 20
- 0
Authentication/Authentication.csproj View File

30
     <WarningLevel>4</WarningLevel>
30
     <WarningLevel>4</WarningLevel>
31
   </PropertyGroup>
31
   </PropertyGroup>
32
   <ItemGroup>
32
   <ItemGroup>
33
+    <Reference Include="Logs, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
34
+      <HintPath>..\packages\Logs.dll.1.2.5\lib\net45\Logs.dll</HintPath>
35
+      <Private>True</Private>
36
+    </Reference>
37
+    <Reference Include="Microsoft.Practices.EnterpriseLibrary.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
38
+      <HintPath>..\packages\EnterpriseLibrary.Common.6.0.1304.0\lib\NET45\Microsoft.Practices.EnterpriseLibrary.Common.dll</HintPath>
39
+      <Private>True</Private>
40
+    </Reference>
41
+    <Reference Include="Microsoft.Practices.EnterpriseLibrary.Data, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
42
+      <HintPath>..\packages\EnterpriseLibrary.Data.6.0.1304.0\lib\NET45\Microsoft.Practices.EnterpriseLibrary.Data.dll</HintPath>
43
+      <Private>True</Private>
44
+    </Reference>
45
+    <Reference Include="Microsoft.Practices.EnterpriseLibrary.Logging, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
46
+      <HintPath>..\packages\EnterpriseLibrary.Logging.6.0.1304.0\lib\NET45\Microsoft.Practices.EnterpriseLibrary.Logging.dll</HintPath>
47
+      <Private>True</Private>
48
+    </Reference>
49
+    <Reference Include="Microsoft.Practices.EnterpriseLibrary.Logging.Database, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
50
+      <HintPath>..\packages\EnterpriseLibrary.Logging.Database.6.0.1304.0\lib\NET45\Microsoft.Practices.EnterpriseLibrary.Logging.Database.dll</HintPath>
51
+      <Private>True</Private>
52
+    </Reference>
33
     <Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
53
     <Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
34
       <SpecificVersion>False</SpecificVersion>
54
       <SpecificVersion>False</SpecificVersion>
35
       <HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
55
       <HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>

+ 3
- 0
Authentication/Business/JWT/TokenValidationHandler.cs View File

9
 using System.Threading;
9
 using System.Threading;
10
 using System.Threading.Tasks;
10
 using System.Threading.Tasks;
11
 using iiie.Authentication.DBO;
11
 using iiie.Authentication.DBO;
12
+using iiie.Logs.DataAccess;
13
+using iiie.Logs.DBO;
12
 
14
 
13
 namespace iiie.Authentication.Business.JWT
15
 namespace iiie.Authentication.Business.JWT
14
 {
16
 {
102
             }
104
             }
103
             catch (Exception e)
105
             catch (Exception e)
104
             {
106
             {
107
+                OpResult<bool>.Error(ResultStatus.LoginError, e).Log();
105
                 statusCode = HttpStatusCode.Unauthorized;
108
                 statusCode = HttpStatusCode.Unauthorized;
106
             }
109
             }
107
             return Task<HttpResponseMessage>.Factory.StartNew(() =>
110
             return Task<HttpResponseMessage>.Factory.StartNew(() =>

+ 5
- 0
Authentication/packages.config View File

1
 <?xml version="1.0" encoding="utf-8"?>
1
 <?xml version="1.0" encoding="utf-8"?>
2
 <packages>
2
 <packages>
3
+  <package id="EnterpriseLibrary.Common" version="6.0.1304.0" targetFramework="net45" />
4
+  <package id="EnterpriseLibrary.Data" version="6.0.1304.0" targetFramework="net45" />
5
+  <package id="EnterpriseLibrary.Logging" version="6.0.1304.0" targetFramework="net45" />
6
+  <package id="EnterpriseLibrary.Logging.Database" version="6.0.1304.0" targetFramework="net45" />
7
+  <package id="Logs.dll" version="1.2.5" targetFramework="net45" />
3
   <package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" />
8
   <package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" />
4
   <package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" />
9
   <package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" />
5
   <package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
10
   <package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />

Loading…
Cancel
Save