Skip to content

Commit

Permalink
v11.2.10474
Browse files Browse the repository at this point in the history
  • Loading branch information
ITHitBuild committed Aug 2, 2021
1 parent e15a266 commit e8816d2
Show file tree
Hide file tree
Showing 105 changed files with 561 additions and 398 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public async Task Invoke(HttpContext context)
if(IsAuthorizationPresent(context.Request))
{
ClaimsPrincipal userPrincipal = AuthenticateRequest(context.Request);
if (userPrincipal.Identity != null)
if (userPrincipal.Identity != null && !string.IsNullOrEmpty(userPrincipal.Identity.Name))
{
// Authenticated succesfully.
context.User = userPrincipal;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<VersionPrefix>11.2.10451</VersionPrefix>
<VersionPrefix>11.2.10474</VersionPrefix>
<AssemblyName>CalDAVServer.FileSystemStorage.AspNetCore</AssemblyName>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>8.0</LangVersion>
Expand All @@ -19,10 +19,10 @@
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.Server" Version="11.2.10451" />
<PackageReference Include="ITHit.Server.Core" Version="11.2.10451" />
<PackageReference Include="ITHit.WebDAV.Server" Version="11.2.10451" />
<PackageReference Include="ITHit.GSuite.Server" Version="11.2.10451" />
<PackageReference Include="ITHit.Server" Version="11.2.10474" />
<PackageReference Include="ITHit.Server.Core" Version="11.2.10474" />
<PackageReference Include="ITHit.WebDAV.Server" Version="11.2.10474" />
<PackageReference Include="ITHit.GSuite.Server" Version="11.2.10474" />
<PackageReference Include="System.Data.OleDb" Version="4.7.0" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@ public class GSuiteEngineConfig : DavEngineConfig
/// </summary>
public string GoogleServicePrivateKey { get; set; }

/// <summary>
/// Relative Url of "Webhook" callback. It handles the API notification messages that are triggered when a resource changes.
/// </summary>
public string GoogleNotificationsRelativeUrl { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public class GSuiteEngineCore : GSuiteEngineAsync
/// <param name="gSuiteConf">GSuite Engine configuration.</param>
/// <param name="logger">Logger instance.</param>
public GSuiteEngineCore(IOptions<GSuiteEngineConfig> gSuiteConf,
ILogger logger) : base(gSuiteConf.Value.GoogleServiceAccountID, gSuiteConf.Value.GoogleServicePrivateKey)
ILogger logger) : base(gSuiteConf.Value.GoogleServiceAccountID, gSuiteConf.Value.GoogleServicePrivateKey,
gSuiteConf.Value.GoogleNotificationsRelativeUrl)
{
GSuiteEngineConfig config = gSuiteConf.Value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@
"GoogleServiceAccountID": "",

// Google Service private key (private_key field from JSON file).
"GoogleServicePrivateKey": ""
"GoogleServicePrivateKey": "",

// Relative Url of "Webhook" callback. It handles the API notification messages that are triggered when a resource changes.
"GoogleNotificationsRelativeUrl": "/GNotifications"
},

// WebDAV and G Suite Context configuration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public async Task Invoke(HttpContext context)
if(IsAuthorizationPresent(context.Request))
{
ClaimsPrincipal userPrincipal = AuthenticateRequest(context.Request);
if (userPrincipal.Identity != null)
if (userPrincipal.Identity != null && !string.IsNullOrEmpty(userPrincipal.Identity.Name))
{
// Authenticated succesfully.
context.User = userPrincipal;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<VersionPrefix>11.2.10451</VersionPrefix>
<VersionPrefix>11.2.10474</VersionPrefix>
<AssemblyName>CalDAVServer.SqlStorage.AspNetCore</AssemblyName>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>8.0</LangVersion>
Expand All @@ -22,10 +22,10 @@
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.Server" Version="11.2.10451" />
<PackageReference Include="ITHit.Server.Core" Version="11.2.10451" />
<PackageReference Include="ITHit.WebDAV.Server" Version="11.2.10451" />
<PackageReference Include="ITHit.GSuite.Server" Version="11.2.10451" />
<PackageReference Include="ITHit.Server" Version="11.2.10474" />
<PackageReference Include="ITHit.Server.Core" Version="11.2.10474" />
<PackageReference Include="ITHit.WebDAV.Server" Version="11.2.10474" />
<PackageReference Include="ITHit.GSuite.Server" Version="11.2.10474" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.1" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@ public class GSuiteEngineConfig : DavEngineConfig
/// </summary>
public string GoogleServicePrivateKey { get; set; }

/// <summary>
/// Relative Url of "Webhook" callback. It handles the API notification messages that are triggered when a resource changes.
/// </summary>
public string GoogleNotificationsRelativeUrl { get; set; }

}
}
3 changes: 2 additions & 1 deletion CS/CalDAVServer.SqlStorage.AspNetCore/GSuiteEngineCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public class GSuiteEngineCore : GSuiteEngineAsync
/// <param name="gSuiteConf">GSuite Engine configuration.</param>
/// <param name="logger">Logger instance.</param>
public GSuiteEngineCore(IOptions<GSuiteEngineConfig> gSuiteConf,
ILogger logger) : base(gSuiteConf.Value.GoogleServiceAccountID, gSuiteConf.Value.GoogleServicePrivateKey)
ILogger logger) : base(gSuiteConf.Value.GoogleServiceAccountID, gSuiteConf.Value.GoogleServicePrivateKey,
gSuiteConf.Value.GoogleNotificationsRelativeUrl)
{
GSuiteEngineConfig config = gSuiteConf.Value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@
"GoogleServiceAccountID": "",

// Google Service private key (private_key field from JSON file).
"GoogleServicePrivateKey": ""
"GoogleServicePrivateKey": "",

// Relative Url of "Webhook" callback. It handles the API notification messages that are triggered when a resource changes.
"GoogleNotificationsRelativeUrl": "/GNotifications"
},

// WebDAV and G Suite Context configuration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public async Task Invoke(HttpContext context)
if(IsAuthorizationPresent(context.Request))
{
ClaimsPrincipal userPrincipal = AuthenticateRequest(context.Request);
if (userPrincipal.Identity != null)
if (userPrincipal.Identity != null && !string.IsNullOrEmpty(userPrincipal.Identity.Name))
{
// Authenticated succesfully.
context.User = userPrincipal;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<VersionPrefix>11.2.10451</VersionPrefix>
<VersionPrefix>11.2.10474</VersionPrefix>
<AssemblyName>CardDAVServer.FileSystemStorage.AspNetCore</AssemblyName>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>8.0</LangVersion>
Expand All @@ -19,10 +19,10 @@
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.Server" Version="11.2.10451" />
<PackageReference Include="ITHit.Server.Core" Version="11.2.10451" />
<PackageReference Include="ITHit.WebDAV.Server" Version="11.2.10451" />
<PackageReference Include="ITHit.GSuite.Server" Version="11.2.10451" />
<PackageReference Include="ITHit.Server" Version="11.2.10474" />
<PackageReference Include="ITHit.Server.Core" Version="11.2.10474" />
<PackageReference Include="ITHit.WebDAV.Server" Version="11.2.10474" />
<PackageReference Include="ITHit.GSuite.Server" Version="11.2.10474" />
<PackageReference Include="System.Data.OleDb" Version="4.7.0" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@ public class GSuiteEngineConfig : DavEngineConfig
/// </summary>
public string GoogleServicePrivateKey { get; set; }

/// <summary>
/// Relative Url of "Webhook" callback. It handles the API notification messages that are triggered when a resource changes.
/// </summary>
public string GoogleNotificationsRelativeUrl { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public class GSuiteEngineCore : GSuiteEngineAsync
/// <param name="gSuiteConf">GSuite Engine configuration.</param>
/// <param name="logger">Logger instance.</param>
public GSuiteEngineCore(IOptions<GSuiteEngineConfig> gSuiteConf,
ILogger logger) : base(gSuiteConf.Value.GoogleServiceAccountID, gSuiteConf.Value.GoogleServicePrivateKey)
ILogger logger) : base(gSuiteConf.Value.GoogleServiceAccountID, gSuiteConf.Value.GoogleServicePrivateKey,
gSuiteConf.Value.GoogleNotificationsRelativeUrl)
{
GSuiteEngineConfig config = gSuiteConf.Value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@
"GoogleServiceAccountID": "",

// Google Service private key (private_key field from JSON file).
"GoogleServicePrivateKey": ""
"GoogleServicePrivateKey": "",

// Relative Url of "Webhook" callback. It handles the API notification messages that are triggered when a resource changes.
"GoogleNotificationsRelativeUrl": "/GNotifications"
},

// WebDAV and G Suite Context configuration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public async Task Invoke(HttpContext context)
if(IsAuthorizationPresent(context.Request))
{
ClaimsPrincipal userPrincipal = AuthenticateRequest(context.Request);
if (userPrincipal.Identity != null)
if (userPrincipal.Identity != null && !string.IsNullOrEmpty(userPrincipal.Identity.Name))
{
// Authenticated succesfully.
context.User = userPrincipal;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<VersionPrefix>11.2.10451</VersionPrefix>
<VersionPrefix>11.2.10474</VersionPrefix>
<AssemblyName>CardDAVServer.SqlStorage.AspNetCore</AssemblyName>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>8.0</LangVersion>
Expand All @@ -22,10 +22,10 @@
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.Server" Version="11.2.10451" />
<PackageReference Include="ITHit.Server.Core" Version="11.2.10451" />
<PackageReference Include="ITHit.WebDAV.Server" Version="11.2.10451" />
<PackageReference Include="ITHit.GSuite.Server" Version="11.2.10451" />
<PackageReference Include="ITHit.Server" Version="11.2.10474" />
<PackageReference Include="ITHit.Server.Core" Version="11.2.10474" />
<PackageReference Include="ITHit.WebDAV.Server" Version="11.2.10474" />
<PackageReference Include="ITHit.GSuite.Server" Version="11.2.10474" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.1" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@ public class GSuiteEngineConfig : DavEngineConfig
/// </summary>
public string GoogleServicePrivateKey { get; set; }

/// <summary>
/// Relative Url of "Webhook" callback. It handles the API notification messages that are triggered when a resource changes.
/// </summary>
public string GoogleNotificationsRelativeUrl { get; set; }

}
}
3 changes: 2 additions & 1 deletion CS/CardDAVServer.SqlStorage.AspNetCore/GSuiteEngineCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public class GSuiteEngineCore : GSuiteEngineAsync
/// <param name="gSuiteConf">GSuite Engine configuration.</param>
/// <param name="logger">Logger instance.</param>
public GSuiteEngineCore(IOptions<GSuiteEngineConfig> gSuiteConf,
ILogger logger) : base(gSuiteConf.Value.GoogleServiceAccountID, gSuiteConf.Value.GoogleServicePrivateKey)
ILogger logger) : base(gSuiteConf.Value.GoogleServiceAccountID, gSuiteConf.Value.GoogleServicePrivateKey,
gSuiteConf.Value.GoogleNotificationsRelativeUrl)
{
GSuiteEngineConfig config = gSuiteConf.Value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@
"GoogleServiceAccountID": "",

// Google Service private key (private_key field from JSON file).
"GoogleServicePrivateKey": ""
"GoogleServicePrivateKey": "",

// Relative Url of "Webhook" callback. It handles the API notification messages that are triggered when a resource changes.
"GoogleNotificationsRelativeUrl": "/GNotifications"
},

// WebDAV and G Suite Context configuration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
<BundleAssemblies>false</BundleAssemblies>
</PropertyGroup>
<ItemGroup>
<Reference Include="ITHit.WebDAV.Server, Version=11.2.10451, Culture=neutral, PublicKeyToken=d057f7b1134051b5, processorArchitecture=MSIL">
<HintPath>..\packages\ITHit.WebDAV.Server.11.2.10451\lib\netstandard1.6\ITHit.WebDAV.Server.dll</HintPath>
<Reference Include="ITHit.WebDAV.Server, Version=11.2.10474, Culture=neutral, PublicKeyToken=d057f7b1134051b5, processorArchitecture=MSIL">
<HintPath>..\packages\ITHit.WebDAV.Server.11.2.10474\lib\netstandard1.6\ITHit.WebDAV.Server.dll</HintPath>
</Reference>
<Reference Include="ITHit.WebDAV.Server.HttpListener, Version=11.2.10451, Culture=neutral, PublicKeyToken=d057f7b1134051b5, processorArchitecture=MSIL">
<HintPath>..\packages\ITHit.WebDAV.Server.HttpListener.11.2.10451\lib\netstandard2.0\ITHit.WebDAV.Server.HttpListener.dll</HintPath>
<Reference Include="ITHit.WebDAV.Server.HttpListener, Version=11.2.10474, Culture=neutral, PublicKeyToken=d057f7b1134051b5, processorArchitecture=MSIL">
<HintPath>..\packages\ITHit.WebDAV.Server.HttpListener.11.2.10474\lib\netstandard2.0\ITHit.WebDAV.Server.HttpListener.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNetCore.Hosting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNetCore.Hosting.2.0.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.dll</HintPath>
Expand Down
4 changes: 2 additions & 2 deletions CS/HttpListener/HttpListener.Android/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ITHit.WebDAV.Server" version="11.2.10451" targetFramework="monoandroid60" />
<package id="ITHit.WebDAV.Server.HttpListener" version="11.2.10451" targetFramework="monoandroid60" />
<package id="ITHit.WebDAV.Server" version="11.2.10474" targetFramework="monoandroid60" />
<package id="ITHit.WebDAV.Server.HttpListener" version="11.2.10474" targetFramework="monoandroid60" />
<package id="Microsoft.AspNetCore.Hosting" version="2.0.0" targetFramework="monoandroid71" />
<package id="Microsoft.AspNetCore.Hosting.Abstractions" version="2.0.0" targetFramework="monoandroid71" />
<package id="Microsoft.AspNetCore.Hosting.Server.Abstractions" version="2.0.0" targetFramework="monoandroid71" />
Expand Down
8 changes: 4 additions & 4 deletions CS/HttpListener/HttpListener.iOS/HttpListener.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@
</InterfaceDefinition>
</ItemGroup>
<ItemGroup>
<Reference Include="ITHit.WebDAV.Server, Version=11.2.10451, Culture=neutral, PublicKeyToken=d057f7b1134051b5, processorArchitecture=MSIL">
<HintPath>..\packages\ITHit.WebDAV.Server.11.2.10451\lib\netstandard1.6\ITHit.WebDAV.Server.dll</HintPath>
<Reference Include="ITHit.WebDAV.Server, Version=11.2.10474, Culture=neutral, PublicKeyToken=d057f7b1134051b5, processorArchitecture=MSIL">
<HintPath>..\packages\ITHit.WebDAV.Server.11.2.10474\lib\netstandard1.6\ITHit.WebDAV.Server.dll</HintPath>
</Reference>
<Reference Include="ITHit.WebDAV.Server.HttpListener, Version=11.2.10451, Culture=neutral, PublicKeyToken=d057f7b1134051b5, processorArchitecture=MSIL">
<HintPath>..\packages\ITHit.WebDAV.Server.HttpListener.11.2.10451\lib\netstandard2.0\ITHit.WebDAV.Server.HttpListener.dll</HintPath>
<Reference Include="ITHit.WebDAV.Server.HttpListener, Version=11.2.10474, Culture=neutral, PublicKeyToken=d057f7b1134051b5, processorArchitecture=MSIL">
<HintPath>..\packages\ITHit.WebDAV.Server.HttpListener.11.2.10474\lib\netstandard2.0\ITHit.WebDAV.Server.HttpListener.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNetCore.Hosting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNetCore.Hosting.2.0.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.dll</HintPath>
Expand Down
4 changes: 2 additions & 2 deletions CS/HttpListener/HttpListener.iOS/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ITHit.WebDAV.Server" version="11.2.10451" targetFramework="xamarinios10" />
<package id="ITHit.WebDAV.Server.HttpListener" version="11.2.10451" targetFramework="xamarinios10" />
<package id="ITHit.WebDAV.Server" version="11.2.10474" targetFramework="xamarinios10" />
<package id="ITHit.WebDAV.Server.HttpListener" version="11.2.10474" targetFramework="xamarinios10" />
<package id="Microsoft.AspNetCore.Hosting" version="2.0.0" targetFramework="xamarinios10" />
<package id="Microsoft.AspNetCore.Hosting.Abstractions" version="2.0.0" targetFramework="xamarinios10" />
<package id="Microsoft.AspNetCore.Hosting.Server.Abstractions" version="2.0.0" targetFramework="xamarinios10" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ITHit.WebDAV.Server.HttpListener" Version="11.2.10451" />
<PackageReference Include="ITHit.WebDAV.Server.HttpListener" Version="11.2.10474" />
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="2.0.0" />
Expand Down
2 changes: 1 addition & 1 deletion CS/HttpListener/SharedMobile/SharedMobile.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ITHit.WebDAV.Server" Version="11.2.10451" />
<PackageReference Include="ITHit.WebDAV.Server" Version="11.2.10474" />
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
</ItemGroup>
Expand Down
7 changes: 6 additions & 1 deletion CS/WebDAVServer.FileSystemStorage.AspNet/DavHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ public class DavHandler : HttpTaskAsyncHandler
/// </summary>
private static readonly string googleServicePrivateKey = ConfigurationManager.AppSettings["GoogleServicePrivateKey"];

/// <summary>
/// Relative Url of "Webhook" callback. It handles the API notification messages that are triggered when a resource changes.
/// </summary>
private static readonly string googleNotificationsRelativeUrl = ConfigurationManager.AppSettings["GoogleNotificationsRelativeUrl"];

/// <summary>
/// This license file is used to activate G Suite Documents Editing for IT Hit WebDAV Server
/// </summary>
Expand Down Expand Up @@ -150,7 +155,7 @@ private GSuiteEngineAsync getOrInitializeGSuiteEngine(HttpContext context)

if (context.Application[ENGINE_KEY] == null)
{
var gSuiteEngine = new GSuiteEngineAsync(googleServiceAccountID, googleServicePrivateKey)
var gSuiteEngine = new GSuiteEngineAsync(googleServiceAccountID, googleServicePrivateKey, googleNotificationsRelativeUrl)
{
License = gSuiteLicense,
Logger = WebDAVServer.FileSystemStorage.AspNet.Logger.Instance
Expand Down
Loading

0 comments on commit e8816d2

Please sign in to comment.