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
-
ObjectManagementServiceProxy
- Implements
-
IManagementServiceIUnsecuredManagementServiceIRoutingService
- 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
infoConnectionInformationA instance of WebManagementService.ConnectionInformation
ChangePassword(Guid, String)
Changes the password for a given user.
public void ChangePassword(Guid passwordChangeToken, string newPassword)
Parameters
passwordChangeTokenGuidThe password change token.
newPasswordStringThe new password.
ChangePasswordAuthenticated(String, String, String)
Changes the password.
public void ChangePasswordAuthenticated(string userName, string oldPassword, string newPassword)
Parameters
userNameStringName of the user.
oldPasswordStringThe old password.
newPasswordStringThe 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
endpointAddressStringthe address of the endpoint.
userNameStringthe username to use.
passwordStringthe 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
userNameStringThe username of the user.
firstNameStringThe firstname of the user.
lastNameStringThe lastname of the user.
tenantStringThe tenant name the user should join.
adminBooleanIndicates whether the user is admin or not
disabledBooleanObsolete parameter, ignored.
DeleteUser(String)
Deletes a user from its tenant and from the management context
public void DeleteUser(string username)
Parameters
usernameStringThe username of the user to delete.
GetConnectionInformation(String)
Gets a set of connection information of a certain user
public ConnectionInformation GetConnectionInformation(string userName)
Parameters
userNameStringThe 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
userNameStringThe user name to fetch the connection information for
passwordStringThe password of the user
Returns
- ConnectionInformation
An instance of WebManagementService.ConnectionInformation
Remarks
This method should only be used the
GetConnectionInformation(String, String, Boolean)
Gets a set of connection information of a certain user
public ConnectionInformation GetConnectionInformation(string userName, string password, bool callChangePasswordFunction)
Parameters
userNameStringThe user name to fetch the connection information for
passwordStringThe password of the user
callChangePasswordFunctionBooleanIndicates, if the ChangePasswordFunction should be called.
Returns
- ConnectionInformation
An instance of WebManagementService.ConnectionInformation
Remarks
This method should only be used the
GetConnectionInformationExtended(String)
Gets a set of connection information of a certain user
public ConnectionInformation GetConnectionInformationExtended(string userName)
Parameters
userNameStringThe user name to fetch the connection information for
Returns
- ConnectionInformation
An instance of WebManagementService.ConnectionInformation
GetConnectionInformationExtendedAsync(String)
public Task<ConnectionInformation> GetConnectionInformationExtendedAsync(string userName)
Parameters
userNameString
Returns
- Task<ConnectionInformation>
GetDownloadFilename(String)
Gets the filename referencing the provided software version.
public string GetDownloadFilename(string version)
Parameters
versionStringSoftware 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
tenantNameStringThe 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
userNameStringThe username of the user.
passwordStringThe password of the user.
firstNameStringThe firstname of the user.
lastNameStringThe lastname of the user.
companyStringThe company of the user.
adminBooleanIndicates whether the user is admin or not
ResetPassword(String)
Resets the password for a given user.
public void ResetPassword(string userName)
Parameters
userNameStringName of the user to change the password for.