Thirdparty: Fix Token can't be null on WebDav (login/password issue)
This commit is contained in:
parent
ca819a930c
commit
56997c5cb8
@ -1225,7 +1225,7 @@ namespace ASC.Web.Files.Services.WCFService
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
throw GenerateException(e);
|
throw GenerateException(e.InnerException ?? e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -368,6 +368,8 @@ namespace ASC.Files.Thirdparty
|
|||||||
Id = id,
|
Id = id,
|
||||||
Title = customerTitle,
|
Title = customerTitle,
|
||||||
Token = EncryptPassword(authData.Token),
|
Token = EncryptPassword(authData.Token),
|
||||||
|
Url = authData.Url,
|
||||||
|
UserName = authData.Login,
|
||||||
Password = EncryptPassword(authData.Password),
|
Password = EncryptPassword(authData.Password),
|
||||||
UserId = owner,
|
UserId = owner,
|
||||||
FolderType = type,
|
FolderType = type,
|
||||||
@ -390,10 +392,11 @@ namespace ASC.Files.Thirdparty
|
|||||||
var createOn = TenantUtil.DateTimeFromUtc(input.CreateOn);
|
var createOn = TenantUtil.DateTimeFromUtc(input.CreateOn);
|
||||||
var authData = new AuthData(input.Url, input.UserName, DecryptPassword(input.Password), token);
|
var authData = new AuthData(input.Url, input.UserName, DecryptPassword(input.Password), token);
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(token)) throw new ArgumentException("Token can't be null");
|
|
||||||
|
|
||||||
if (key == ProviderTypes.Box)
|
if (key == ProviderTypes.Box)
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrEmpty(token))
|
||||||
|
throw new ArgumentException("Token can't be null");
|
||||||
|
|
||||||
var box = ServiceProvider.GetService<BoxProviderInfo>();
|
var box = ServiceProvider.GetService<BoxProviderInfo>();
|
||||||
box.ID = id;
|
box.ID = id;
|
||||||
box.CustomerTitle = providerTitle;
|
box.CustomerTitle = providerTitle;
|
||||||
@ -407,6 +410,9 @@ namespace ASC.Files.Thirdparty
|
|||||||
|
|
||||||
if (key == ProviderTypes.DropboxV2)
|
if (key == ProviderTypes.DropboxV2)
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrEmpty(token))
|
||||||
|
throw new ArgumentException("Token can't be null");
|
||||||
|
|
||||||
var drop = ServiceProvider.GetService<DropboxProviderInfo>();
|
var drop = ServiceProvider.GetService<DropboxProviderInfo>();
|
||||||
drop.ID = id;
|
drop.ID = id;
|
||||||
drop.CustomerTitle = providerTitle;
|
drop.CustomerTitle = providerTitle;
|
||||||
@ -437,6 +443,9 @@ namespace ASC.Files.Thirdparty
|
|||||||
|
|
||||||
if (key == ProviderTypes.GoogleDrive)
|
if (key == ProviderTypes.GoogleDrive)
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrEmpty(token))
|
||||||
|
throw new ArgumentException("Token can't be null");
|
||||||
|
|
||||||
var gd = ServiceProvider.GetService<GoogleDriveProviderInfo>();
|
var gd = ServiceProvider.GetService<GoogleDriveProviderInfo>();
|
||||||
gd.ID = id;
|
gd.ID = id;
|
||||||
gd.CustomerTitle = providerTitle;
|
gd.CustomerTitle = providerTitle;
|
||||||
@ -451,6 +460,9 @@ namespace ASC.Files.Thirdparty
|
|||||||
|
|
||||||
if (key == ProviderTypes.OneDrive)
|
if (key == ProviderTypes.OneDrive)
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrEmpty(token))
|
||||||
|
throw new ArgumentException("Token can't be null");
|
||||||
|
|
||||||
var od = ServiceProvider.GetService<OneDriveProviderInfo>();
|
var od = ServiceProvider.GetService<OneDriveProviderInfo>();
|
||||||
od.ID = id;
|
od.ID = id;
|
||||||
od.CustomerTitle = providerTitle;
|
od.CustomerTitle = providerTitle;
|
||||||
|
Loading…
Reference in New Issue
Block a user