Implement Connad/Disconnect-SsoAdminServer finctions

This commit is contained in:
dmilov
2020-09-29 09:53:29 +03:00
parent 8599b67b81
commit bac4cf704c
14 changed files with 249 additions and 6 deletions

View File

@@ -45,9 +45,14 @@ namespace VMware.vSphere.SsoAdminClient.DataTypes
}
public string Name { get; }
public Uri ServiceUri => _client.ServiceUri;
public string User => _client.User;
public Uri ServiceUri => _client?.ServiceUri;
public string User => _client?.User;
public string Id { get; set; }
public bool IsConnected => _client != null;
public void Disconnect() {
_client = null;
}
public override string ToString() {
return Name;

View File

@@ -35,6 +35,8 @@ namespace VMware.vSphere.SsoAdminClient
// Create STS Client
var stsUri = lsClient.GetStsEndpointUri();
_securityContext = new UserPassSecurityContext(user, password, stsUri, serverCertificateValidator);
// Initialize security context with Saml token by username and password
_securityContext.GetToken();
// Create SSO Admin Binding Client
var ssoAdminUri = lsClient.GetSsoAdminEndpointUri();