Merge pull request #406 from vmware/topic/dmilov/fix-addactivedirectory-for-67
Fix issue #405
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -33,7 +33,7 @@ namespace VMware.vSphere.SsoAdminClient
|
|||||||
if (password == null) throw new ArgumentNullException(nameof(password));
|
if (password == null) throw new ArgumentNullException(nameof(password));
|
||||||
|
|
||||||
var lsClient = new LookupServiceClient(hostname, serverCertificateValidator);
|
var lsClient = new LookupServiceClient(hostname, serverCertificateValidator);
|
||||||
|
|
||||||
// Create STS Client
|
// Create STS Client
|
||||||
var stsUri = lsClient.GetStsEndpointUri();
|
var stsUri = lsClient.GetStsEndpointUri();
|
||||||
_securityContext = new UserPassSecurityContext(user, password, stsUri, serverCertificateValidator);
|
_securityContext = new UserPassSecurityContext(user, password, stsUri, serverCertificateValidator);
|
||||||
@@ -128,7 +128,7 @@ namespace VMware.vSphere.SsoAdminClient
|
|||||||
public Uri ServiceUri { get; }
|
public Uri ServiceUri { get; }
|
||||||
public string User { get; }
|
public string User { get; }
|
||||||
|
|
||||||
public PersonUser CreateLocalUser(
|
public PersonUser CreateLocalUser(
|
||||||
string userName,
|
string userName,
|
||||||
string password,
|
string password,
|
||||||
string description = null,
|
string description = null,
|
||||||
@@ -203,7 +203,7 @@ namespace VMware.vSphere.SsoAdminClient
|
|||||||
int.MaxValue)).Result.returnval;
|
int.MaxValue)).Result.returnval;
|
||||||
|
|
||||||
if (personUsers != null) {
|
if (personUsers != null) {
|
||||||
foreach (var personUser in personUsers) {
|
foreach (var personUser in personUsers) {
|
||||||
yield return new PersonUser(this) {
|
yield return new PersonUser(this) {
|
||||||
Name = personUser.id.name,
|
Name = personUser.id.name,
|
||||||
Domain = personUser.id.domain,
|
Domain = personUser.id.domain,
|
||||||
@@ -214,7 +214,7 @@ namespace VMware.vSphere.SsoAdminClient
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DeleteLocalUser(
|
public void DeleteLocalUser(
|
||||||
@@ -256,7 +256,7 @@ namespace VMware.vSphere.SsoAdminClient
|
|||||||
|
|
||||||
if (ssoAdminGroups != null) {
|
if (ssoAdminGroups != null) {
|
||||||
foreach (var group in ssoAdminGroups) {
|
foreach (var group in ssoAdminGroups) {
|
||||||
yield return new DataTypes.Group {
|
yield return new DataTypes.Group {
|
||||||
Name = group.id.name,
|
Name = group.id.name,
|
||||||
Domain = group.id.domain
|
Domain = group.id.domain
|
||||||
};
|
};
|
||||||
@@ -466,7 +466,7 @@ namespace VMware.vSphere.SsoAdminClient
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create Authorization Invocation Context
|
// Create Authorization Invocation Context
|
||||||
var authorizedInvocationContext =
|
var authorizedInvocationContext =
|
||||||
CreateAuthorizedInvocationContext();
|
CreateAuthorizedInvocationContext();
|
||||||
@@ -482,7 +482,7 @@ namespace VMware.vSphere.SsoAdminClient
|
|||||||
ssoAdminPasswordPolicy)).Wait();
|
ssoAdminPasswordPolicy)).Wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
return GetPasswordPolicy();
|
return GetPasswordPolicy();
|
||||||
}
|
}
|
||||||
|
|
||||||
public LockoutPolicy GetLockoutPolicy() {
|
public LockoutPolicy GetLockoutPolicy() {
|
||||||
@@ -501,7 +501,7 @@ namespace VMware.vSphere.SsoAdminClient
|
|||||||
})).Result;
|
})).Result;
|
||||||
|
|
||||||
if (ssoAdminLockoutPolicy != null) {
|
if (ssoAdminLockoutPolicy != null) {
|
||||||
result = new LockoutPolicy(this) {
|
result = new LockoutPolicy(this) {
|
||||||
Description = ssoAdminLockoutPolicy.description,
|
Description = ssoAdminLockoutPolicy.description,
|
||||||
AutoUnlockIntervalSec = ssoAdminLockoutPolicy.autoUnlockIntervalSec,
|
AutoUnlockIntervalSec = ssoAdminLockoutPolicy.autoUnlockIntervalSec,
|
||||||
FailedAttemptIntervalSec = ssoAdminLockoutPolicy.failedAttemptIntervalSec,
|
FailedAttemptIntervalSec = ssoAdminLockoutPolicy.failedAttemptIntervalSec,
|
||||||
@@ -553,7 +553,7 @@ namespace VMware.vSphere.SsoAdminClient
|
|||||||
},
|
},
|
||||||
ssoAdminLockoutPolicy)).Wait();
|
ssoAdminLockoutPolicy)).Wait();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return GetLockoutPolicy();
|
return GetLockoutPolicy();
|
||||||
}
|
}
|
||||||
@@ -589,7 +589,7 @@ namespace VMware.vSphere.SsoAdminClient
|
|||||||
public TokenLifetime SetTokenLifetime(
|
public TokenLifetime SetTokenLifetime(
|
||||||
long? maxHoKTokenLifetime,
|
long? maxHoKTokenLifetime,
|
||||||
long? maxBearerTokenLifetime) {
|
long? maxBearerTokenLifetime) {
|
||||||
|
|
||||||
var authorizedInvocationContext =
|
var authorizedInvocationContext =
|
||||||
CreateAuthorizedInvocationContext();
|
CreateAuthorizedInvocationContext();
|
||||||
|
|
||||||
@@ -638,8 +638,8 @@ namespace VMware.vSphere.SsoAdminClient
|
|||||||
InvokeOperation(() =>
|
InvokeOperation(() =>
|
||||||
_ssoAdminBindingClient.AddExternalDomainAsync(
|
_ssoAdminBindingClient.AddExternalDomainAsync(
|
||||||
new ManagedObjectReference {
|
new ManagedObjectReference {
|
||||||
type = "SsoAdminConfigurationManagementService",
|
type = "SsoAdminDomainManagementService",
|
||||||
Value = "configurationManagementService"
|
Value = "domainManagementService"
|
||||||
},
|
},
|
||||||
serverType,
|
serverType,
|
||||||
domainName,
|
domainName,
|
||||||
@@ -656,8 +656,8 @@ namespace VMware.vSphere.SsoAdminClient
|
|||||||
password = authenticationPassword
|
password = authenticationPassword
|
||||||
})).Wait();
|
})).Wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<IdentitySource> GetDomains() {
|
public IEnumerable<IdentitySource> GetDomains() {
|
||||||
var authorizedInvocationContext =
|
var authorizedInvocationContext =
|
||||||
CreateAuthorizedInvocationContext();
|
CreateAuthorizedInvocationContext();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user