Table of Contents

Class ManagementServiceProxy

Namespace
TimeCockpit.Data.RoutingService
Assembly
TimeCockpit.Data.dll

Represents a proxy that wraps the calls to the management service.

public class ManagementServiceProxy : IManagementService, IUnsecuredManagementService, IRoutingService
Inheritance
Object
ManagementServiceProxy
Implements
IManagementService
IUnsecuredManagementService
IRoutingService
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()

Properties

ChangeCredentialsFunction

Gets or sets a function called when the password needs to be changed for a user.

public Func<IRoutingService, Credentials> ChangeCredentialsFunction { get; set; }

Property Value

Func<IRoutingService, Credentials>

EndpointAddress

Gets the name of the endpoit address to use, null if config-file defined.

public string EndpointAddress { get; }

Property Value

String

Password

Gets the username that is used to access the management service.

public string Password { get; }

Property Value

String

UserName

Gets the username that is used to access the management service.

public string UserName { get; }

Property Value

String

Methods

AlterUser(ConnectionInformation)

Alters an existing user entry.

public void AlterUser(ConnectionInformation info)

Parameters

info ConnectionInformation

A instance of WebManagementService.ConnectionInformation

ChangePassword(Guid, String)

Changes the password for a given user.

public void ChangePassword(Guid passwordChangeToken, string newPassword)

Parameters

passwordChangeToken Guid

The password change token.

newPassword String

The new password.

ChangePasswordAuthenticated(String, String, String)

Changes the password.

public void ChangePasswordAuthenticated(string userName, string oldPassword, string newPassword)

Parameters

userName String

Name of the user.

oldPassword String

The old password.

newPassword String

The new password.

Create(String, String, String)

Creates a management proxy using username, password and an endpoint name.

public static ManagementServiceProxy Create(string endpointAddress, string userName = null, string password = null)

Parameters

endpointAddress String

the address of the endpoint.

userName String

the username to use.

password String

the password for the user.

Returns

ManagementServiceProxy

returns an new management proxy with given credentials.

CreateUserAndJoinTenant(String, String, String, String, Boolean, Boolean)

Creates a user in the userinfo table without registering for tenant creation. The user joins another tenant

public void CreateUserAndJoinTenant(string userName, string firstName, string lastName, string tenant, bool admin, bool disabled)

Parameters

userName String

The username of the user.

firstName String

The firstname of the user.

lastName String

The lastname of the user.

tenant String

The tenant name the user should join.

admin Boolean

Indicates whether the user is admin or not

disabled Boolean

Obsolete parameter, ignored.

DeleteUser(String)

Deletes a user from its tenant and from the management context

public void DeleteUser(string username)

Parameters

username String

The username of the user to delete.

GetConnectionInformation(String)

Gets a set of connection information of a certain user

public ConnectionInformation GetConnectionInformation(string userName)

Parameters

userName String

The user name to fetch the connection information for

Returns

ConnectionInformation

An instance of WebManagementService.ConnectionInformation

GetConnectionInformation(String, String)

Gets a set of connection information of a certain user

public ConnectionInformation GetConnectionInformation(string userName, string password)

Parameters

userName String

The user name to fetch the connection information for

password String

The password of the user

Returns

ConnectionInformation

An instance of WebManagementService.ConnectionInformation

Remarks

This method should only be used the constructor. This is because the method itself passes username and password as credentials to the channel factor. That means that the username parameter is both, the username for the channelfactory to authenticate and also the username to fetch WebManagementService.ConnectionInformation about. Further, be aware, that this method returns a shared access key for the blob store.

GetConnectionInformation(String, String, Boolean)

Gets a set of connection information of a certain user

public ConnectionInformation GetConnectionInformation(string userName, string password, bool callChangePasswordFunction)

Parameters

userName String

The user name to fetch the connection information for

password String

The password of the user

callChangePasswordFunction Boolean

Indicates, if the ChangePasswordFunction should be called.

Returns

ConnectionInformation

An instance of WebManagementService.ConnectionInformation

Remarks

This method should only be used the constructor. This is because the method itself passes username and password as credentials to the channel factor. That means that the username parameter is both, the username for the channelfactory to authenticate and also the username to fetch WebManagementService.ConnectionInformation about. Further, be aware, that this method returns a shared access key for the blob store.

GetConnectionInformationExtended(String)

Gets a set of connection information of a certain user

public ConnectionInformation GetConnectionInformationExtended(string userName)

Parameters

userName String

The user name to fetch the connection information for

Returns

ConnectionInformation

An instance of WebManagementService.ConnectionInformation

GetConnectionInformationExtendedAsync(String)

public Task<ConnectionInformation> GetConnectionInformationExtendedAsync(string userName)

Parameters

userName String

Returns

Task<ConnectionInformation>

GetDownloadFilename(String)

Gets the filename referencing the provided software version.

public string GetDownloadFilename(string version)

Parameters

version String

Software version to get filename for.

Returns

String

The filename referencing the provided software version or null if the current user should not use this version.

Remarks

The user should not use the version if it is not compatible with his tenant or the tenant is deprecated (pre-ownership).

GetStatus()

Checks if a service that provides WebManagementService.ConnectionInformation is ready to provide the latter.

public RoutingServiceStatus GetStatus()

Returns

RoutingServiceStatus

an instance of TimeCockpit.Data.RoutingService.RoutingServiceStatus

GetUsers(String)

Fetches all the users that share one tenant.

public IList<ConnectionInformation> GetUsers(string tenantName)

Parameters

tenantName String

The name of the tenant to fetch the user for.

Returns

IList<ConnectionInformation>

A list of WebManagementService.ConnectionInformation objects.

GetVersionInformation()

Gets the version information for the current user/tenant.

public VersionInformationOverview GetVersionInformation()

Returns

VersionInformationOverview

The version information for the current user/tenant or null if the user uses a deprecated (pre-ownership) tenant.

RegisterForTenantCreation(String, String, String, String, String, Boolean)

Registers a user and adds an entry in the UserInfo table.

public void RegisterForTenantCreation(string userName, string password, string firstName, string lastName, string company, bool admin)

Parameters

userName String

The username of the user.

password String

The password of the user.

firstName String

The firstname of the user.

lastName String

The lastname of the user.

company String

The company of the user.

admin Boolean

Indicates whether the user is admin or not

ResetPassword(String)

Resets the password for a given user.

public void ResetPassword(string userName)

Parameters

userName String

Name of the user to change the password for.