Released windows auth, connect to ES.Services.

This commit is contained in:
ITRANSITION\e.revyakin 2014-12-03 11:43:26 +03:00
parent 2569e55609
commit d29c347ff4
294 changed files with 329583 additions and 2315 deletions

View file

@ -0,0 +1,19 @@
using System.Web.SessionState;
using Ninject;
using Ninject.Activation;
using WebsitePanel.WebDavPortal.Config;
using WebsitePanel.WebDavPortal.Models;
namespace WebsitePanel.WebDavPortal.DependencyInjection
{
public class AccountInfoProvider : Provider<AccountModel>
{
protected override AccountModel CreateInstance(IContext context)
{
var session = context.Kernel.Get<HttpSessionState>();
var accountInfo = session[WebDavAppConfigManager.Instance.SessionKeys.AccountInfo] as AccountModel;
return accountInfo;
}
}
}

View file

@ -0,0 +1,19 @@
using Ninject.Activation;
using WebsitePanel.WebDavPortal.Config;
using WebsitePanel.WebDavPortal.Cryptography;
namespace WebsitePanel.WebDavPortal.DependencyInjection
{
public class Rfc2898CryptographyProvider : Provider<Rfc2898Cryptography>
{
protected override Rfc2898Cryptography CreateInstance(IContext context)
{
var rfc2898Cryptography =
new Rfc2898Cryptography(WebDavAppConfigManager.Instance.Rfc2898CryptographyParameters.PasswordHash,
WebDavAppConfigManager.Instance.Rfc2898CryptographyParameters.SaltKey,
WebDavAppConfigManager.Instance.Rfc2898CryptographyParameters.VIKey);
return rfc2898Cryptography;
}
}
}

View file

@ -0,0 +1,19 @@
using System.Web;
using System.Web.SessionState;
using Ninject.Modules;
using WebsitePanel.WebDavPortal.Cryptography;
using WebsitePanel.WebDavPortal.Models;
namespace WebsitePanel.WebDavPortal.DependencyInjection
{
public class WebDavExplorerAppModule : NinjectModule
{
public override void Load()
{
Bind<HttpSessionState>().ToConstant(HttpContext.Current.Session);
Bind<IWebDavManager>().ToProvider<WebDavManagerProvider>();
Bind<AccountModel>().ToProvider<AccountInfoProvider>();
Bind<ICryptography>().ToProvider<Rfc2898CryptographyProvider>();
}
}
}

View file

@ -0,0 +1,19 @@
using System.Web.SessionState;
using Ninject;
using Ninject.Activation;
using WebsitePanel.WebDavPortal.Config;
using WebsitePanel.WebDavPortal.Models;
namespace WebsitePanel.WebDavPortal.DependencyInjection
{
public class WebDavManagerProvider : Provider<WebDavManager>
{
protected override WebDavManager CreateInstance(IContext context)
{
var session = context.Kernel.Get<HttpSessionState>();
var webDavManager = session[WebDavAppConfigManager.Instance.SessionKeys.WebDavManager] as WebDavManager;
return webDavManager;
}
}
}